1 | # $Id: Portfile 23185 2007-03-27 03:15:11Z jmpp@macports.org $ |
---|
2 | PortSystem 1.0 |
---|
3 | name gnudatalanguage |
---|
4 | version 0.9pre5 |
---|
5 | categories math science |
---|
6 | maintainers takeshi@mac.com |
---|
7 | platforms darwin |
---|
8 | description a free IDL combatible incremental compiler |
---|
9 | long_description \ |
---|
10 | A free IDL (Interactive Data Language) compatible \ |
---|
11 | incremental compiler (ie. runs IDL programs). |
---|
12 | homepage http://gnudatalanguage.sourceforge.net/ |
---|
13 | master_sites sourceforge |
---|
14 | distname gdl-${version} |
---|
15 | |
---|
16 | checksums md5 d2a740ba633ff7ace23f452d34a9c42c |
---|
17 | |
---|
18 | depends_build port:automake port:libtool |
---|
19 | depends_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 | |
---|
33 | configure.env FFLAGS=-O2 CPPFLAGS="-I${prefix}/include/python2.4" |
---|
34 | configure.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 | |
---|
44 | patch { |
---|
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 | } |
---|
59 | post-patch { |
---|
60 | # Avoid using heimdal's broken fnmatch.h |
---|
61 | reinplace "s|<\\(fnmatch\.h\\)>|\"/usr/include/\\1\"|" ${worksrcpath}/src/file.cpp |
---|
62 | } |
---|
63 | |
---|
64 | destroot.destdir prefix=${destroot}${prefix} |
---|
65 | destroot.target install-strip |
---|
66 | |
---|
67 | post-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 | |
---|
74 | variant proj { |
---|
75 | depends_lib-append port:proj |
---|
76 | configure.env-append CXX="g++ -DPJ_LIB__" |
---|
77 | configure.args-append --with-libproj4=${prefix} |
---|
78 | } |
---|
79 | |
---|
80 | if {![variant_isset g95]} { |
---|
81 | default_variants +gcc42 |
---|
82 | } |
---|
83 | variant 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 | } |
---|
87 | variant g95 conflicts gcc42 description {Build using g95} { |
---|
88 | depends_build-append port:g95 |
---|
89 | configure.env-append F77=${prefix}/bin/g95 |
---|
90 | } |
---|
91 | |
---|