commit:     5cc5c7fb11496e6e03f78fd423091738c349cbb5
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 17 20:03:42 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Feb 17 20:18:23 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5cc5c7fb

dev-libs/json-c: build tests conditionally

72->16 targets. Nice!

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-libs/json-c/json-c-0.18.ebuild | 6 ++++--
 dev-libs/json-c/json-c-9999.ebuild | 6 ++++--
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/dev-libs/json-c/json-c-0.18.ebuild 
b/dev-libs/json-c/json-c-0.18.ebuild
index 5f6b3ef8717f..997463b97256 100644
--- a/dev-libs/json-c/json-c-0.18.ebuild
+++ b/dev-libs/json-c/json-c-0.18.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -21,7 +21,8 @@ LICENSE="MIT"
 # .1 is a fudge factor for 0.18 fixing compat w/ 0.16, drop on next
 # SONAME change.
 SLOT="0/5.1"
-IUSE="cpu_flags_x86_rdrand doc static-libs threads"
+IUSE="cpu_flags_x86_rdrand doc static-libs test threads"
+RESTRICT="!test? ( test )"
 
 BDEPEND="doc? ( >=app-text/doxygen-1.8.13 )"
 
@@ -42,6 +43,7 @@ multilib_src_configure() {
                -DDISABLE_WERROR=ON
                -DENABLE_RDRAND=$(usex cpu_flags_x86_rdrand)
                -DENABLE_THREADING=$(usex threads)
+               -DBUILD_TESTING=$(usex test)
        )
 
        cmake_src_configure

diff --git a/dev-libs/json-c/json-c-9999.ebuild 
b/dev-libs/json-c/json-c-9999.ebuild
index 582ba35e41c2..95c54f504c3d 100644
--- a/dev-libs/json-c/json-c-9999.ebuild
+++ b/dev-libs/json-c/json-c-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -21,7 +21,8 @@ LICENSE="MIT"
 # .1 is a fudge factor for 0.18 fixing compat w/ 0.16, drop on next
 # SONAME change.
 SLOT="0/5.1"
-IUSE="cpu_flags_x86_rdrand doc static-libs threads"
+IUSE="cpu_flags_x86_rdrand doc static-libs test threads"
+RESTRICT="!test? ( test )"
 
 BDEPEND="doc? ( >=app-text/doxygen-1.8.13 )"
 
@@ -42,6 +43,7 @@ multilib_src_configure() {
                -DDISABLE_WERROR=ON
                -DENABLE_RDRAND=$(usex cpu_flags_x86_rdrand)
                -DENABLE_THREADING=$(usex threads)
+               -DBUILD_TESTING=$(usex test)
        )
 
        cmake_src_configure

Reply via email to