2013-01-01 21:11:43 +01:00
|
|
|
# Created by: thierry@pompo.net
|
2005-10-31 19:48:23 +01:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
PORTNAME= gnudatalanguage
|
2013-10-11 11:35:03 +02:00
|
|
|
DISTVERSION= 0.9.4
|
2014-09-10 22:50:31 +02:00
|
|
|
PORTREVISION= 12
|
2005-10-31 19:48:23 +01:00
|
|
|
CATEGORIES= science lang
|
2009-12-29 14:43:25 +01:00
|
|
|
MASTER_SITES= SF/${PORTNAME}/gdl/${DISTVERSION}
|
2005-10-31 19:48:23 +01:00
|
|
|
.if defined(BUILD_PYTHON_MODULE)
|
|
|
|
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
|
|
|
|
.endif
|
2007-07-17 22:43:11 +02:00
|
|
|
DISTNAME= gdl-${DISTVERSION}
|
2005-10-31 19:48:23 +01:00
|
|
|
|
|
|
|
MAINTAINER= thierry@FreeBSD.org
|
|
|
|
COMMENT?= GDL, a free IDL compatible incremental compiler
|
|
|
|
|
2011-11-13 15:00:04 +01:00
|
|
|
LICENSE= GPLv2
|
|
|
|
|
2005-10-31 19:48:23 +01:00
|
|
|
#---------------------------------------------------------------------------
|
|
|
|
# You may define these options:
|
|
|
|
#
|
2013-09-19 18:32:27 +02:00
|
|
|
# - WITHOUT_GRAPHICSMAGICK: remove GraphicsMagick support
|
2005-10-31 19:48:23 +01:00
|
|
|
# - WITHOUT_HDF5: remove HDF5 support
|
|
|
|
# - WITHOUT_NETCDF: remove netCDF support
|
|
|
|
# - WITHOUT_HDF: remove HDF 4 suppport (conflict with netCDF)
|
|
|
|
# - WITHOUT_PYTHON: don't build the interface to python
|
2013-10-11 11:35:03 +02:00
|
|
|
# - WITHOUT_FFTW3: remove FFTW (faster fft routine than GSL)
|
|
|
|
# - WITHOUT_EIGEN remove Eigen support (boost performance)
|
|
|
|
# - WITHOUT_UDUNITS remove unit conversion in IMSL_CONSTANT
|
2005-10-31 19:48:23 +01:00
|
|
|
#
|
|
|
|
#---------------------------------------------------------------------------
|
|
|
|
|
2013-09-19 18:32:27 +02:00
|
|
|
LIB_DEPENDS+= libplplotd.so:${PORTSDIR}/math/plplot \
|
2013-10-11 11:35:03 +02:00
|
|
|
libps.so:${PORTSDIR}/print/pslib \
|
|
|
|
libgsl.so:${PORTSDIR}/math/gsl
|
|
|
|
|
2010-09-14 21:23:00 +02:00
|
|
|
USE_WX= 2.8
|
2014-04-08 17:19:11 +02:00
|
|
|
WX_UNICODE= yes
|
2013-09-19 18:32:27 +02:00
|
|
|
USE_XORG= x11
|
Update CMake to 3.0.1.
The 3.0 series is an incremental improvement over the previous 2.8 series
despite the major version number change. A list of important changes is
available at http://www.cmake.org/cmake/help/v3.0/release/3.0.0.html
On the porting side
* The minimum FreeBSD release we have to support in the ports tree is now
recent enough that ports/168671 can finally be committed: instead of
building and using CMake's own copies of bzip2, curl, expat, libarchive,
liblzma and zlib, we use the versions in ports and/or the base system.
* CMake's documentation system has been changed and vastly improved at the
cost of now depending on Sphinx. We still generate only man pages, but can
start generating the HTML documentation in the future if desired.
* devel/cmake-gui now uses Qt5 instead of Qt4 and does not needlessly build
the ncurses UI that is installed by devel/cmake itself.
* CMake commit 3816cd2 fixes a longstanding issue in the detection of the
Python interpreter and its libraries, but requires us to revert a
workaround for that in Mk/Uses/python.mk itself, effectively reverting
the patch introduced by ports/168159.
* Similarly, a few ports had to be fixed manually due to CMake being
stricter when parsing some files or the ports detecting Python the wrong
way. Fortunately, they all had been fixed upstream so I just grabbed the
appropriate commits and pointed to them in the patches.
science/gnudatalanguage had to have its PORTREVISION bumped because
switching to USES=cmake:outsource removed a few files from the plist that
were not supposed to have been installed in the first place.
PR: 168671
PR: 192644
2014-09-02 14:59:54 +02:00
|
|
|
USES= pkgconfig cmake:outsource dos2unix compiler:gcc-c++11-lib
|
2013-10-11 11:35:03 +02:00
|
|
|
|
2010-09-14 21:23:00 +02:00
|
|
|
# Disable ncurses and readline from ports
|
2013-09-19 18:32:27 +02:00
|
|
|
# Disable ImageMagick (does'nt work with plplot because dynamic drivers
|
|
|
|
# are enabled by default)
|
2013-10-11 11:35:03 +02:00
|
|
|
# TODO: add a slave port for mpich - ATM just deactivate its support.
|
|
|
|
CMAKE_ARGS= -DREADLINEDIR:STRING="/usr" \
|
|
|
|
-DNCURSESDIR:STRING="/usr" \
|
|
|
|
-DMPICH:BOOL=NO \
|
|
|
|
-DMAGICK:BOOL=NO
|
|
|
|
CPPFLAGS+= ${CFLAGS} -fno-inline ${PTHREAD_CFLAGS}
|
2011-09-24 00:26:39 +02:00
|
|
|
LDFLAGS+= ${PTHREAD_LIBS} -L${LOCALBASE}/lib
|
2005-10-31 19:48:23 +01:00
|
|
|
|
|
|
|
SLAVEDIRS= science/py-gnudatalanguage
|
|
|
|
|
2014-07-05 00:08:14 +02:00
|
|
|
OPTIONS_DEFINE= EXAMPLES
|
|
|
|
|
2005-10-31 19:48:23 +01:00
|
|
|
.if defined(BUILD_PYTHON_MODULE)
|
|
|
|
CATEGORIES+= python
|
2013-10-11 11:35:03 +02:00
|
|
|
CMAKE_ARGS+= -DPYTHON_MODULE:BOOL=YES -DOPENMP:BOOL=NO
|
2005-10-31 19:48:23 +01:00
|
|
|
PLIST_FILES= %%PYTHON_SITELIBDIR%%/GDL.so
|
|
|
|
PLIST_SUB+= MASTER="@comment "
|
|
|
|
.else
|
2013-10-11 11:35:03 +02:00
|
|
|
CMAKE_ARGS+= -DPYTHON_MODULE:BOOL=NO
|
2005-10-31 19:48:23 +01:00
|
|
|
PLIST_SUB+= MASTER=""
|
|
|
|
.endif
|
|
|
|
|
2013-09-19 18:32:27 +02:00
|
|
|
.if !defined(WITHOUT_GRAPHICSMAGICK)
|
2014-08-04 21:34:31 +02:00
|
|
|
LIB_DEPENDS+= libGraphicsMagick.so:${PORTSDIR}/graphics/GraphicsMagick
|
2013-10-11 11:35:03 +02:00
|
|
|
CMAKE_ARGS+= -DGRAPHICSMAGICK:BOOL=YES
|
2005-10-31 19:48:23 +01:00
|
|
|
.else
|
2013-10-11 11:35:03 +02:00
|
|
|
CMAKE_ARGS+= -DGRAPHICSMAGICK:BOOL=NO
|
2005-10-31 19:48:23 +01:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.if !defined(WITHOUT_HDF5)
|
2014-05-03 02:55:30 +02:00
|
|
|
LIB_DEPENDS+= libhdf5.so:${PORTSDIR}/science/hdf5
|
2013-10-11 11:35:03 +02:00
|
|
|
CMAKE_ARGS+= -DHDF5:BOOL=YES
|
2005-10-31 19:48:23 +01:00
|
|
|
.else
|
2013-10-11 11:35:03 +02:00
|
|
|
CMAKE_ARGS+= -DHDF5:BOOL=NO
|
2005-10-31 19:48:23 +01:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.if !defined(WITHOUT_NETCDF)
|
2013-09-19 18:32:27 +02:00
|
|
|
LIB_DEPENDS+= libnetcdf.so:${PORTSDIR}/science/netcdf
|
2013-10-11 11:35:03 +02:00
|
|
|
CMAKE_ARGS+= -DNETCDF:BOOL=YES -DHDF:BOOL=NO
|
2005-10-31 19:48:23 +01:00
|
|
|
.else
|
2013-10-11 11:35:03 +02:00
|
|
|
CMAKE_ARGS+= -DNETCDF:BOOL=NO
|
2005-10-31 19:48:23 +01:00
|
|
|
. if !defined(WITHOUT_HDF)
|
2013-09-19 18:32:27 +02:00
|
|
|
LIB_DEPENDS+= libdf.so.2:${PORTSDIR}/science/hdf
|
2013-10-11 11:35:03 +02:00
|
|
|
CMAKE_ARGS+= -DHDF:BOOL=YES
|
2005-10-31 19:48:23 +01:00
|
|
|
. else
|
2013-10-11 11:35:03 +02:00
|
|
|
CMAKE_ARGS+= -DHDF:BOOL=NO
|
2005-10-31 19:48:23 +01:00
|
|
|
. endif
|
|
|
|
.endif
|
|
|
|
|
2013-10-11 11:35:03 +02:00
|
|
|
.if !defined(WITHOUT_EIGEN)
|
|
|
|
BUILD_DEPENDS+= ${LOCALBASE}/libdata/pkgconfig/eigen3.pc:${PORTSDIR}/math/eigen3
|
|
|
|
CMAKE_ARGS+= -DEIGEN3:BOOL=YES
|
|
|
|
.else
|
|
|
|
CMAKE_ARGS+= -DEIGEN3:BOOL=NO
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if !defined(WITHOUT_UDUNITS)
|
|
|
|
LIB_DEPENDS+= libudunits2.so:${PORTSDIR}/science/udunits
|
|
|
|
CMAKE_ARGS+= -DUDUNITS:BOOL=YES
|
|
|
|
.else
|
|
|
|
CMAKE_ARGS+= -DUDUNITS:BOOL=NO
|
|
|
|
.endif
|
|
|
|
|
2005-10-31 19:48:23 +01:00
|
|
|
.if !defined(WITHOUT_PYTHON) || defined(BUILD_PYTHON_MODULE)
|
2014-01-13 22:00:02 +01:00
|
|
|
USE_PYTHON= 2
|
2013-01-05 15:28:32 +01:00
|
|
|
BUILD_DEPENDS+= ${PYNUMPY}
|
|
|
|
RUN_DEPENDS+= ${PYNUMPY} \
|
|
|
|
${PYTHON_PKGNAMEPREFIX}matplotlib>0:${PORTSDIR}/math/py-matplotlib
|
2013-10-11 11:35:03 +02:00
|
|
|
CMAKE_ARGS+= -DPYTHON:BOOL=YES -DPYTHONVERSION:STRING="${PYTHON_VER}"
|
2005-10-31 19:48:23 +01:00
|
|
|
.else
|
2013-10-11 11:35:03 +02:00
|
|
|
CMAKE_ARGS+= -DPYTHON:BOOL=NO
|
2005-10-31 19:48:23 +01:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2010-09-27 22:14:38 +02:00
|
|
|
.if ${OSVERSION} < 800503
|
|
|
|
BROKEN= Does not build with ancient binutils
|
|
|
|
.endif
|
|
|
|
|
2013-10-11 11:35:03 +02:00
|
|
|
.if !defined(WITHOUT_FFTW3)
|
2013-09-19 18:32:27 +02:00
|
|
|
LIB_DEPENDS+= libfftw3.so:${PORTSDIR}/math/fftw3 \
|
|
|
|
libfftw3f.so:${PORTSDIR}/math/fftw3-float
|
2013-10-11 11:35:03 +02:00
|
|
|
CMAKE_ARGS+= -DFFTW:BOOL=YES
|
|
|
|
.else
|
|
|
|
CMAKE_ARGS+= -DFFTW:BOOL=NO
|
2005-10-31 19:48:23 +01:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(BUILD_PYTHON_MODULE)
|
|
|
|
do-install:
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/src/.libs/libgdl.so.0 ${PYTHON_SITELIBDIR}/GDL.so
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if !defined(BUILD_PYTHON_MODULE)
|
2013-10-11 11:35:03 +02:00
|
|
|
post-stage:
|
|
|
|
${MKDIR} ${STAGEDIR}${EXAMPLESDIR}/testsuite
|
|
|
|
(cd ${WRKSRC}/testsuite && ${COPYTREE_SHARE} \* ${STAGEDIR}${EXAMPLESDIR}/testsuite/)
|
2005-10-31 19:48:23 +01:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(MAINTAINER_MODE)
|
2007-03-23 23:20:25 +01:00
|
|
|
regression-test: install
|
2005-10-31 19:48:23 +01:00
|
|
|
. if defined(BUILD_PYTHON_MODULE)
|
|
|
|
@${ECHO_CMD} 'import GDL' > ${WRKDIR}/testgdl.py
|
|
|
|
@${ECHO_CMD} 'print GDL.function("sin",(1,))' >> ${WRKDIR}/testgdl.py
|
|
|
|
${PYTHON_CMD} ${WRKDIR}/testgdl.py
|
|
|
|
. else
|
2007-07-17 22:43:11 +02:00
|
|
|
@${ECHO_CMD} ".RUN ${EXAMPLESDIR}/testsuite/test_suite.pro" \
|
|
|
|
> ${WRKDIR}/testgdl
|
2005-10-31 19:48:23 +01:00
|
|
|
@${ECHO_CMD} "exit" >> ${WRKDIR}/testgdl
|
|
|
|
${PREFIX}/bin/gdl < ${WRKDIR}/testgdl
|
|
|
|
. endif
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.include <bsd.port.post.mk>
|