summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-06-06 05:02:26 +0100
committerSam James <sam@gentoo.org>2023-06-06 05:02:26 +0100
commitfe98a4171f21caa41ec6b9bcba9d1b3f0f5aa6f7 (patch)
tree25bd04c4a79cbbaa2c63dd99ecba3a881351d43a /sys-apps
parentsys-apps/dtc: use HTTPS for git (diff)
downloadgentoo-fe98a4171f21caa41ec6b9bcba9d1b3f0f5aa6f7.tar.gz
gentoo-fe98a4171f21caa41ec6b9bcba9d1b3f0f5aa6f7.tar.bz2
gentoo-fe98a4171f21caa41ec6b9bcba9d1b3f0f5aa6f7.zip
sys-apps/dtc: conditionally build tests
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sys-apps')
-rw-r--r--sys-apps/dtc/dtc-1.7.0.ebuild12
-rw-r--r--sys-apps/dtc/dtc-9999.ebuild12
2 files changed, 22 insertions, 2 deletions
diff --git a/sys-apps/dtc/dtc-1.7.0.ebuild b/sys-apps/dtc/dtc-1.7.0.ebuild
index 3c46abe827ed..117f6b36238e 100644
--- a/sys-apps/dtc/dtc-1.7.0.ebuild
+++ b/sys-apps/dtc/dtc-1.7.0.ebuild
@@ -18,7 +18,8 @@ HOMEPAGE="https://devicetree.org/ https://git.kernel.org/cgit/utils/dtc/dtc.git/
LICENSE="GPL-2"
SLOT="0"
-IUSE="static-libs yaml"
+IUSE="static-libs test yaml"
+RESTRICT="!test? ( test )"
BDEPEND="
sys-devel/bison
@@ -39,10 +40,19 @@ PATCHES=(
"${FILESDIR}"/${P}-meson-macos.patch
)
+src_prepare() {
+ default
+
+ if ! use test ; then
+ sed -i -e "/subdir('tests')/d" meson.build || die
+ fi
+}
+
src_configure() {
local emesonargs=(
-Ddefault_library=$(usex static-libs both shared)
-Dpython=disabled
+ -Dtools=true
-Dvalgrind=disabled # only used for some tests
$(meson_feature yaml)
)
diff --git a/sys-apps/dtc/dtc-9999.ebuild b/sys-apps/dtc/dtc-9999.ebuild
index b1873ee6eac6..ce10f9e3b775 100644
--- a/sys-apps/dtc/dtc-9999.ebuild
+++ b/sys-apps/dtc/dtc-9999.ebuild
@@ -18,7 +18,8 @@ HOMEPAGE="https://devicetree.org/ https://git.kernel.org/cgit/utils/dtc/dtc.git/
LICENSE="GPL-2"
SLOT="0"
-IUSE="static-libs yaml"
+IUSE="static-libs test yaml"
+RESTRICT="!test? ( test )"
BDEPEND="
sys-devel/bison
@@ -34,10 +35,19 @@ DOCS=(
Documentation/manual.txt
)
+src_prepare() {
+ default
+
+ if ! use test ; then
+ sed -i -e "/subdir('tests')/d" meson.build || die
+ fi
+}
+
src_configure() {
local emesonargs=(
-Ddefault_library=$(usex static-libs both shared)
-Dpython=disabled
+ -Dtools=true
-Dvalgrind=disabled # only used for some tests
$(meson_feature yaml)
)