Permalink
Fetching contributors…
Cannot retrieve contributors at this time
196 lines (175 sloc) 7.64 KB
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
PortSystem 1.0
PortGroup cmake 1.0
PortGroup conflicts_build 1.0
PortGroup mpi 1.0
name gnudatalanguage
version 0.9.7
epoch 2
revision 3
compilers.choose cc cxx
mpi.setup
categories math science
maintainers {takeshi @tenomoto}
license GPL-2
platforms darwin
description a free IDL combatible incremental compiler
long_description \
A free IDL (Interactive Data Language) compatible \
incremental compiler (i.e. runs IDL programs).
homepage http://gnudatalanguage.sourceforge.net/
master_sites sourceforge:${name}:gdl \
http://www.soest.hawaii.edu/pwessel/gshhg:gshhs
set gdlsrc gdl-${version}.tgz
set dataversion 2.3.7
set gshhsdata gshhg-bin-${dataversion}.zip
distfiles ${gdlsrc}:gdl
worksrcdir gdl-${version}
checksums ${gdlsrc} \
rmd160 ad8382265146592e23bbae42e339d871d9e3a983 \
sha256 2b5945d06e4d95f01cb70a3c432ac2fa4c81e1b3ac7c02687a6704ab042a7e21
depends_build-append port:pkgconfig
depends_lib port:zlib \
port:gsl \
port:ncurses \
port:readline \
port:plplot \
port:netcdf-cxx \
port:hdf4 \
port:hdf5 \
port:ecCodes \
port:libproj4 \
port:GraphicsMagick \
port:xorg-libX11 \
port:udunits2 \
port:fftw-3 \
port:fftw-3-single \
port:cmsvlib \
port:pslib \
port:eigen3 \
port:gettext
conflicts_build antlr
patchfiles patch-CMakeModules-FindGrib.cmake.diff
post-patch {
# Avoid using heimdal's broken fnmatch.h
reinplace "s|<\\(fnmatch\.h\\)>|\"/usr/include/\\1\"|" ${worksrcpath}/src/file.cpp
}
cmake.out_of_source yes
configure.args-append -DEIGEN3DIR=${prefix} \
-DFFTW=ON \
-DFFTWDIR=${prefix} \
-DGRAPHICSMAGICK=ON \
-DGRAPHICSMAGICKDIR=${prefix} \
-DGRAPHICSMAGICK_INCLUDE_DIR=${prefix}/include/GraphicsMagick \
-DGRIB=ON \
-DGRIBDIR=${prefix} \
-DGRIB_INCLUDE_DIR=${prefix}/include \
-DGSHHS=OFF \
-DGSLDIR=${prefix} \
-DGSL_INCLUDE_DIR=${prefix}/include \
-DHDF5=ON \
-DHDF5_ROOT=${prefix} \
-DHDF=ON \
-DHDFDIR=${prefix} \
-DJASPERDIR=${prefix} \
-DJPEGDIR=${prefix} \
-DLIBPROJ4=ON \
-DLIBPROJ4DIR=${prefix} \
-DMAGICK=OFF \
-DMPICH=OFF \
-DNCURSESDIR=${prefix} \
-DNETCDF=ON \
-DNETCDFDIR=${prefix} \
-DOPENMP=OFF \
-DPLPLOTDIR=${prefix} \
-DPSLIB=ON \
-DPSLIBDIR=${prefix} \
-DPYTHON=OFF \
-DPYTHON_MODULE=OFF \
-DREADLINE=ON \
-DREADLINEDIR=${prefix} \
-DUDUNITS=ON \
-DUDUNITSDIR=${prefix} \
-DUDUNITS_INCLUDE_DIR=${prefix}/include/udunits2 \
-DWXWIDGETS=OFF \
-DX11DIR=${prefix} \
-DZLIBDIR=${prefix} \
-DCMAKE_OSX_DEPLOYMENT_TARGET=""
configure.cxxflags-append \
-DPLPLOT_HAS_PLCALLBACK
configure.ldflags-append \
-lintl
test.run yes
test.target check
use_parallel_build yes
post-destroot {
xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
foreach f {AUTHORS README} {
file rename ${destroot}${prefix}/share/${name}/${f} \
${destroot}${prefix}/share/doc/${name}/
}
xinstall -m 644 -W ${worksrcpath} COPYING ChangeLog HACKING NEWS MAP_INSTALL TODO \
${destroot}${prefix}/share/doc/${name}
file copy ${worksrcpath}/testsuite ${destroot}${prefix}/share/${name}/
if {[variant_isset python27]} {
xinstall -m 644 ${worksrcpath}/PYTHON.txt ${destroot}${prefix}/share/doc/${name}
file copy ${worksrcpath}/src/py ${destroot}${prefix}/share/${name}/
}
if {[variant_isset gshhs]} {
xinstall -d ${destroot}${prefix}/share/gnudatalanguage/gshhs
foreach f [glob ${workpath}/gshhs/*.b] {
xinstall -m 644 ${f} ${destroot}${prefix}/share/gnudatalanguage/gshhs
}
}
}
pre-configure {
if {[mpi_variant_isset]} {
configure.args-delete -DMPICH=OFF
configure.args-append -DMPICH=ON
configure.args-append -DMPI_CXX_COMPILER=${mpi.cxx} \
-DMPI_C_COMPILER=${mpi.cc}
}
}
# gnudatalanguage does not build against wxWidgets30.
# wxWidget support is not actively developed.
variant wxWidgets description {deprecated compatibility variant} {
# supported_archs ppc i386
# depends_lib-append port:wxWidgets30
# configure.args-delete -DWXWIDGETS=OFF \
# configure.args-append -DWXWIDGETS=ON \
# -DWXWIDGETSDIR=${prefix}
# # http://wiki.finkproject.org/index.php/Fink:Packaging:Preparing_for_10.5#OpenGL_Bug
# #configure.env-append LDFLAGS=\"-Wl,-dylib_file,/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib\"
}
if {[variant_isset python27]} {
configure.args-delete -DPYTHON=OFF
configure.args-append -DPYTHON=ON
}
variant python27 description {build with support for calling Python (2.7) from GDL (using numpy)} {
depends_lib-append port:py27-numpy
configure.args-append -DPYTHONDIR=${frameworks_dir}/Python.framework/Versions/2.7 \
-DPYTHONVERSION=2.7
}
if {[gcc_variant_isset]} {
configure.args-delete -DOPENMP=OFF
configure.args-append -DOPENMP=ON
# Detecting CXX compiler ABI info fails without this
configure.args-append -D
}
variant gshhs description {build with support for GSHHS} {
distfiles-append ${gshhsdata}:gshhs
checksums-append \
${gshhsdata} \
rmd160 1022a97fa324eaa4e5e4617fea25c8aaf1bec95c \
sha256 28600e8f7a08645aab43079326df6504212ec5ccb2b4bcf3b5f4f12ed60e82bc
extract.only ${gdlsrc}
post-extract {
system "cd ${workpath}; \
mkdir gshhs; \
unzip ${distpath}/${gshhsdata} -d gshhs"
}
configure.args-delete -DGSHHS=OFF
configure.args-append -DGSHHS=ON \
-DGSHHSDIR=${workpath}/gshhs
}
livecheck.regex /gdl-(\[0-9.\]+)${extract.suffix}