/
Portfile
109 lines (94 loc) · 3.92 KB
/
Portfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# -*- 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
# $Id$
PortSystem 1.0
PortGroup cmake 1.0
name gmt5
version 5.1.1
categories science
platforms darwin
maintainers eprofs.de:florian \
takeshi
license GPL-3
description The Generic Mapping Tools
long_description GMT is an open source collection of ~120 tools \
for manipulating geographic and Cartesian data sets and \
producing PostScript illustrations ranging from simple x-y \
plots via contour maps to artificially illuminated surfaces \
and 3D perspective views.
homepage http://gmt.soest.hawaii.edu/
master_sites ftp://ftp.soest.hawaii.edu/gmt \
ftp://ibis.grdl.noaa.gov/pub/gmt \
ftp://ftp.iris.washington.edu/pub/gmt \
ftp://ftp.iag.usp.br/pub/gmt \
ftp://ftp.geologi.uio.no/pub/gmt \
ftp://gd.tuwien.ac.at/pub/gmt \
ftp://ftp.scc.u-tokai.ac.jp/pub/gmt \
ftp://gmt.mirror.ac.za/pub/gmt
use_bzip2 yes
distname gmt-${version}
distfiles ${distname}-src${extract.suffix}
checksums md5 7995b9099c0927a60becfaa38e61685c \
sha1 ff64936dfdec8a57a89d29f505f27e435169d33f \
rmd160 969d6393942864cb73be78f2594645458b28a9b8
depends_lib port:dcw-gmt \
port:ghostscript \
port:gshhg-gmt \
port:netcdf \
default_variants +gdal +pcre
if {![variant_isset lgpl]} {
default_variants-append +nonfree
}
# CMake out-of-source build:
worksrcdir build
post-extract {
file mkdir ${worksrcpath}
}
# Mimic CMake's default FLAGS:
if {[variant_isset debug]} {
configure.optflags -O0
} else {
configure.optflags -O3
}
configure.cflags-append -fstrict-aliasing
configure.args-append -DDCW_ROOT=${prefix}/share/gmt/dcw \
-DGSHHG_ROOT=${prefix}/share/gmt/gshhg \
-DNETCDF_ROOT=${prefix} \
-DFFTW3_ROOT=off \
-DGDAL_ROOT=off \
-DPCRE_ROOT=off \
-DGMT_INSTALL_MODULE_LINKS=off \
-DGMT_INSTALL_TRADITIONAL_FOLDERNAMES=off \
-DLICENSE_RESTRICTED=GPL
# Location of sources relative to ${worksrcpath}:
configure.post_args ../${distname}
variant fftw3 description {Optional support for FFTW-3 library} {
depends_lib-append port:fftw-3-single
configure.args-delete -DFFTW3_ROOT=off
configure.args-append -DFFTW3_ROOT=${prefix}
}
variant gdal description {GDAL import support} {
depends_lib-append port:gdal
configure.args-delete -DGDAL_ROOT=off
configure.args-append -DGDAL_ROOT=${prefix}
}
variant pcre description {PCRE regular expression support} {
depends_lib-append port:pcre
configure.args-delete -DPCRE_ROOT=off
configure.args-append -DPCRE_ROOT=${prefix}
}
variant lgpl conflicts nonfree description {disallow use of GPL code, license will be LGPL} {
license-delete GPL-3
license-append LGPL-3
configure.args-delete -DLICENSE_RESTRICTED=GPL
configure.args-append -DLICENSE_RESTRICTED=LGPL
}
variant nonfree conflicts lgpl description {enable nonfree code, libraries and binaries \
will not be redistributable} {
license-delete GPL-3
license-append Restrictive
configure.args-delete -DLICENSE_RESTRICTED=GPL
configure.args-append -DLICENSE_RESTRICTED=no
}
livecheck.type regex
livecheck.url ${homepage}
livecheck.regex {(?i)gmt-(5\.[0-9]+\.[0-9a-z]+)<\/a>}