summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Tsoy <alexander@tsoy.me>2022-04-26 01:04:00 +0300
committerSam James <sam@gentoo.org>2022-04-26 05:13:01 +0100
commitb17a1ad38a204f915a59f2df1fb63b3029d8fc43 (patch)
treea7802a593ccadcd33716c659b39a6b840eaeb88a /games-fps
parentprofiles/arch/s390: mask sci-libs/hdf5[szip] (diff)
downloadgentoo-b17a1ad38a204f915a59f2df1fb63b3029d8fc43.tar.gz
gentoo-b17a1ad38a204f915a59f2df1fb63b3029d8fc43.tar.bz2
gentoo-b17a1ad38a204f915a59f2df1fb63b3029d8fc43.zip
games-fps/yamagi-quake2: fix musl build
Closes: https://bugs.gentoo.org/831793 Signed-off-by: Alexander Tsoy <alexander@tsoy.me> Closes: https://github.com/gentoo/gentoo/pull/25204 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'games-fps')
-rw-r--r--games-fps/yamagi-quake2/files/yamagi-quake2-8.01-execinfo.patch49
-rw-r--r--games-fps/yamagi-quake2/yamagi-quake2-8.01.ebuild3
2 files changed, 52 insertions, 0 deletions
diff --git a/games-fps/yamagi-quake2/files/yamagi-quake2-8.01-execinfo.patch b/games-fps/yamagi-quake2/files/yamagi-quake2-8.01-execinfo.patch
new file mode 100644
index 000000000000..40de2342fa8e
--- /dev/null
+++ b/games-fps/yamagi-quake2/files/yamagi-quake2-8.01-execinfo.patch
@@ -0,0 +1,49 @@
+From e4a23de95ac1b1333a8f349a1ead82999bca3862 Mon Sep 17 00:00:00 2001
+From: Alexander Tsoy <alexander@tsoy.me>
+Date: Sun, 17 Apr 2022 17:07:28 +0300
+Subject: [PATCH] build: Make execinfo optional
+
+---
+ Makefile | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/Makefile b/Makefile
+index 3f9d72ce..99048a82 100644
+--- a/Makefile
++++ b/Makefile
+@@ -62,6 +62,8 @@ WITH_SYSTEMWIDE:=no
+ # MUST NOT be surrounded by quotation marks!
+ WITH_SYSTEMDIR:=""
+
++WITH_EXECINFO:=yes
++
+ # This will set the build options to create an MacOS .app-bundle.
+ # The app-bundle itself will not be created, but the runtime paths
+ # will be set to expect the game-data in *.app/
+@@ -406,6 +408,7 @@ config:
+ @echo "WITH_RPATH = $(WITH_RPATH)"
+ @echo "WITH_SYSTEMWIDE = $(WITH_SYSTEMWIDE)"
+ @echo "WITH_SYSTEMDIR = $(WITH_SYSTEMDIR)"
++ @echo "WITH_EXECINFO = $(WITH_EXECINFO)"
+ @echo "============================"
+ @echo ""
+
+@@ -492,6 +495,7 @@ release/quake2 : CFLAGS += -DUSE_OPENAL -DDEFAULT_OPENAL_DRIVER='"libopenal.so.1
+ endif
+ endif
+
++ifeq ($(WITH_EXECINFO),yes)
+ ifeq ($(YQ2_OSTYPE), Linux)
+ release/quake2 : CFLAGS += -DHAVE_EXECINFO
+ endif
+@@ -523,6 +527,7 @@ ifeq ($(YQ2_OSTYPE), Haiku)
+ release/quake2 : CFLAGS += -DHAVE_EXECINFO
+ release/quake2 : LDLIBS += -lexecinfo
+ endif
++endif
+
+ ifeq ($(WITH_RPATH),yes)
+ ifeq ($(YQ2_OSTYPE), Darwin)
+--
+2.35.1
+
diff --git a/games-fps/yamagi-quake2/yamagi-quake2-8.01.ebuild b/games-fps/yamagi-quake2/yamagi-quake2-8.01.ebuild
index 2b7bbeeab057..12f94411a485 100644
--- a/games-fps/yamagi-quake2/yamagi-quake2-8.01.ebuild
+++ b/games-fps/yamagi-quake2/yamagi-quake2-8.01.ebuild
@@ -43,6 +43,8 @@ DEPEND="${RDEPEND}
client? ( vulkan? ( dev-util/vulkan-headers ) )
"
+PATCHES=( "${FILESDIR}"/${PN}-8.01-execinfo.patch )
+
DOCS=( CHANGELOG README.md doc )
src_compile() {
@@ -51,6 +53,7 @@ src_compile() {
local targets=( game )
local emakeargs=(
VERBOSE=1
+ WITH_EXECINFO=$(usex elibc_musl no yes)
WITH_SYSTEMWIDE=yes
WITH_SYSTEMDIR="${EPREFIX}"/usr/share/quake2
WITH_OPENAL=$(usex openal)