summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2017-12-23 19:37:39 +0100
committerDavid Seifert <soap@gentoo.org>2017-12-23 19:45:28 +0100
commita1b05c071c6654e2c96dac44a6b2e599a56a42c7 (patch)
tree5cd8ab5f2785ff472c95f0db395c2ebe412cf6f8 /sci-biology
parentprofiles: mask portmap instead of rpcbind (diff)
downloadgentoo-a1b05c071c6654e2c96dac44a6b2e599a56a42c7.tar.gz
gentoo-a1b05c071c6654e2c96dac44a6b2e599a56a42c7.tar.bz2
gentoo-a1b05c071c6654e2c96dac44a6b2e599a56a42c7.zip
sci-biology/bamtools: Add support for static libraries
Package-Manager: Portage-2.3.19, Repoman-2.3.6
Diffstat (limited to 'sci-biology')
-rw-r--r--sci-biology/bamtools/bamtools-9999.ebuild38
1 files changed, 36 insertions, 2 deletions
diff --git a/sci-biology/bamtools/bamtools-9999.ebuild b/sci-biology/bamtools/bamtools-9999.ebuild
index bd0157db0d1..ba21654b97f 100644
--- a/sci-biology/bamtools/bamtools-9999.ebuild
+++ b/sci-biology/bamtools/bamtools-9999.ebuild
@@ -3,7 +3,7 @@
EAPI=6
-inherit cmake-utils
+inherit cmake-utils multibuild
DESCRIPTION="A programmer's API and an end-user's toolkit for handling BAM files"
HOMEPAGE="https://github.com/pezmaster31/bamtools"
@@ -18,6 +18,7 @@ fi
LICENSE="MIT"
SLOT="0/${PV}" # no stable ABI yet
+IUSE="static-libs"
RDEPEND="
>=dev-libs/jsoncpp-1.8.0:=
@@ -25,7 +26,13 @@ RDEPEND="
DEPEND="${RDEPEND}
virtual/pkgconfig"
-mycmakeargs=( -DBUILD_SHARED_LIBS=ON )
+pkg_setup() {
+ [[ ${MERGE_TYPE} != binary ]] &&
+ MULTIBUILD_VARIANTS=(
+ $(usev static-libs)
+ shared
+ )
+}
src_prepare() {
# delete bundled libs, just to be safe
@@ -33,3 +40,30 @@ src_prepare() {
cmake-utils_src_prepare
}
+
+src_configure() {
+ my_configure() {
+ case "${MULTIBUILD_ID}" in
+ static*)
+ local mycmakeargs=( -DBUILD_SHARED_LIBS=OFF )
+ ;;
+ shared)
+ local mycmakeargs=( -DBUILD_SHARED_LIBS=ON )
+ ;;
+ *)
+ die "${MULTIBUILD_ID} is not recognized"
+ ;;
+ esac
+
+ cmake-utils_src_configure
+ }
+ multibuild_foreach_variant my_configure
+}
+
+src_compile() {
+ multibuild_foreach_variant cmake-utils_src_compile
+}
+
+src_install() {
+ multibuild_foreach_variant cmake-utils_src_install
+}