# Copyright 1999-2016 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Id$ EAPI=5 inherit cmake-multilib bash-completion-r1 GSHHG="gshhg-gmt-2.3.4" DCW="dcw-gmt-1.1.2" DESCRIPTION="Powerful map generator" HOMEPAGE="http://gmt.soest.hawaii.edu/" SRC_URI=" mirror://gmt/${P}-src.tar.gz mirror://gmt/${GSHHG}.tar.gz mirror://gmt/${DCW}.tar.gz" LICENSE="LGPL-3 gpl? ( GPL-3 ) ( !gpl !lgpl ) Shewchuk" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="debug +fftw +gdal +gpl lgpl pcre +threads" RDEPEND=" !sci-biology/probcons fftw? ( sci-libs/fftw:3.0 ) gdal? ( sci-libs/gdal ) sci-libs/netcdf[hdf5] pcre? ( dev-libs/libpcre ) threads? ( dev-libs/glib:2 ) app-text/ghostscript-gpl" DEPEND="${RDEPEND}" REQUIRED_USE="?? ( gpl lgpl ( !gpl !lgpl ) )" src_configure() { license_restrict=off if use gpl ; then license_restrict=GPL elif use lgpl ; then license_restrict=LGPL fi local mycmakeargs=( -DGSHHG_ROOT="${WORKDIR}/${GSHHG}" -DDCW_ROOT="${WORKDIR}/${DCW}" -DLICENSE_RESTRICTED=${license_restrict} -DGMT_INSTALL_RELOCATABLE=true -DGMT_INSTALL_TRADITIONAL_FOLDERNAMES=off -DGMT_INSTALL_NAME_SUFFIX="-${PV}" `cmake-utils_use threads GMT_USE_THREADS` `cmake-utils_use_find_package pcre PCRE` `cmake-utils_use_find_package gdal GDAL` `cmake-utils_use_find_package fftw FFTW3` ) cmake-multilib_src_configure } src_install() { cmake-multilib_src_install # Install bash completion files dobashcomp "${D}/usr/etc/bash_completion.d/gmt" rm "${D}/usr/etc/bash_completion.d/gmt" rmdir "${D}/usr/etc/bash_completion.d" \ "${D}/usr/etc" }