| 1 | # $Id: Portfile 22921 2007-03-19 09:43:20Z takanori@macports.org $ |
|---|
| 2 | PortSystem 1.0 |
|---|
| 3 | name gnudatalanguage |
|---|
| 4 | version 0.9pre4 |
|---|
| 5 | revision 1 |
|---|
| 6 | categories math science |
|---|
| 7 | maintainers takeshi@mac.com |
|---|
| 8 | platforms darwin |
|---|
| 9 | description a free IDL combatible incremental compiler |
|---|
| 10 | long_description \ |
|---|
| 11 | A free IDL (Interactive Data Language) compatible \ |
|---|
| 12 | incremental compiler (ie. runs IDL programs). |
|---|
| 13 | homepage http://gnudatalanguage.sourceforge.net/ |
|---|
| 14 | master_sites sourceforge |
|---|
| 15 | distname gdl-${version} |
|---|
| 16 | |
|---|
| 17 | checksums md5 21f03676b44937b9cc855922618a73d2 |
|---|
| 18 | |
|---|
| 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 | port:zlib |
|---|
| 33 | depends_build port:g95 |
|---|
| 34 | |
|---|
| 35 | pre-configure { |
|---|
| 36 | foreach f {configure.in configure} { |
|---|
| 37 | reinplace "s|-L\$with_hdf5/lib/hdf -L\$with_hdf5/lib/hdf5||" \ |
|---|
| 38 | ${worksrcpath}/${f} |
|---|
| 39 | reinplace "s|-I\$with_hdf5/include/hdf -I\$with_hdf5/include/hdf5||" \ |
|---|
| 40 | ${worksrcpath}/${f} |
|---|
| 41 | reinplace "s|-lproj4|-lproj|g" ${worksrcpath}/${f} |
|---|
| 42 | } |
|---|
| 43 | reinplace "s|AC_CHECK_LIB(proj4|AC_CHECK_LIB(proj|" ${worksrcpath}/configure.in |
|---|
| 44 | foreach d {src src/antlr} { |
|---|
| 45 | reinplace "s|libantlr.a|libantlr_gdl.a|g" ${worksrcpath}/${d}/Makefile.in |
|---|
| 46 | } |
|---|
| 47 | reinplace "s|-L/usr/X11R6/lib64||" ${worksrcpath}/src/Makefile.in |
|---|
| 48 | reinplace "s|lib_proj.h|projects.h|" ${worksrcpath}/src/plotting.hpp |
|---|
| 49 | } |
|---|
| 50 | configure.env F77=${prefix}/bin/g95 FFLAGS=-O2 |
|---|
| 51 | configure.args --with-plplotdir=${prefix} \ |
|---|
| 52 | --with-ncursesdir=${prefix} \ |
|---|
| 53 | --with-readlinedir=${prefix} \ |
|---|
| 54 | --with-gsldir=${prefix} \ |
|---|
| 55 | --with-netcdf=${prefix} \ |
|---|
| 56 | --without-hdf --with-hdf5=${prefix} \ |
|---|
| 57 | --with-python=${prefix} --enable-python_version=2.4 \ |
|---|
| 58 | --with-Magick=${prefix} |
|---|
| 59 | |
|---|
| 60 | destroot.destdir prefix=${destroot}${prefix} |
|---|
| 61 | destroot.target install-strip |
|---|
| 62 | |
|---|
| 63 | post-destroot { |
|---|
| 64 | xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name} |
|---|
| 65 | foreach f {AUTHORS COPYING ChangeLog HACKING INSTALL NEWS PYTHON.txt README TODO} { |
|---|
| 66 | eval xinstall -m 644 [glob ${worksrcpath}/${f}] ${destroot}${prefix}/share/doc/${name} |
|---|
| 67 | } |
|---|
| 68 | } |
|---|
| 69 | |
|---|
| 70 | # fftw-3-single does not build on i386 |
|---|
| 71 | #variant fftw { |
|---|
| 72 | # depends_lib-append port:fftw-3 port:fftw-3-single |
|---|
| 73 | # configure.args-append --with-fftw=/opt/local |
|---|
| 74 | #} |
|---|
| 75 | |
|---|
| 76 | variant proj { |
|---|
| 77 | depends_lib-append port:proj |
|---|
| 78 | configure.env-append CPPFLAGS=-DPJ_LIB__ |
|---|
| 79 | configure.args-append --with-libproj4=${prefix} |
|---|
| 80 | } |
|---|
| 81 | |
|---|