diff options
author | Michael Uleysky <uleysky@gmail.com> | 2018-08-21 14:35:53 +1000 |
---|---|---|
committer | Andreas Sturmlechner <asturm@gentoo.org> | 2020-02-16 18:07:07 +0100 |
commit | c536857dc3ca88dc25936ad650c17a7591574df6 (patch) | |
tree | eefc797c6eed6069c9c985cb1b4be16b8223fe26 /sci-geosciences | |
parent | sci-geosciences/gshhg-gmt: New package (diff) | |
download | gentoo-c536857dc3ca88dc25936ad650c17a7591574df6.tar.gz gentoo-c536857dc3ca88dc25936ad650c17a7591574df6.tar.bz2 gentoo-c536857dc3ca88dc25936ad650c17a7591574df6.zip |
sci-geosciences/gmt: DEPEND on gshhg-data, fine-grained doc USE
Add new flags that control the installation of documentation.
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'sci-geosciences')
-rw-r--r-- | sci-geosciences/gmt/gmt-4.5.18-r1.ebuild | 89 | ||||
-rw-r--r-- | sci-geosciences/gmt/metadata.xml | 3 |
2 files changed, 92 insertions, 0 deletions
diff --git a/sci-geosciences/gmt/gmt-4.5.18-r1.ebuild b/sci-geosciences/gmt/gmt-4.5.18-r1.ebuild new file mode 100644 index 000000000000..086f864b6b2b --- /dev/null +++ b/sci-geosciences/gmt/gmt-4.5.18-r1.ebuild @@ -0,0 +1,89 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit autotools + +DESCRIPTION="Powerful map generator" +HOMEPAGE="https://gmt.soest.hawaii.edu/" +SRC_URI=" + mirror://gmt/${P}-src.tar.bz2 + gmttria? ( mirror://gmt/${P}-non-gpl-src.tar.bz2 )" + +LICENSE="GPL-2+ gmttria? ( Artistic )" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="doc examples debug +gdal gmttria +gshhg htmldoc +metric mex +netcdf octave postscript tutorial" + +RDEPEND=" + !sci-biology/probcons + gdal? ( sci-libs/gdal ) + gshhg? ( sci-geosciences/gshhg-gmt ) + netcdf? ( >=sci-libs/netcdf-4.1 ) + octave? ( sci-mathematics/octave )" +DEPEND="${RDEPEND}" + +# mex can use matlab too which i can't test +REQUIRED_USE=" + mex? ( octave ) +" + +PATCHES=( + "${FILESDIR}"/${PN}-4.5.9-no-strip.patch + "${FILESDIR}"/${PN}-4.5.6-respect-ldflags.patch + ) + +src_configure() { + local myconf=( + --datadir=/usr/share/${P} + --includedir=/usr/include/${P} + --disable-update + --disable-matlab + --disable-xgrid + --disable-debug + $(use_enable gdal) + $(use_enable netcdf) + $(use_enable octave) + $(use_enable debug devdebug) + $(use_enable !metric US) + $(use_enable postscript eps) + $(use_enable mex) + $(use_enable gmttria triangle) + $(use_with gshhg gshhg-dir /usr/share/gshhg) + ) + econf "${myconf[@]}" +} + +src_compile() { + emake -j1 +} + +src_install() { + emake DESTDIR="${D}" -j1 install-all + einstalldocs + + # Remove various documentation + if ! use doc; then + rm -rf "${ED}/usr/share/doc/${PF}/pdf" || die + fi + + if use examples; then + docompress -x /usr/share/doc/${PF}/examples + else + rm -rf "${ED}/usr/share/doc/${PF}/examples" || die + fi + + if ! use htmldoc; then + rm -rf "${ED}/usr/share/doc/${PF}/html" || die + fi + + if use tutorial; then + docompress -x /usr/share/doc/${PF}/tutorial + else + rm -rf "${ED}/usr/share/doc/${PF}/tutorial" || die + fi + + # remove static libs + find "${ED}/usr/$(get_libdir)" -name '*.a' -delete || die +} diff --git a/sci-geosciences/gmt/metadata.xml b/sci-geosciences/gmt/metadata.xml index c31969b5f364..6c1818c1b495 100644 --- a/sci-geosciences/gmt/metadata.xml +++ b/sci-geosciences/gmt/metadata.xml @@ -10,8 +10,11 @@ <flag name="gmtfull">Full resolution bathymetry database</flag> <flag name="gmthigh">Add high resolution bathymetry database</flag> <flag name="gmttria">Non GNU triangulation method, more efficient</flag> + <flag name="gshhg">Install coastline database</flag> │······································································································ + <flag name="htmldoc">Install html documentation</flag> <flag name="metric">Use SI (cm) units instead of US (inches) ones</flag> <flag name="mex">Enable compilation of mex supplement which requires Octave/Matlab</flag> <flag name="octave">Enable octave support</flag> + <flag name="tutorial">Install data files for tutorial</flag> </use> </pkgmetadata> |