commit:     102d9b22dc3c74927226fe3fa7b3a39eb4b1a012
Author:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Mon Apr  3 20:12:31 2023 +0000
Commit:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Mon Apr  3 20:12:31 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=102d9b22

dev-libs/libdispatch: add USE=test

build system unconditionally was evaluating BUILD_TESTING as true

this leads to build failures in one of the test deps on some arches.

/usr/bin/powerpc64le-unknown-linux-gnu-ld.bfd: 
tests/libbsdtests.a(bsdtests.c.o): in function `test_ptr_null_format':
bsdtests.c:(.text+0x1d8): undefined reference to `vsnprintf.inline'
/usr/bin/powerpc64le-unknown-linux-gnu-ld.bfd: 
tests/libbsdtests.a(bsdtests.c.o): in function `test_ptr_notnull_format':
bsdtests.c:(.text+0x478): undefined reference to `vsnprintf.inline'
/usr/bin/powerpc64le-unknown-linux-gnu-ld.bfd: 
tests/libbsdtests.a(bsdtests.c.o): in function `test_ptr_format':
bsdtests.c:(.text+0x72c): undefined reference to `vsnprintf.inline'
/usr/bin/powerpc64le-unknown-linux-gnu-ld.bfd: 
tests/libbsdtests.a(bsdtests.c.o): in function `test_ptr_not_format':
bsdtests.c:(.text+0x9dc): undefined reference to `vsnprintf.inline'
/usr/bin/powerpc64le-unknown-linux-gnu-ld.bfd: 
tests/libbsdtests.a(bsdtests.c.o): in function `test_uint32_format':
bsdtests.c:(.text+0xc8c): undefined reference to `vsnprintf.inline'
/usr/bin/powerpc64le-unknown-linux-gnu-ld.bfd: 
tests/libbsdtests.a(bsdtests.c.o):bsdtests.c:(.text+0xf3c): more undefined 
references to `vsnprintf.inline' follow

explicitly passing -DBUILD_TESTINF=OFF allows to skip building and
linking offending test.
Library works well on ppc64le, just the test does not build with 128bit
ieee-long-double toolchain due to old headers somewhere in test deps.

The actual falure will still be visible with FEATURES="test"
but only on ppc64le systems with USE=ieee-long-double toolchain.

Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>

 dev-libs/libdispatch/libdispatch-5.7.1.ebuild | 4 ++++
 dev-libs/libdispatch/libdispatch-5.7.3.ebuild | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/dev-libs/libdispatch/libdispatch-5.7.1.ebuild 
b/dev-libs/libdispatch/libdispatch-5.7.1.ebuild
index c0c209226f47..da9e6411f534 100644
--- a/dev-libs/libdispatch/libdispatch-5.7.1.ebuild
+++ b/dev-libs/libdispatch/libdispatch-5.7.1.ebuild
@@ -15,6 +15,9 @@ 
SRC_URI="https://github.com/apple/${MY_PN}/archive/${MY_PV}.tar.gz -> ${P}.tar.g
 LICENSE="Apache-2.0"
 SLOT="0"
 KEYWORDS="amd64 ~arm64 ppc64 ~riscv x86"
+IUSE="test"
+
+RESTRICT="!test? ( test )"
 
 DEPEND="
        !gnustep-base/libobjc2
@@ -49,5 +52,6 @@ src_configure () {
        export HOST_CXX="$(tc-getBUILD_CXX)"
        tc-export CC CXX LD AR NM OBJDUMP RANLIB PKG_CONFIG
 
+       local mycmakeargs=( -DBUILD_TESTING=$(usex test) )
        cmake_src_configure
 }

diff --git a/dev-libs/libdispatch/libdispatch-5.7.3.ebuild 
b/dev-libs/libdispatch/libdispatch-5.7.3.ebuild
index 33616ad732de..95454fe7e805 100644
--- a/dev-libs/libdispatch/libdispatch-5.7.3.ebuild
+++ b/dev-libs/libdispatch/libdispatch-5.7.3.ebuild
@@ -15,6 +15,9 @@ 
SRC_URI="https://github.com/apple/${MY_PN}/archive/${MY_PV}.tar.gz -> ${P}.tar.g
 LICENSE="Apache-2.0"
 SLOT="0"
 KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv ~x86"
+IUSE="test"
+
+RESTRICT="!test? ( test )"
 
 DEPEND="
        !gnustep-base/libobjc2
@@ -49,5 +52,6 @@ src_configure () {
        export HOST_CXX="$(tc-getBUILD_CXX)"
        tc-export CC CXX LD AR NM OBJDUMP RANLIB PKG_CONFIG
 
+       local mycmakeargs=( -DBUILD_TESTING=$(usex test) )
        cmake_src_configure
 }

Reply via email to