From bfd60cbaa687a60219e7d6cf0bd4cbfac12c54ab Mon Sep 17 00:00:00 2001 From: Adam Pimentel Date: Tue, 14 Mar 2023 21:52:49 -0400 Subject: [PATCH] dev-libs/polyseed: conditionally build static-libs and test targets based on USE flags Closes: https://bugs.gentoo.org/901189 Signed-off-by: Adam Pimentel --- dev-libs/polyseed/polyseed-1.0.0.ebuild | 6 +++++- dev-libs/polyseed/polyseed-2.0.0.ebuild | 6 +++++- net-p2p/feather/feather-2.4.2.ebuild | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/dev-libs/polyseed/polyseed-1.0.0.ebuild b/dev-libs/polyseed/polyseed-1.0.0.ebuild index 34fd633979..34315cc389 100644 --- a/dev-libs/polyseed/polyseed-1.0.0.ebuild +++ b/dev-libs/polyseed/polyseed-1.0.0.ebuild @@ -12,5 +12,9 @@ SRC_URI="https://github.com/tevador/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P LICENSE="LGPL-3" SLOT="0" KEYWORDS="~amd64" -IUSE="" #todo: make test executible an optiona; USE flag +IUSE="static-libs test" BDEPEND="virtual/pkgconfig" + +src_compile() { + cmake_build polyseed $(usex "static-libs" "polyseed_static" "") $(usex "test" "polyseed-tests" "") +} diff --git a/dev-libs/polyseed/polyseed-2.0.0.ebuild b/dev-libs/polyseed/polyseed-2.0.0.ebuild index 34fd633979..34315cc389 100644 --- a/dev-libs/polyseed/polyseed-2.0.0.ebuild +++ b/dev-libs/polyseed/polyseed-2.0.0.ebuild @@ -12,5 +12,9 @@ SRC_URI="https://github.com/tevador/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P LICENSE="LGPL-3" SLOT="0" KEYWORDS="~amd64" -IUSE="" #todo: make test executible an optiona; USE flag +IUSE="static-libs test" BDEPEND="virtual/pkgconfig" + +src_compile() { + cmake_build polyseed $(usex "static-libs" "polyseed_static" "") $(usex "test" "polyseed-tests" "") +} diff --git a/net-p2p/feather/feather-2.4.2.ebuild b/net-p2p/feather/feather-2.4.2.ebuild index f2fb173316..54dbc41f48 100644 --- a/net-p2p/feather/feather-2.4.2.ebuild +++ b/net-p2p/feather/feather-2.4.2.ebuild @@ -44,7 +44,7 @@ DEPEND=" dev-libs/libsodium:= media-gfx/qrencode:= media-gfx/zbar:=[v4l] - >=dev-libs/polyseed-1.0.0 + =dev-libs/polyseed-1.0.0 dev-libs/libzip:= dev-libs/boost:=[nls] >=dev-qt/qtcore-5.15:5