summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sci-geosciences/gmt')
-rw-r--r--sci-geosciences/gmt/Manifest1
-rw-r--r--sci-geosciences/gmt/gmt-6.4.0.ebuild94
2 files changed, 95 insertions, 0 deletions
diff --git a/sci-geosciences/gmt/Manifest b/sci-geosciences/gmt/Manifest
index af97b4e37c1b..3683afa881c4 100644
--- a/sci-geosciences/gmt/Manifest
+++ b/sci-geosciences/gmt/Manifest
@@ -2,3 +2,4 @@ DIST gmt-4.5.18-non-gpl-src.tar.bz2 103378 BLAKE2B 3a52b547940f3e79a6dd8076b8279
DIST gmt-4.5.18-src.tar.bz2 39791396 BLAKE2B 2199c337707773f91c3372992821f35a4e2d0f7451881507d29798425d914e82cc8d038fee43e6a44bbc18190619134906424f4d5ca3261af69d43934661fd90 SHA512 6d28ac29049c480d22063bbbcdb0cacf2c620e817eda19435e9b1bc0a899acf062296530f1fc677c77472fafaa6b1e6c443aaf8def7505847ed4afdd5c972945
DIST gmt-5.4.4-src.tar.xz 105073748 BLAKE2B bd083eeb1a71c5a2e554edadb7d8b9160f9b6d8e7510358b55d31b5f147d6719dbe8ce75510ffd844e74b787b7a6a6498fe5dfdd40755c7e6a28c018c024139b SHA512 cd22f65e7efc1704b06a5e94523af6a3b949dfe9339875abf805f1d00db6533d963ea61afc69d443e21b8070608e2043d712ffad74d1228c758f549f1ac46c22
DIST gmt-6.3.0-src.tar.xz 55396792 BLAKE2B b0b69506119caadcba5f5faf471b52009edadedc5104c60a540829aeb9c7786305d4760ba76d625f19adfc5f86c86dd10284876dfbceb055bdd78541862ebd32 SHA512 e02709b28f5940d92bfb4ddd9dcadd7c0e88d2973faa55732638e220cd23962ee605046bdf163b439f11379cb4665a178ab1ec4314dc897b6c5ee029b16aa2a5
+DIST gmt-6.4.0-src.tar.xz 55875004 BLAKE2B 887ea35708d354f3812822b1effd4906ead129a186b0117930bb46e057671645e3d2eec3e0a104aa3e06092c6c28857f5dba2c8828b61847e618651eeaa5f146 SHA512 0748215cbe9138a0ec3c7168019fee438e53c1d80a836caa33fa82d4d5ba30525e636a4a937ab9cb1c90cf07181c610f7ebcb5e844f0019f51523613878f7e40
diff --git a/sci-geosciences/gmt/gmt-6.4.0.ebuild b/sci-geosciences/gmt/gmt-6.4.0.ebuild
new file mode 100644
index 000000000000..47ef90d65d6e
--- /dev/null
+++ b/sci-geosciences/gmt/gmt-6.4.0.ebuild
@@ -0,0 +1,94 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit bash-completion-r1 cmake
+
+DESCRIPTION="Powerful map generator"
+HOMEPAGE="https://www.generic-mapping-tools.org"
+SRC_URI="https://github.com/GenericMappingTools/${PN}/releases/download/${PV}/${P}-src.tar.xz"
+
+LICENSE="GPL-3+ gmttria? ( Artistic )"
+SLOT="6"
+KEYWORDS="~amd64 ~x86"
+IUSE="blas +fftw ffmpeg +gdal geos gmttria lapack openmp pcre threads zlib"
+
+DEPEND="
+ app-text/ghostscript-gpl:=
+ media-gfx/graphicsmagick:=
+ net-misc/curl
+ >=sci-libs/netcdf-4.1:=[hdf5]
+ media-video/ffmpeg:=
+ blas? ( virtual/blas )
+ fftw? ( sci-libs/fftw:3.0= )
+ gdal? ( sci-libs/gdal:= )
+ geos? ( sci-libs/geos )
+ lapack? ( virtual/lapack )
+ pcre? ( dev-libs/libpcre2 )
+ zlib? ( sys-libs/zlib:= )
+"
+RDEPEND="${DEPEND}
+ !sci-biology/probcons
+ sci-geosciences/dcw-gmt
+ sci-geosciences/gshhg-gmt
+"
+
+src_prepare() {
+ cmake_src_prepare
+ # Rename man pages to avoid a name conflict with gmt5
+ pushd man_release || die
+ local m c suffix newc
+ for m in *.gz; do
+ c=${m%%.*}
+ suffix=${m#*.}
+ if [[ "${c}" == "gmt" ]]; then
+ newc=gmt${SLOT}
+ else
+ newc=gmt${SLOT}_${c}
+ fi
+ mv "${c}.${suffix}" "${newc}.${suffix}" || die
+ done
+ popd || die
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DGMT_DATADIR="share/${P}"
+ -DGMT_DOCDIR="share/doc/${PF}"
+ -DGMT_MANDIR="share/man"
+ -DLICENSE_RESTRICTED=$(usex gmttria no yes)
+ -DGMT_ENABLE_OPENMP=$(usex openmp)
+ -DGMT_USE_THREADS=$(usex threads)
+ -DGMT_INSTALL_TRADITIONAL_FOLDERNAMES=OFF # Install bash completions properly
+ -DGMT_INSTALL_MODULE_LINKS=OFF # Don't install symlinks on gmt binary, they are conflicted with gmt5
+ -DGMT_INSTALL_NAME_SUFFIX="${SLOT}"
+ -DBASH_COMPLETION_DIR="$(get_bashcompdir)"
+ -DCMAKE_DISABLE_FIND_PACKAGE_PCRE=ON
+ $(cmake_use_find_package blas BLAS)
+ $(cmake_use_find_package gdal GDAL)
+ $(cmake_use_find_package geos GEOS)
+ $(cmake_use_find_package fftw FFTW3)
+ $(cmake_use_find_package lapack LAPACK)
+ $(cmake_use_find_package pcre PCRE2)
+ $(cmake_use_find_package zlib ZLIB)
+ )
+
+ cmake_src_configure
+}
+
+src_install() {
+ cmake_src_install
+ docompress -x /usr/share/doc/${PF}/examples
+ docompress -x /usr/share/doc/${PF}/tutorial
+
+ # remove conflicting symlink
+ rm "${ED}/usr/bin/gmt" || die
+ rm "${ED}/usr/$(get_libdir)/libgmt.so" || die
+ rm "${ED}/usr/$(get_libdir)/libpostscriptlight.so" || die
+
+ # Decompress manuals
+ find "${ED}/usr/share/man" -name "*.gz" -exec gunzip {} + || die
+ # Rename bash completion file
+ mv "${D}$(get_bashcompdir)/gmt_completion.bash" "${D}$(get_bashcompdir)/gmt${SLOT}" || die
+}