source: trunk/dports/science/gmt5/Portfile

Last change on this file was 147230, checked in by cal@…, 20 months ago

ghostscript: 9.19, #49324

Update ghostscript to the latest release. Additionally,

  • declare the BSD license of the mappingresources incorporated into the package
  • change the homepage to ghostscript.com
  • update mappingresources to the latest version
  • use MacPorts' lcms2
  • remove use_parallel_build yes, which is the default
  • revbump all dependencies but gimp2-devel, gimp3-devel and goffice because the maintainer will take care of them (see #49324)

Closes #49324, #50475

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.6 KB
Line 
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# $Id: Portfile 147230 2016-03-31 19:52:33Z ryandesign@macports.org $
3
4PortSystem          1.0
5PortGroup           cmake 1.0
6
7name                gmt5
8version             5.2.1
9revision            2
10categories          science
11platforms           darwin
12maintainers         eprofs.de:florian \
13                    takeshi
14license             GPL-3
15description         The Generic Mapping Tools
16long_description GMT is an open source collection of ~120 tools \
17    for manipulating geographic and Cartesian data sets and     \
18    producing PostScript illustrations ranging from simple x-y  \
19    plots via contour maps to artificially illuminated surfaces \
20    and 3D perspective views.
21
22homepage            http://gmt.soest.hawaii.edu/
23master_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
31use_xz              yes
32distname            gmt-${version}
33distfiles           ${distname}-src${extract.suffix}
34checksums           rmd160  f6ae3a2c0e5e0d6d56bfee38de005fb12a032bf1 \
35                    sha256  01c199525bdfa78ad388959e739f34eca8effb8d82475c8786a066e04b5e19af
36
37depends_lib         port:dcw-gmt \
38                    port:ghostscript \
39                    port:gshhg-gmt \
40                    port:netcdf \
41
42default_variants    +gdal +pcre
43if {![variant_isset lgpl]} {
44    default_variants-append +nonfree
45}
46
47cmake.out_of_source yes
48patchfiles          patch-src-gmt_vector.c.diff
49
50# Mimic CMake's default FLAGS:
51if {[variant_isset debug]} {
52    configure.optflags      -O0
53} else {
54    # optflags deliberately unset:
55    configure.optflags
56    # Set CMAKE_BUILD_TYPE=RelWithDebInfo to get reliable backtraces:
57    configure.args-delete   -DCMAKE_BUILD_TYPE=Release
58    configure.args-append   -DCMAKE_BUILD_TYPE=RelWithDebInfo
59}
60
61configure.cflags-append     -fstrict-aliasing
62configure.args-append       -DDCW_ROOT=${prefix}/share/gmt/dcw \
63                            -DGSHHG_ROOT=${prefix}/share/gmt/gshhg \
64                            -DNETCDF_ROOT=${prefix} \
65                            -DFFTW3_ROOT=off \
66                            -DGDAL_ROOT=off \
67                            -DPCRE_ROOT=off \
68                            -DGMT_OPENMP=off \
69                            -DGMT_INSTALL_MODULE_LINKS=off \
70                            -DGMT_INSTALL_TRADITIONAL_FOLDERNAMES=off \
71                            -DLICENSE_RESTRICTED=GPL
72
73variant fftw3 description {Optional support for FFTW-3 library} {
74    depends_lib-append      port:fftw-3-single
75    configure.args-delete   -DFFTW3_ROOT=off
76    configure.args-append   -DFFTW3_ROOT=${prefix}
77}
78
79variant gdal description {GDAL import support} {
80    depends_lib-append      port:gdal
81    configure.args-delete   -DGDAL_ROOT=off
82    configure.args-append   -DGDAL_ROOT=${prefix}
83}
84
85variant pcre description {PCRE regular expression support} {
86    depends_lib-append      port:pcre
87    configure.args-delete   -DPCRE_ROOT=off
88    configure.args-append   -DPCRE_ROOT=${prefix}
89}
90
91variant openmp description {Enable experimental OpenMP parallel acceleration} {
92    configure.args-delete   -DGMT_OPENMP=off
93    configure.args-append   -DGMT_OPENMP=on
94
95    # FIXME: llvm-gcc42 is broken, https://trac.macports.org/ticket/40713
96    # Only clang really needs to be blacklisted
97    compiler.blacklist *gcc-4.2 *clang*
98    compiler.fallback macports-gcc-5 macports-gcc-4.9 macports-gcc-4.8 macports-gcc-4.7 macports-gcc-4.6 macports-gcc-4.5 macports-gcc-4.4 macports-gcc-4.3
99
100    # Needed for compiling with GCC and Accelerate Framework on OSX:
101    configure.cflags-append -flax-vector-conversions
102}
103
104variant lgpl conflicts nonfree description {disallow use of GPL code, license will be LGPL} {
105    license-delete          GPL-3
106    license-append          LGPL-3
107    configure.args-delete   -DLICENSE_RESTRICTED=GPL
108    configure.args-append   -DLICENSE_RESTRICTED=LGPL
109}
110
111variant nonfree conflicts lgpl description {enable nonfree code, libraries and binaries \
112    will not be redistributable} {
113    license-delete          GPL-3
114    license-append          Restrictive
115    configure.args-delete   -DLICENSE_RESTRICTED=GPL
116    configure.args-append   -DLICENSE_RESTRICTED=no
117}
118
119livecheck.type      regex
120livecheck.url       ${homepage}
121livecheck.regex     {(?i)gmt-(5\.[0-9]+\.[0-9a-z]+)<\/a>}
Note: See TracBrowser for help on using the repository browser.