freebsd-ports/science/gnudatalanguage/Makefile

158 lines
4.3 KiB
Makefile
Raw Normal View History

# Created by: thierry@pompo.net
# $FreeBSD$
PORTNAME= gnudatalanguage
DISTVERSION= 0.9.4
PORTREVISION= 12
CATEGORIES= science lang
MASTER_SITES= SF/${PORTNAME}/gdl/${DISTVERSION}
.if defined(BUILD_PYTHON_MODULE)
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
.endif
DISTNAME= gdl-${DISTVERSION}
MAINTAINER= thierry@FreeBSD.org
COMMENT?= GDL, a free IDL compatible incremental compiler
LICENSE= GPLv2
#---------------------------------------------------------------------------
# You may define these options:
#
# - WITHOUT_GRAPHICSMAGICK: remove GraphicsMagick support
# - 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
# - WITHOUT_FFTW3: remove FFTW (faster fft routine than GSL)
# - WITHOUT_EIGEN remove Eigen support (boost performance)
# - WITHOUT_UDUNITS remove unit conversion in IMSL_CONSTANT
#
#---------------------------------------------------------------------------
LIB_DEPENDS+= libplplotd.so:${PORTSDIR}/math/plplot \
libps.so:${PORTSDIR}/print/pslib \
libgsl.so:${PORTSDIR}/math/gsl
2010-09-14 21:23:00 +02:00
USE_WX= 2.8
WX_UNICODE= yes
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
2010-09-14 21:23:00 +02:00
# Disable ncurses and readline from ports
# Disable ImageMagick (does'nt work with plplot because dynamic drivers
# are enabled by default)
# 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}
LDFLAGS+= ${PTHREAD_LIBS} -L${LOCALBASE}/lib
SLAVEDIRS= science/py-gnudatalanguage
2014-07-05 00:08:14 +02:00
OPTIONS_DEFINE= EXAMPLES
.if defined(BUILD_PYTHON_MODULE)
CATEGORIES+= python
CMAKE_ARGS+= -DPYTHON_MODULE:BOOL=YES -DOPENMP:BOOL=NO
PLIST_FILES= %%PYTHON_SITELIBDIR%%/GDL.so
PLIST_SUB+= MASTER="@comment "
.else
CMAKE_ARGS+= -DPYTHON_MODULE:BOOL=NO
PLIST_SUB+= MASTER=""
.endif
.if !defined(WITHOUT_GRAPHICSMAGICK)
LIB_DEPENDS+= libGraphicsMagick.so:${PORTSDIR}/graphics/GraphicsMagick
CMAKE_ARGS+= -DGRAPHICSMAGICK:BOOL=YES
.else
CMAKE_ARGS+= -DGRAPHICSMAGICK:BOOL=NO
.endif
.if !defined(WITHOUT_HDF5)
LIB_DEPENDS+= libhdf5.so:${PORTSDIR}/science/hdf5
CMAKE_ARGS+= -DHDF5:BOOL=YES
.else
CMAKE_ARGS+= -DHDF5:BOOL=NO
.endif
.if !defined(WITHOUT_NETCDF)
LIB_DEPENDS+= libnetcdf.so:${PORTSDIR}/science/netcdf
CMAKE_ARGS+= -DNETCDF:BOOL=YES -DHDF:BOOL=NO
.else
CMAKE_ARGS+= -DNETCDF:BOOL=NO
. if !defined(WITHOUT_HDF)
LIB_DEPENDS+= libdf.so.2:${PORTSDIR}/science/hdf
CMAKE_ARGS+= -DHDF:BOOL=YES
. else
CMAKE_ARGS+= -DHDF:BOOL=NO
. endif
.endif
.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
.if !defined(WITHOUT_PYTHON) || defined(BUILD_PYTHON_MODULE)
USE_PYTHON= 2
BUILD_DEPENDS+= ${PYNUMPY}
RUN_DEPENDS+= ${PYNUMPY} \
${PYTHON_PKGNAMEPREFIX}matplotlib>0:${PORTSDIR}/math/py-matplotlib
CMAKE_ARGS+= -DPYTHON:BOOL=YES -DPYTHONVERSION:STRING="${PYTHON_VER}"
.else
CMAKE_ARGS+= -DPYTHON:BOOL=NO
.endif
.include <bsd.port.pre.mk>
.if ${OSVERSION} < 800503
BROKEN= Does not build with ancient binutils
.endif
.if !defined(WITHOUT_FFTW3)
LIB_DEPENDS+= libfftw3.so:${PORTSDIR}/math/fftw3 \
libfftw3f.so:${PORTSDIR}/math/fftw3-float
CMAKE_ARGS+= -DFFTW:BOOL=YES
.else
CMAKE_ARGS+= -DFFTW:BOOL=NO
.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)
post-stage:
${MKDIR} ${STAGEDIR}${EXAMPLESDIR}/testsuite
(cd ${WRKSRC}/testsuite && ${COPYTREE_SHARE} \* ${STAGEDIR}${EXAMPLESDIR}/testsuite/)
.endif
.if defined(MAINTAINER_MODE)
regression-test: install
. 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
@${ECHO_CMD} ".RUN ${EXAMPLESDIR}/testsuite/test_suite.pro" \
> ${WRKDIR}/testgdl
@${ECHO_CMD} "exit" >> ${WRKDIR}/testgdl
${PREFIX}/bin/gdl < ${WRKDIR}/testgdl
. endif
.endif
.include <bsd.port.post.mk>