commit:     e27625bafd1ff9d1e04b6e8b308638723531ee4c
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Fri Oct  8 12:26:59 2021 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Mon Oct 11 00:39:12 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e27625ba

games-engines/box2d: unbundle doctest to fix tests with glibc-2.34

Skipping leaving a bugref in the ebuild not to imply this should be
removed after it's fixed with glibc-2.34 (upstream has bumped
doctest in upcoming version, but may as well use system's anyway).

While not the cleanest, use a symlink to avoid patching files.

Closes: https://bugs.gentoo.org/806342
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 games-engines/box2d/box2d-2.4.1.ebuild | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/games-engines/box2d/box2d-2.4.1.ebuild 
b/games-engines/box2d/box2d-2.4.1.ebuild
index 0fe84b500b2..aa15726dd78 100644
--- a/games-engines/box2d/box2d-2.4.1.ebuild
+++ b/games-engines/box2d/box2d-2.4.1.ebuild
@@ -15,8 +15,17 @@ KEYWORDS="amd64 ~arm ~arm64 ~ppc64 x86"
 IUSE="doc test"
 RESTRICT="!test? ( test )"
 
+DEPEND="test? ( dev-cpp/doctest )"
 BDEPEND="doc? ( app-doc/doxygen )"
 
+src_prepare() {
+       cmake_src_prepare
+
+       # unbundle doctest
+       rm unit-test/doctest.h || die
+       ln -s "${ESYSROOT}"/usr/include/doctest/doctest.h unit-test/ || die
+}
+
 src_configure() {
        local mycmakeargs=(
                -DBOX2D_BUILD_TESTBED=OFF # bundled libs, broken anyway right 
now

Reply via email to