Ticket #11612: Portfile

File Portfile, 2.8 KB (added by takeshi@…, 17 years ago)
Line 
1# $Id: Portfile 22921 2007-03-19 09:43:20Z takanori@macports.org $
2PortSystem 1.0
3name            gnudatalanguage
4version         0.9pre4
5revision        1
6categories      math science
7maintainers     takeshi@mac.com
8platforms       darwin
9description     a free IDL combatible incremental compiler
10long_description \
11                A free IDL (Interactive Data Language) compatible \
12                incremental compiler (ie. runs IDL programs).
13homepage        http://gnudatalanguage.sourceforge.net/
14master_sites    sourceforge
15distname        gdl-${version}
16
17checksums       md5 21f03676b44937b9cc855922618a73d2
18
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                port:zlib
33depends_build   port:g95
34
35pre-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}
50configure.env       F77=${prefix}/bin/g95 FFLAGS=-O2
51configure.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 
60destroot.destdir    prefix=${destroot}${prefix}
61destroot.target     install-strip
62
63post-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
76variant proj {
77    depends_lib-append port:proj
78    configure.env-append CPPFLAGS=-DPJ_LIB__
79    configure.args-append --with-libproj4=${prefix}
80}
81