Ticket #12297: Portfile

File Portfile, 3.2 KB (added by takeshi@…, 17 years ago)
Line 
1# $Id: Portfile 23185 2007-03-27 03:15:11Z jmpp@macports.org $
2PortSystem 1.0
3name            gnudatalanguage
4version         0.9pre5
5categories      math science
6maintainers     takeshi@mac.com
7platforms       darwin
8description     a free IDL combatible incremental compiler
9long_description \
10                A free IDL (Interactive Data Language) compatible \
11                incremental compiler (ie. runs IDL programs).
12homepage        http://gnudatalanguage.sourceforge.net/
13master_sites    sourceforge
14distname        gdl-${version}
15
16checksums       md5 d2a740ba633ff7ace23f452d34a9c42c
17
18depends_build   port:automake port:libtool
19depends_lib     port:bzip2 \
20                port:freetype \
21                port:gsl \
22                port:hdf5 \
23                port:ImageMagick \
24                port:jpeg \
25                port:ncurses \
26                port:netcdf \
27                port:plplot \
28                port:python24 \
29                port:py-numarray \
30                port:readline \
31                port:tiff
32
33configure.env       FFLAGS=-O2 CPPFLAGS="-I${prefix}/include/python2.4"
34configure.args      --with-plplotdir=${prefix} \
35                    --with-ncursesdir=${prefix} \
36                    --with-readlinedir=${prefix} \
37                    --with-gsldir=${prefix} \
38                    --with-netcdf=${prefix} \
39                    --without-hdf --with-hdf5=${prefix} \
40                    --with-python=${prefix}/Library/Frameworks/Python.framework/Versions/Current \
41                    --with-Magick=${prefix} \
42                    --disable-dependency-tracking
43 
44patch {
45   foreach f {configure.in configure} {
46       reinplace "s|-L\$with_hdf5/lib/hdf -L\$with_hdf5/lib/hdf5||" \
47           ${worksrcpath}/${f}
48       reinplace "s|-I\$with_hdf5/include/hdf -I\$with_hdf5/include/hdf5||" \
49           ${worksrcpath}/${f}
50       reinplace "s|-lproj4|-lproj|g" ${worksrcpath}/${f}
51   }
52   reinplace "s|AC_CHECK_LIB(proj4|AC_CHECK_LIB(proj|" ${worksrcpath}/configure.in
53   reinplace "s|-L/usr/X11R6/lib64||" ${worksrcpath}/src/Makefile.am
54   reinplace "s|lib_proj.h|projects.h|" ${worksrcpath}/src/math_utl.hpp
55   foreach d {src src/antlr} {
56       reinplace "s|libantlr|libantlr_gdl|g" ${worksrcpath}/${d}/Makefile.am
57   }
58}
59post-patch {
60   # Avoid using heimdal's broken fnmatch.h
61   reinplace "s|<\\(fnmatch\.h\\)>|\"/usr/include/\\1\"|" ${worksrcpath}/src/file.cpp
62}
63
64destroot.destdir    prefix=${destroot}${prefix}
65destroot.target     install-strip
66
67post-destroot {
68    xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
69    foreach f {AUTHORS COPYING ChangeLog HACKING INSTALL NEWS PYTHON.txt README TODO} {
70        eval xinstall -m 644 [glob ${worksrcpath}/${f}] ${destroot}${prefix}/share/doc/${name}
71    }
72}
73
74variant proj {
75    depends_lib-append port:proj
76    configure.env-append CXX="g++ -DPJ_LIB__"
77    configure.args-append --with-libproj4=${prefix}
78}
79
80if {![variant_isset g95]} {
81    default_variants +gcc42
82}
83variant gcc42 conflicts g95 description {Build using gcc42 (default)} {
84    depends_build-append    port:gcc42
85    configure.env-append    F77=${prefix}/bin/gfortran-mp-4.2
86}
87variant g95 conflicts gcc42 description {Build using g95} {
88    depends_build-append    port:g95
89    configure.env-append    F77=${prefix}/bin/g95
90}
91