games-strategy/s25rttr: Allow tests to run with GCC as well as clang
authorJames Le Cuirot <chewi@gentoo.org>
Sun, 19 Apr 2020 15:31:14 +0000 (16:31 +0100)
committerJames Le Cuirot <chewi@gentoo.org>
Sun, 19 Apr 2020 15:31:14 +0000 (16:31 +0100)
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
games-strategy/s25rttr/s25rttr-0.9.0_pre20200418.ebuild

index 80e7682041a2df4272995e77790bc600fc3fe727..fb30534650564ada56fe09b9f23e716ea6515d09 100644 (file)
@@ -3,7 +3,7 @@
 
 EAPI=7
 
-inherit desktop xdg cmake
+inherit desktop toolchain-funcs xdg cmake
 
 DESCRIPTION="Open source remake of The Settlers II: Gold Edition (needs original data files)"
 HOMEPAGE="https://www.siedler25.org/"
@@ -97,10 +97,9 @@ src_configure() {
                -DRTTR_VERSION="${PV}"
        )
 
-       if use test ; then
-               einfo "Forcing clang due to USE=test."
-               CC=${CHOST}-clang
-               CXX=${CHOST}-clang++
+       if use test && tc-is-gcc; then
+               # Work around libasan and libsandbox both wanting to be first.
+               append-ldflags -static-libasan
        fi
 
        cmake_src_configure