20 | | homepage http://www.soest.hawaii.edu/gmt5 |
21 | | master_sites ftp://ftp.soest.hawaii.edu/gmt5 \ |
22 | | ftp://ibis.grdl.noaa.gov/pub/gmt5 \ |
23 | | ftp://ftp.iris.washington.edu/pub/gmt5 \ |
24 | | ftp://ftp.iag.usp.br/pub/gmt5 \ |
25 | | ftp://ftp.geologi.uio.no/pub/gmt5 \ |
26 | | ftp://gd.tuwien.ac.at/pub/gmt5 \ |
27 | | ftp://ftp.scc.u-tokai.ac.jp/pub/gmt5 \ |
28 | | ftp://mirror.geosci.usyd.edu.au/pub/gmt5 \ |
29 | | ftp://gmt.mirror.ac.za/pub/gmt5 |
| 22 | homepage http://gmt.soest.hawaii.edu/ |
| 23 | master_sites ftp://ftp.soest.hawaii.edu/gmt \ |
| 24 | ftp://ibis.grdl.noaa.gov/pub/gmt \ |
| 25 | ftp://ftp.iris.washington.edu/pub/gmt \ |
| 26 | ftp://ftp.iag.usp.br/pub/gmt \ |
| 27 | ftp://ftp.geologi.uio.no/pub/gmt \ |
| 28 | ftp://gd.tuwien.ac.at/pub/gmt \ |
| 29 | ftp://ftp.scc.u-tokai.ac.jp/pub/gmt \ |
| 30 | ftp://gmt.mirror.ac.za/pub/gmt |
31 | | set gshhsversion 2.2.0 |
32 | | set gmtsrc gmt-${version}.tar.bz2 |
33 | | set gshhs gshhs-${gshhsversion}.tar.bz2 |
34 | | distfiles ${gmtsrc} ${gshhs} |
35 | | checksums ${gmtsrc} \ |
36 | | md5 c5b78de5edab4c42a8a08e7fcfa976b4 \ |
37 | | sha1 73b16b25e59fa1cd74bfc01bdeb8170924cbda0c \ |
38 | | rmd160 175a752b6a4027454a1163f638f2deb0abf62082 \ |
39 | | ${gshhs} \ |
40 | | md5 db98bff37adc0d51fdf0ffa3834d45ad \ |
41 | | sha1 786d58b9a335d3bacb37f40f21ee3bfbb424cd10 \ |
42 | | rmd160 aa744b2fdcdf849cc5c4abce97f1d29f4cdc20a4 |
| 32 | distname gmt-${version} |
| 33 | distfiles ${distname}-src${extract.suffix} |
| 34 | checksums md5 da741319c883a3dbaf27ec7eaf66c166 \ |
| 35 | sha1 3a68ac1ea273070822cc7f993a57983ec3da9b7f \ |
| 36 | rmd160 8c00d9eda5e0f9f2723caad0887df0b9e88a1f26 |
| 37 | |
| 38 | depends_lib port:dcw-gmt \ |
| 39 | port:gshhg-gmt-nc4 \ |
| 40 | port:netcdf \ |
49 | | # move GSHHS coastlines to worksrcpath |
50 | | system "mv ${workpath}/share/coast ${worksrcpath}/share && rmdir ${workpath}/share" |
51 | | system "mv ${workpath}/{LICENSE.TXT,README.TXT} ${worksrcpath}/share/coast" |
52 | | } |
53 | | |
54 | | configure.pre_args --prefix=${prefix}/lib/${name} |
55 | | configure.args --datarootdir=${prefix}/share/${name} \ |
56 | | --docdir=${prefix}/share/doc/${name} \ |
57 | | --mandir=${prefix}/share/doc/${name}/man \ |
58 | | --includedir=${prefix}/share/${name}/include \ |
59 | | --enable-shared \ |
60 | | --enable-flock \ |
61 | | --disable-xgrid \ |
62 | | --disable-mex |
63 | | configure.optflags-delete -O2 |
64 | | |
65 | | use_parallel_build no |
66 | | universal_variant no |
67 | | destroot.target install-all |
68 | | configure.ldflags-delete -L${prefix}/lib |
69 | | |
70 | | post-destroot { |
71 | | ln -s ../doc/${name} ${destroot}${prefix}/share/${name}/doc |
72 | | ln -s ../../share/doc/${name}/man ${destroot}${prefix}/lib/${name}/man |
73 | | ln -s ../../share/${name}/include ${destroot}${prefix}/lib/${name}/include |
74 | | ln -s ../../share/${name} ${destroot}${prefix}/lib/${name}/share |
75 | | } |
76 | | |
77 | | variant octave description {compiles Octave interface} { |
78 | | depends_lib-append path:bin/octave:octave |
79 | | configure.args-append --enable-octave |
| 47 | file mkdir ${worksrcpath} |
| 48 | } |
| 49 | |
| 50 | configure.optflags-delete -O2 \ |
| 51 | -Os |
| 52 | configure.universal_cflags |
| 53 | configure.universal_ldflags |
| 54 | |
| 55 | configure.args-append -DCMAKE_C_FLAGS_RELEASE="-O3 -DNDEBUG -fstrict-aliasing" \ |
| 56 | -DCMAKE_C_COMPILER=${configure.cc} \ |
| 57 | -DDCW_ROOT=${prefix} \ |
| 58 | -DGSHHG_ROOT=${prefix} \ |
| 59 | -DNETCDF_ROOT=${prefix} \ |
| 60 | -DFFTW3_ROOT=off \ |
| 61 | -DGDAL_ROOT=off \ |
| 62 | -DPCRE_ROOT=off \ |
| 63 | -DFLOCK=on \ |
| 64 | -DGMT_INSTALL_MODULE_LINKS=off \ |
| 65 | -DGMT_INSTALL_TRADITIONAL_FOLDERNAMES=off \ |
| 66 | -DLICENSE_RESTRICTED=GPL |
| 67 | |
| 68 | # Location of sources relative to ${worksrcpath}: |
| 69 | configure.post_args ../${distname} |
| 70 | |
| 71 | variant fftw3 description {Use FFTW-3 library} { |
| 72 | depends_lib-append port:fftw-3-single |
| 73 | configure.args-delete -DFFTW3_ROOT=off |
| 74 | configure.args-append -DFFTW3_ROOT=${prefix} |
91 | | livecheck.type regex |
92 | | livecheck.url http://www.soest.hawaii.edu/gmt5/gmt/gmt_home.html |
93 | | livecheck.regex {Current version is [^0-9 ]*([0-9]+\.[0-9]+\.[0-9a-z]+)} |
| 89 | variant lgpl conflicts nonfree description {disallow use of GPL code, license will be LGPL} { |
| 90 | license-delete GPL-3 |
| 91 | license-append LGPL-3 |
| 92 | configure.args-delete -DLICENSE_RESTRICTED=GPL |
| 93 | configure.args-append -DLICENSE_RESTRICTED=LGPL |
| 94 | } |
| 95 | |
| 96 | variant nonfree conflicts lgpl description {enable nonfree code, libraries and binaries \ |
| 97 | will not be redistributable} { |
| 98 | license-delete GPL-3 |
| 99 | license-append Restrictive |
| 100 | configure.args-delete -DLICENSE_RESTRICTED=GPL |
| 101 | configure.args-append -DLICENSE_RESTRICTED=no |
| 102 | } |