From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 7CCDB139083 for ; Sat, 23 Dec 2017 18:45:55 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9C4A8E0DE9; Sat, 23 Dec 2017 18:45:54 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 78C7AE0DE9 for ; Sat, 23 Dec 2017 18:45:53 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id D46663406D1 for ; Sat, 23 Dec 2017 18:45:51 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 71229AE8E for ; Sat, 23 Dec 2017 18:45:50 +0000 (UTC) From: "David Seifert" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "David Seifert" Message-ID: <1514054728.a1b05c071c6654e2c96dac44a6b2e599a56a42c7.soap@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sci-biology/bamtools/ X-VCS-Repository: repo/gentoo X-VCS-Files: sci-biology/bamtools/bamtools-9999.ebuild X-VCS-Directories: sci-biology/bamtools/ X-VCS-Committer: soap X-VCS-Committer-Name: David Seifert X-VCS-Revision: a1b05c071c6654e2c96dac44a6b2e599a56a42c7 X-VCS-Branch: master Date: Sat, 23 Dec 2017 18:45:50 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: ded3723e-6935-429d-bb3f-792f857c9108 X-Archives-Hash: 54b0f8b1d6780c85b9ab380121c415e8 commit: a1b05c071c6654e2c96dac44a6b2e599a56a42c7 Author: David Seifert gentoo org> AuthorDate: Sat Dec 23 18:37:39 2017 +0000 Commit: David Seifert gentoo org> CommitDate: Sat Dec 23 18:45:28 2017 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a1b05c07 sci-biology/bamtools: Add support for static libraries Package-Manager: Portage-2.3.19, Repoman-2.3.6 sci-biology/bamtools/bamtools-9999.ebuild | 38 +++++++++++++++++++++++++++++-- 1 file 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 +}