diff options
author | Mike Frysinger <vapier@chromium.org> | 2019-02-13 16:29:31 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2019-02-13 16:59:45 -0500 |
commit | 5f2c3de466deaef7c8faa73a5c0e4af0d1c52986 (patch) | |
tree | cd46433b525ef3824fb84c1a9aa9c73c8e1ec9d4 /sys-apps | |
parent | sys-apps/i2c-tools: add missing perl dep and make it optional (diff) | |
download | gentoo-5f2c3de466deaef7c8faa73a5c0e4af0d1c52986.tar.gz gentoo-5f2c3de466deaef7c8faa73a5c0e4af0d1c52986.tar.bz2 gentoo-5f2c3de466deaef7c8faa73a5c0e4af0d1c52986.zip |
sys-apps/i2c-tools: avoid compiling the static lib when possible
Rather than always build (but not use) the static lib and then delete it
during src_install, disable building it entirely to speed things up.
We also add support for static-only targets.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'sys-apps')
-rw-r--r-- | sys-apps/i2c-tools/i2c-tools-4.1-r1.ebuild | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/sys-apps/i2c-tools/i2c-tools-4.1-r1.ebuild b/sys-apps/i2c-tools/i2c-tools-4.1-r1.ebuild index 595a0ebccdd1..2127072c21bb 100644 --- a/sys-apps/i2c-tools/i2c-tools-4.1-r1.ebuild +++ b/sys-apps/i2c-tools/i2c-tools-4.1-r1.ebuild @@ -36,6 +36,17 @@ src_prepare() { src_configure() { use python && distutils-r1_src_configure + + # Always build & use dynamic libs if possible. + if tc-is-static-only ; then + export BUILD_DYNAMIC_LIB=0 + export USE_STATIC_LIB=1 + export BUILD_STATIC_LIB=1 + else + export BUILD_DYNAMIC_LIB=1 + export USE_STATIC_LIB=0 + export BUILD_STATIC_LIB=$(usex static-libs 1 0) + fi } src_compile() { @@ -67,8 +78,4 @@ src_install() { dodoc README* distutils-r1_src_install fi - - if ! use static-libs; then - rm -rf "${D}"/usr/$(get_libdir)/libi2c.a || die - fi } |