summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2021-03-01 10:54:33 +0000
committerSam James <sam@gentoo.org>2021-03-01 10:56:45 +0000
commitc0ca48ec9827893cd6ab278bd09bbc0865f61630 (patch)
tree1832178d00d3e00064eddf48cedc11af2efb29e2 /games-strategy/0ad
parentgames-strategy/0ad: fix build with >=virtual/rust-1.50 (diff)
downloadgentoo-c0ca48ec9827893cd6ab278bd09bbc0865f61630.tar.gz
gentoo-c0ca48ec9827893cd6ab278bd09bbc0865f61630.tar.bz2
gentoo-c0ca48ec9827893cd6ab278bd09bbc0865f61630.zip
games-strategy/0ad: fix AR/RANLIB usage
Closes: https://bugs.gentoo.org/773511 Closes: https://bugs.gentoo.org/773502 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'games-strategy/0ad')
-rw-r--r--games-strategy/0ad/0ad-0.0.24b_alpha.ebuild5
-rw-r--r--games-strategy/0ad/files/0ad-0.0.24b_alpha-respect-tc.patch32
2 files changed, 34 insertions, 3 deletions
diff --git a/games-strategy/0ad/0ad-0.0.24b_alpha.ebuild b/games-strategy/0ad/0ad-0.0.24b_alpha.ebuild
index 2e003b33f532..e75968721281 100644
--- a/games-strategy/0ad/0ad-0.0.24b_alpha.ebuild
+++ b/games-strategy/0ad/0ad-0.0.24b_alpha.ebuild
@@ -76,6 +76,7 @@ RDEPEND="
PATCHES=(
"${FILESDIR}"/${PN}-0.0.24_alpha_pre20210116040036-build.patch
"${FILESDIR}"/${PN}-0.0.24b_alpha-rust-1.50.patch
+ "${FILESDIR}"/${PN}-0.0.24b_alpha-respect-tc.patch
)
pkg_setup() {
@@ -106,7 +107,7 @@ src_configure() {
--datadir="/usr/share/${PN}"
)
- tc-export CC CXX
+ tc-export AR CC CXX RANLIB
# Stock premake5 does not work, use the shipped one
# TODO: revisit this, see above BDEPEND note re premake5
@@ -132,8 +133,6 @@ src_configure() {
}
src_compile() {
- tc-export AR
-
# Build 3rd party fcollada
einfo "Building bundled fcollada"
emake -C libraries/source/fcollada/src
diff --git a/games-strategy/0ad/files/0ad-0.0.24b_alpha-respect-tc.patch b/games-strategy/0ad/files/0ad-0.0.24b_alpha-respect-tc.patch
new file mode 100644
index 000000000000..7503ffc001b9
--- /dev/null
+++ b/games-strategy/0ad/files/0ad-0.0.24b_alpha-respect-tc.patch
@@ -0,0 +1,32 @@
+--- a/libraries/source/fcollada/src/Makefile
++++ b/libraries/source/fcollada/src/Makefile
+@@ -7,6 +7,7 @@
+ PIC_FLAGS ?= -fpic
+ endif
+
++AR? ?= ar
+ CXX ?= g++
+ CXXFLAGS += -fvisibility=hidden -W -Wall -Wno-unused-parameter -Wno-unused-function $(OS_DEFINE) $(PIC_FLAGS) $(CPPFLAGS)
+ CXXFLAGS_DEBUG := -D_DEBUG -DRETAIL
+@@ -16,6 +17,7 @@
+ LIBS += `pkg-config libxml-2.0 --libs`
+ INCLUDES += -IFCollada `pkg-config libxml-2.0 --cflags`
+ INCLUDES_TEST := -IFCollada/FColladaTest $(INCLUDES)
++RANLIB ?= ranlib
+
+ # FCollada is not aliasing-safe, so disallow dangerous optimisations
+ # (TODO: It'd be nice to fix FCollada, but that looks hard)
+@@ -246,11 +248,11 @@
+
+ output/libFColladaSD.a: $(OBJECTS_DEBUG) | output_dirs
+ @echo "$@"
+- @ar -cr $@ $(OBJECTS_DEBUG); ranlib $@
++ @$(AR) -cr $@ $(OBJECTS_DEBUG); $(RANLIB) $@
+
+ output/libFColladaSR.a: $(OBJECTS_RELEASE) | output_dirs
+ @echo "$@"
+- @ar -cr $@ $(OBJECTS_RELEASE); ranlib $@
++ @$(AR) -cr $@ $(OBJECTS_RELEASE); $(RANLIB) $@
+
+ output/FColladaTest: $(OBJECTS_TEST) | output_dirs
+ $(CXX) -o $@ $(OBJECTS_TEST) $(LIBS) $(LDFLAGS_TEST)