mirror of
https://github.com/macports/macports-ports.git
synced 2026-07-12 18:20:25 -07:00
libgdal.dylib’s install_name is changing from libgdal.38.dylib to libgdal.39.dylib in this update. Procedure: gsed -i -E -e 's/^( *revision +)([0-9]+)(.*)$/echo "\1$((\2+1))\3"/e' $(grep -c '^ *revision ' $(git grep -l port:gdal | grep -v '^gis/gdal/' | grep -v '^python/py-gdal/') | grep ':1$' | cut -d: -f1) with manual handling for ports with more than one revision line: grep -c '^ *revision ' $(git grep -l port:gdal | grep -v '^gis/gdal/' | grep -v '^python/py-gdal/') | grep -v ':1$' | cut -d: -f1 qgis3 and saga were omitted per https://github.com/macports/macports-ports/pull/32926#issuecomment-4592025368. liblas was omitted per https://github.com/macports/macports-ports/pull/32926#issuecomment-4595124162. [skip ci]
136 lines
5.3 KiB
Tcl
136 lines
5.3 KiB
Tcl
# -*- 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
|
|
|
|
PortSystem 1.0
|
|
PortGroup cmake 1.1
|
|
PortGroup github 1.0
|
|
|
|
name gmt6
|
|
github.setup GenericMappingTools gmt 6.6.0
|
|
github.tarball_from releases
|
|
distname ${github.project}-${github.version}-src
|
|
revision 2
|
|
epoch 1
|
|
|
|
categories science
|
|
maintainers {me.com:remko.scharroo @remkos} openmaintainer
|
|
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 https://www.generic-mapping-tools.org/
|
|
master_sites https://github.com/GenericMappingTools/gmt/releases/download/${version} \
|
|
ftp://ftp.soest.hawaii.edu/gmt \
|
|
ftp://ftp.star.nesdis.noaa.gov/pub/sod/lsa/gmt \
|
|
ftp://ftp.iris.washington.edu/pub/gmt \
|
|
ftp://ftp.iag.usp.br/pub/gmt \
|
|
ftp://gmt.mirror.ac.za/gmt \
|
|
http://mirrors.ustc.edu.cn/gmt \
|
|
http://www.scc.u-tokai.ac.jp/gmt
|
|
use_xz yes
|
|
distname gmt-${version}
|
|
distfiles ${distname}-src${extract.suffix}
|
|
|
|
checksums rmd160 70d58506e93abcd1b5242860558c247fa344ffda \
|
|
sha256 18ac98b11b8fc924463ce5138385c02e9426780fba9ff63a991e2e8ecdbd1082 \
|
|
size 15363892
|
|
|
|
depends_lib port:curl \
|
|
port:dcw-gmt \
|
|
port:ghostscript \
|
|
port:gshhg-gmt \
|
|
port:netcdf
|
|
|
|
default_variants +gdal +pcre
|
|
if {![variant_isset lgpl]} {
|
|
default_variants-append +nonfree
|
|
}
|
|
|
|
cmake.install_prefix ${prefix}/lib/${subport}
|
|
|
|
# Mimic CMake's default FLAGS:
|
|
if {[variant_isset debug]} {
|
|
configure.optflags -O0
|
|
} else {
|
|
# optflags deliberately unset:
|
|
configure.optflags
|
|
# Set CMAKE_BUILD_TYPE=RelWithDebInfo to get reliable backtraces:
|
|
configure.args-replace -DCMAKE_BUILD_TYPE=Release -DCMAKE_BUILD_TYPE=RelWithDebInfo
|
|
}
|
|
|
|
configure.cflags-append -fstrict-aliasing
|
|
configure.args-append -DDCW_ROOT=${prefix}/share/gmt/dcw \
|
|
-DCOPY_DCW=off \
|
|
-DGSHHG_ROOT=${prefix}/share/gmt/gshhg \
|
|
-DCOPY_GSHHG=off \
|
|
-DGS_ROOT=${prefix} \
|
|
-DNETCDF_ROOT=${prefix} \
|
|
-DCURL_ROOT=${prefix} \
|
|
-DFFTW3_ROOT=off \
|
|
-DGDAL_ROOT=off \
|
|
-DPCRE_ROOT=off \
|
|
-DGMT_OPENMP=off \
|
|
-DGMT_INSTALL_MODULE_LINKS=off \
|
|
-DGMT_INSTALL_TRADITIONAL_FOLDERNAMES=off \
|
|
-DLICENSE_RESTRICTED=GPL
|
|
|
|
post-destroot {
|
|
foreach l {gmt postscriptlight} {
|
|
file delete ${destroot}${prefix}/lib/${subport}/bin/lib${l}.${version}.dylib
|
|
}
|
|
ln -s ${prefix}/lib/${subport}/bin/gmt ${destroot}${prefix}/bin/${subport}
|
|
}
|
|
|
|
variant fftw3 description {Optional support for FFTW-3 library} {
|
|
depends_lib-append port:fftw-3-single
|
|
configure.args-replace -DFFTW3_ROOT=off -DFFTW3_ROOT=${prefix}
|
|
}
|
|
|
|
variant gdal description {GDAL import support} {
|
|
depends_lib-append port:gdal
|
|
configure.args-replace -DGDAL_ROOT=off -DGDAL_ROOT=${prefix}
|
|
}
|
|
|
|
variant pcre description {PCRE regular expression support} {
|
|
depends_lib-append port:pcre
|
|
configure.args-replace -DPCRE_ROOT=off -DPCRE_ROOT=${prefix}
|
|
}
|
|
|
|
variant openmp description {Enable experimental OpenMP parallel acceleration} {
|
|
configure.args-replace -DGMT_OPENMP=off -DGMT_OPENMP=on
|
|
|
|
# FIXME: llvm-gcc42 is broken, https://trac.macports.org/ticket/40713
|
|
# Only clang really needs to be blacklisted
|
|
compiler.blacklist *gcc-4.2 *clang*
|
|
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
|
|
|
|
# Needed for compiling with GCC and Accelerate Framework on OSX:
|
|
configure.cflags-append -flax-vector-conversions
|
|
}
|
|
|
|
variant lgpl conflicts nonfree description {disallow use of GPL code, license will be LGPL} {
|
|
license-replace GPL-3 LGPL-3
|
|
configure.args-replace -DLICENSE_RESTRICTED=GPL -DLICENSE_RESTRICTED=LGPL
|
|
}
|
|
|
|
variant nonfree conflicts lgpl description {enable nonfree code, libraries and binaries \
|
|
will not be redistributable} {
|
|
license-replace GPL-3 Restrictive
|
|
configure.args-replace -DLICENSE_RESTRICTED=GPL -DLICENSE_RESTRICTED=no
|
|
}
|
|
|
|
notes "
|
|
${subport} is installed in ${prefix}/lib/${subport}.
|
|
${prefix}/bin/${subport} is a symblic link to ${prefix}/lib/${subport}/bin/gmt.
|
|
"
|
|
|
|
# livecheck for the proper branch (5 or 6) and skipping any release candidates
|
|
set firstchar [string range ${version} 0 0]
|
|
livecheck.type regex
|
|
livecheck.url ${github.homepage}/releases/
|
|
livecheck.regex gmt-(${firstchar}\\.\[0-9]+\\.\[0-9]+)-src${extract.suffix}
|