diff options
author | Andreas Sturmlechner <asturm@gentoo.org> | 2018-07-07 13:19:18 +0200 |
---|---|---|
committer | Andreas Sturmlechner <asturm@gentoo.org> | 2018-07-07 13:19:46 +0200 |
commit | 5ad64bacd7734640632b4589cdca60d2748dd462 (patch) | |
tree | 2b128c9a2c48d666d77cf40fceb6681e53b4261b /dev-libs/double-conversion | |
parent | dev-libs/libressl: arm stable, bug #658158 (diff) | |
download | gentoo-5ad64bacd7734640632b4589cdca60d2748dd462.tar.gz gentoo-5ad64bacd7734640632b4589cdca60d2748dd462.tar.bz2 gentoo-5ad64bacd7734640632b4589cdca60d2748dd462.zip |
dev-libs/double-conversion: Add USE=static-libs via multibuild
Package-Manager: Portage-2.3.41, Repoman-2.3.9
Diffstat (limited to 'dev-libs/double-conversion')
-rw-r--r-- | dev-libs/double-conversion/double-conversion-3.0.0-r1.ebuild | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/dev-libs/double-conversion/double-conversion-3.0.0-r1.ebuild b/dev-libs/double-conversion/double-conversion-3.0.0-r1.ebuild new file mode 100644 index 000000000000..786bdf2fd13a --- /dev/null +++ b/dev-libs/double-conversion/double-conversion-3.0.0-r1.ebuild @@ -0,0 +1,53 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit cmake-utils multibuild + +DESCRIPTION="Binary-decimal and decimal-binary conversion routines for IEEE doubles" +HOMEPAGE="https://github.com/google/double-conversion" +SRC_URI="https://github.com/google/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="BSD" +SLOT="0/1" +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~amd64-linux ~x86-linux" +IUSE="static-libs test" + +pkg_setup() { + MULTIBUILD_VARIANTS=( shared $(usev static-libs) ) +} + +src_configure() { + myconfigure() { + local mycmakeargs=( -DBUILD_TESTING=$(usex test) ) + if [[ ${MULTIBUILD_VARIANT} = shared ]]; then + mycmakeargs+=( -DBUILD_SHARED_LIBS=ON ) + fi + if [[ ${MULTIBUILD_VARIANT} = static-libs ]]; then + mycmakeargs+=( -DBUILD_SHARED_LIBS=OFF ) + fi + + cmake-utils_src_configure + } + + multibuild_foreach_variant myconfigure +} + +src_compile() { + multibuild_foreach_variant cmake-utils_src_compile +} + +src_test() { + [[ ${MULTIBUILD_VARIANT} = shared ]] && cmake-utils_src_test +} + +src_install() { + myinstall() { + [[ ${MULTIBUILD_VARIANT} = shared ]] && cmake-utils_src_install + [[ ${MULTIBUILD_VARIANT} = static-libs ]] && \ + dolib ${BUILD_DIR}/double-conversion/libdouble-conversion.a + } + + multibuild_foreach_variant myinstall +} |