commit:     a1cc0bbf78ace25982570994ef1eac6a0093c46e
Author:     Samuel Bauer <samuel.bauer <AT> yahoo <DOT> fr>
AuthorDate: Mon May  3 19:35:27 2021 +0000
Commit:     Samuel Bauer <samuel.bauer <AT> yahoo <DOT> fr>
CommitDate: Mon May  3 19:35:27 2021 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=a1cc0bbf

games-action/blackvoxel: integrate work from #787074 in live ebuild

Signed-off-by: Samuel Bauer <samuel.bauer <AT> yahoo.fr>

 games-action/blackvoxel/blackvoxel-9999.ebuild | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/games-action/blackvoxel/blackvoxel-9999.ebuild 
b/games-action/blackvoxel/blackvoxel-9999.ebuild
index d20271cef..2cdbbd8db 100644
--- a/games-action/blackvoxel/blackvoxel-9999.ebuild
+++ b/games-action/blackvoxel/blackvoxel-9999.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=7
 
-inherit git-r3
+inherit git-r3 toolchain-funcs
 
 DESCRIPTION="Blackvoxel Video Game"
 HOMEPAGE="https://www.blackvoxel.com/";
@@ -30,11 +30,22 @@ src_prepare() {
        sed -i -e 's/LDFLAGS=/LDFLAGS+= /' -e '/LDFLAGS/s/-s -zrelro //' \
                -e '/(CPU_BITS)/ { s/; make //; s/cd/+make -C/}' \
                -e '/CFLAGS+/d' -e 's/CFLAGS=/CFLAGS+=/' \
+               -e '/^CC=/d' -e 's/^LD=/CXX?=/' \
+               -e 's/CFLAGS/CXXFLAGS/g' -e 's/\$(CC)/$(CXX)/' \
+               -e 's/\$(LD)/$(CXX)/' \
                Makefile || die
+       sed -i -e 's/\<gcc\>/$(CC)/' -e 's/\<g++\>/$(CXX)/' \
+               -e 's/\<ar\>/$(AR)/' src/sc_Squirrel3/squirrel/Makefile \
+               src/sc_Squirrel3/sqstdlib/Makefile \
+               src/sc_Squirrel3/sq/Makefile || die
        default
 }
 
 src_compile() {
+       export CXX="$(tc-getCXX)"
+       export CC="$(tc-getCC)"
+       export AR="$(tc-getAR)"
+
        emake blackvoxeldatadir="/usr/share/${PN}" bindir="/usr/bin"
 }
 

Reply via email to