media-libs/lib3ds: Conditionally install static libs with USE flag
authorJames Le Cuirot <chewi@gentoo.org>
Tue, 1 Oct 2019 21:51:38 +0000 (22:51 +0100)
committerJames Le Cuirot <chewi@gentoo.org>
Tue, 1 Oct 2019 21:52:33 +0000 (22:52 +0100)
Closes: https://bugs.gentoo.org/485552
Closes: https://github.com/gentoo/gentoo/pull/13084
Package-Manager: Portage-2.3.76, Repoman-2.3.17
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
media-libs/lib3ds/lib3ds-2.0.0_rc1-r1.ebuild

index c8e2db13f631d2a7514cdb0ab0dfa37052982059..b663c12a29cfdb31a15aceaffbf9ef2907f1bf4d 100644 (file)
@@ -12,7 +12,7 @@ SRC_URI="https://lib3ds.googlecode.com/files/${MY_P}.zip"
 LICENSE="LGPL-2.1+"
 SLOT="0"
 KEYWORDS="~amd64 ~arm64 ~ppc ~ppc64 ~x86"
-IUSE=""
+IUSE="static-libs"
 
 BDEPEND="app-arch/unzip"
 
@@ -21,3 +21,15 @@ S="${WORKDIR}/${MY_P}"
 PATCHES=(
        "${FILESDIR}"/${P}-underlinking-no-autoreconf.patch
 )
+
+src_configure() {
+       econf $(use_enable static-libs static)
+}
+
+src_install() {
+       default
+
+       if ! use static-libs; then
+               rm "${ED}/usr/$(get_libdir)/${PN}.la" || die
+       fi
+}