1 | # -*- 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 |
---|
2 | |
---|
3 | PortSystem 1.0 |
---|
4 | PortGroup cmake 1.0 |
---|
5 | PortGroup conflicts_build 1.0 |
---|
6 | PortGroup mpi 1.0 |
---|
7 | |
---|
8 | name gnudatalanguage |
---|
9 | version 0.9.7 |
---|
10 | revision 5 |
---|
11 | epoch 2 |
---|
12 | |
---|
13 | compilers.choose cc cxx |
---|
14 | mpi.setup -dragonegg |
---|
15 | |
---|
16 | categories math science |
---|
17 | maintainers takeshi |
---|
18 | license GPL-2 |
---|
19 | platforms darwin |
---|
20 | description a free IDL combatible incremental compiler |
---|
21 | long_description \ |
---|
22 | A free IDL (Interactive Data Language) compatible \ |
---|
23 | incremental compiler (ie. runs IDL programs). |
---|
24 | homepage http://gnudatalanguage.sourceforge.net/ |
---|
25 | master_sites sourceforge:${name}:gdl \ |
---|
26 | ftp://ftp.soest.hawaii.edu/pwessel/gshhs:gshhs |
---|
27 | set gdlsrc gdl-${version}.tgz |
---|
28 | set srcversion 1.13 |
---|
29 | set dataversion 2.1.0 |
---|
30 | set gshhssrc gshhs_${srcversion}_src.zip |
---|
31 | set gshhsdata gshhs_${dataversion}.zip |
---|
32 | distfiles ${gdlsrc}:gdl |
---|
33 | worksrcdir gdl-${version} |
---|
34 | |
---|
35 | checksums ${gdlsrc} \ |
---|
36 | rmd160 ad8382265146592e23bbae42e339d871d9e3a983 \ |
---|
37 | sha256 2b5945d06e4d95f01cb70a3c432ac2fa4c81e1b3ac7c02687a6704ab042a7e21 |
---|
38 | |
---|
39 | depends_build-append port:pkgconfig |
---|
40 | depends_lib port:zlib \ |
---|
41 | port:gsl \ |
---|
42 | port:ncurses \ |
---|
43 | port:readline \ |
---|
44 | port:plplot \ |
---|
45 | port:netcdf-cxx \ |
---|
46 | port:hdf4 \ |
---|
47 | port:hdf5 \ |
---|
48 | port:grib_api \ |
---|
49 | port:libproj4 \ |
---|
50 | port:GraphicsMagick \ |
---|
51 | port:xorg-libX11 \ |
---|
52 | port:udunits2 \ |
---|
53 | port:fftw-3 \ |
---|
54 | port:fftw-3-single \ |
---|
55 | port:cmsvlib \ |
---|
56 | port:pslib \ |
---|
57 | port:eigen3 \ |
---|
58 | port:gettext |
---|
59 | conflicts_build antlr |
---|
60 | |
---|
61 | #patchfiles patch-src-mpi.cpp.diff |
---|
62 | #post-patch { |
---|
63 | # # Avoid using heimdal's broken fnmatch.h |
---|
64 | # reinplace "s|<\\(fnmatch\.h\\)>|\"/usr/include/\\1\"|" ${worksrcpath}/src/file.cpp |
---|
65 | #} |
---|
66 | |
---|
67 | cmake.out_of_source yes |
---|
68 | |
---|
69 | configure.args-append -DEIGEN3DIR=${prefix} \ |
---|
70 | -DFFTW=ON \ |
---|
71 | -DFFTWDIR=${prefix} \ |
---|
72 | -DGRAPHICSMAGICK=ON \ |
---|
73 | -DGRAPHICSMAGICKDIR=${prefix} \ |
---|
74 | -DGRAPHICSMAGICK_INCLUDE_DIR=${prefix}/include/GraphicsMagick \ |
---|
75 | -DGRIB=ON \ |
---|
76 | -DGRIBDIR=${prefix} \ |
---|
77 | -DGRIB_INCLUDE_DIR=${prefix}/include \ |
---|
78 | -DGSHHS=OFF \ |
---|
79 | -DGSLDIR=${prefix} \ |
---|
80 | -DGSL_INCLUDE_DIR=${prefix}/include \ |
---|
81 | -DHDF5=ON \ |
---|
82 | -DHDF5_ROOT=${prefix} \ |
---|
83 | -DHDF=ON \ |
---|
84 | -DHDFDIR=${prefix} \ |
---|
85 | -DJASPERDIR=${prefix} \ |
---|
86 | -DJPEGDIR=${prefix} \ |
---|
87 | -DLIBPROJ4=ON \ |
---|
88 | -DLIBPROJ4DIR=${prefix} \ |
---|
89 | -DMAGICK=OFF \ |
---|
90 | -DMPICH=OFF \ |
---|
91 | -DNCURSESDIR=${prefix} \ |
---|
92 | -DNETCDF=ON \ |
---|
93 | -DNETCDFDIR=${prefix} \ |
---|
94 | -DOPENMP=OFF \ |
---|
95 | -DPLPLOTDIR=${prefix} \ |
---|
96 | -DPSLIB=ON \ |
---|
97 | -DPSLIBDIR=${prefix} \ |
---|
98 | -DPYTHON=OFF \ |
---|
99 | -DPYTHON_MODULE=OFF \ |
---|
100 | -DREADLINE=ON \ |
---|
101 | -DREADLINEDIR=${prefix} \ |
---|
102 | -DUDUNITS=ON \ |
---|
103 | -DUDUNITSDIR=${prefix} \ |
---|
104 | -DUDUNITS_INCLUDE_DIR=${prefix}/include/udunits2 \ |
---|
105 | -DWXWIDGETS=OFF \ |
---|
106 | -DX11DIR=${prefix} \ |
---|
107 | -DZLIBDIR=${prefix} \ |
---|
108 | -DCMAKE_OSX_DEPLOYMENT_TARGET="" |
---|
109 | configure.cxxflags-append \ |
---|
110 | -DPLPLOT_HAS_PLCALLBACK |
---|
111 | configure.ldflags-append \ |
---|
112 | -lintl |
---|
113 | |
---|
114 | test.run yes |
---|
115 | test.target check |
---|
116 | |
---|
117 | use_parallel_build yes |
---|
118 | |
---|
119 | post-destroot { |
---|
120 | xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name} |
---|
121 | foreach f {AUTHORS README} { |
---|
122 | file rename ${destroot}${prefix}/share/${name}/${f} \ |
---|
123 | ${destroot}${prefix}/share/doc/${name}/ |
---|
124 | } |
---|
125 | xinstall -m 644 -W ${worksrcpath} COPYING ChangeLog HACKING NEWS MAP_INSTALL TODO \ |
---|
126 | ${destroot}${prefix}/share/doc/${name} |
---|
127 | file copy ${worksrcpath}/testsuite ${destroot}${prefix}/share/${name}/ |
---|
128 | if {[variant_isset python27]} { |
---|
129 | xinstall -m 644 ${worksrcpath}/PYTHON.txt ${destroot}${prefix}/share/doc/${name} |
---|
130 | file copy ${worksrcpath}/src/py ${destroot}${prefix}/share/${name}/ |
---|
131 | } |
---|
132 | if {[variant_isset gshhs]} { |
---|
133 | xinstall -d ${destroot}${prefix}/share/gnudatalanguage/gshhs |
---|
134 | foreach f [glob ${workpath}/gshhs/*.b] { |
---|
135 | xinstall -m 644 ${f} ${destroot}${prefix}/share/gnudatalanguage/gshhs |
---|
136 | } |
---|
137 | } |
---|
138 | } |
---|
139 | |
---|
140 | pre-configure { |
---|
141 | if {[mpi_variant_isset]} { |
---|
142 | configure.args-delete -DMPICH=OFF |
---|
143 | configure.args-append -DMPICH=ON |
---|
144 | configure.args-append -DMPI_CXX_COMPILER=${mpi.cxx} \ |
---|
145 | -DMPI_C_COMPILER=${mpi.cc} |
---|
146 | } |
---|
147 | } |
---|
148 | |
---|
149 | # gnudatalanguage does not build against wxWidgets30. |
---|
150 | # wxWidget support is not actively developed. |
---|
151 | variant wxWidgets description {deprecated compatibility variant} { |
---|
152 | # supported_archs ppc i386 |
---|
153 | depends_lib-append port:wxWidgets-3.0 |
---|
154 | configure.args-delete -DWXWIDGETS=OFF |
---|
155 | configure.args-append -DWXWIDGETS=ON |
---|
156 | configure.args-append -DWXWIDGETSDIR=${frameworks_dir}/wxWidgets.framework/Versions/wxWidgets/3.0 |
---|
157 | # # http://wiki.finkproject.org/index.php/Fink:Packaging:Preparing_for_10.5#OpenGL_Bug |
---|
158 | # #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\" |
---|
159 | } |
---|
160 | |
---|
161 | if {[variant_isset python27]} { |
---|
162 | configure.args-delete -DPYTHON=OFF |
---|
163 | configure.args-append -DPYTHON=ON |
---|
164 | } |
---|
165 | |
---|
166 | variant python27 description {build with support for calling Python (2.7) from GDL (using numpy)} { |
---|
167 | depends_lib-append port:py27-numpy |
---|
168 | configure.args-append -DPYTHONDIR=${frameworks_dir}/Python.framework/Versions/2.7 \ |
---|
169 | -DPYTHONVERSION=2.7 |
---|
170 | } |
---|
171 | |
---|
172 | if {[gcc_variant_isset]} { |
---|
173 | configure.args-delete -DOPENMP=OFF |
---|
174 | configure.args-append -DOPENMP=ON |
---|
175 | # Detecting CXX compiler ABI info fails without this |
---|
176 | configure.args-append -D |
---|
177 | } |
---|
178 | |
---|
179 | variant gshhs description {build with support for GSHHS} { |
---|
180 | distfiles-append ${gshhssrc}:gshhs \ |
---|
181 | ${gshhsdata}:gshhs |
---|
182 | checksums-append \ |
---|
183 | ${gshhssrc} \ |
---|
184 | md5 714b729d90381a3b1b1df70b78b05f6e \ |
---|
185 | sha1 7cfb92dafd86b197c65ad6f6aaf797f6cd0ce55a \ |
---|
186 | rmd160 a397b3cc50d9e3a0a9736044deabd567059698b5 \ |
---|
187 | ${gshhsdata} \ |
---|
188 | md5 30d336f86228e2e2861a2ba91efa0857 \ |
---|
189 | sha1 fe14a1dcc7b863fb59ea00d9975b2499b669bd79 \ |
---|
190 | rmd160 f4ecd162cd4e60f3b03d02d22ab143184d026f34 |
---|
191 | extract.only ${gdlsrc} |
---|
192 | post-extract { |
---|
193 | system "cd ${workpath}; \ |
---|
194 | unzip ${distpath}/${gshhssrc} gshhs/gshhs.h; \ |
---|
195 | unzip ${distpath}/${gshhsdata}" |
---|
196 | } |
---|
197 | configure.args-delete -DGSHHS=OFF |
---|
198 | configure.args-append -DGSHHS=ON \ |
---|
199 | -DGSHHSDIR=${workpath}/gshhs |
---|
200 | } |
---|
201 | |
---|
202 | livecheck.regex /gdl-(\[0-9.\]+)${extract.suffix} |
---|