dev-libs/libcgroup: avoid building tests when USE=-test
authorMike Frysinger <vapier@chromium.org>
Thu, 3 Jan 2019 09:14:47 +0000 (04:14 -0500)
committerMike Frysinger <vapier@gentoo.org>
Thu, 3 Jan 2019 09:14:58 +0000 (04:14 -0500)
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
dev-libs/libcgroup/libcgroup-0.41-r5.ebuild

index a4301a5acce23af8e2f201ec6ef36cbb05c40adb..6c2563903010be8ee72ac7bf8b76c2ffffed0e58 100644 (file)
@@ -12,7 +12,7 @@ SRC_URI="mirror://sourceforge/project/libcg/${PN}/v${PV}/${P}.tar.bz2"
 LICENSE="LGPL-2.1"
 SLOT="0"
 KEYWORDS="amd64 arm ~ppc ~ppc64 x86"
-IUSE="+daemon elibc_musl pam static-libs +tools"
+IUSE="+daemon elibc_musl pam static-libs test +tools"
 
 RDEPEND="pam? ( virtual/pam )"
 
@@ -51,6 +51,11 @@ src_prepare() {
                -i src/pam/Makefile.am || die "sed failed"
        sed -e 's#/var/run#/run#g' -i configure.in || die "sed failed"
 
+       # If we're not running tests, don't bother building them.
+       if ! use test; then
+               sed -i '/^SUBDIRS/s:tests::' Makefile.am || die
+       fi
+
        eautoreconf
 }