dev-util/ply: add static-libs USE flag
authorJakov Smolic <jakov.smolic@sartura.hr>
Wed, 20 May 2020 22:25:59 +0000 (00:25 +0200)
committerZac Medico <zmedico@gentoo.org>
Wed, 20 May 2020 23:14:25 +0000 (16:14 -0700)
Closes: https://github.com/gentoo/gentoo/pull/15896
Closes: https://bugs.gentoo.org/724300
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Jakov Smolic <jakov.smolic@sartura.hr>
Signed-off-by: Zac Medico <zmedico@gentoo.org>
dev-util/ply/ply-2.1.1.ebuild

index 3721bd7bdb018660bfed04cd8a5ec4003d59fd58..55bfd433e22012ef8e441bd0465a807a8c7bece6 100644 (file)
@@ -12,6 +12,7 @@ SRC_URI="https://github.com/iovisor/ply/archive/${PV}.tar.gz -> ${P}.tar.gz"
 LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+IUSE="static-libs"
 
 pkg_pretend() {
        local CONFIG_CHECK="~BPF ~BPF_SYSCALL ~NET_CLS_BPF ~NET_ACT_BPF
@@ -29,4 +30,8 @@ src_prepare() {
 src_install() {
        default
        rm -f "${ED}/usr/share/doc/${P}/COPYING"
+
+       if ! use static-libs; then
+               find "${D}" -type f -name '*.a' -delete || die
+       fi
 }