summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Le Cuirot <chewi@gentoo.org>2022-03-04 22:48:21 +0000
committerJames Le Cuirot <chewi@gentoo.org>2022-03-04 22:48:21 +0000
commitc15ae9c2d0bcb0f0277b878f82e9b64ed186e67b (patch)
treebf48215b2e68198223e96eab93108d065a37c918 /games-engines
parentdev-libs/expat: 2.4.7 (diff)
downloadgentoo-c15ae9c2d0bcb0f0277b878f82e9b64ed186e67b.tar.gz
gentoo-c15ae9c2d0bcb0f0277b878f82e9b64ed186e67b.tar.bz2
gentoo-c15ae9c2d0bcb0f0277b878f82e9b64ed186e67b.zip
games-engines/odamex: Patch to fix musl issue
Closes: https://bugs.gentoo.org/831788 Signed-off-by: James Le Cuirot <chewi@gentoo.org>
Diffstat (limited to 'games-engines')
-rw-r--r--games-engines/odamex/files/odamex-10.0.0-musl.patch60
-rw-r--r--games-engines/odamex/odamex-0.9.5.ebuild1
2 files changed, 61 insertions, 0 deletions
diff --git a/games-engines/odamex/files/odamex-10.0.0-musl.patch b/games-engines/odamex/files/odamex-10.0.0-musl.patch
new file mode 100644
index 000000000000..92af6ad305bd
--- /dev/null
+++ b/games-engines/odamex/files/odamex-10.0.0-musl.patch
@@ -0,0 +1,60 @@
+From b87798fe9fed746e98871aaa10978324e4b9378f Mon Sep 17 00:00:00 2001
+From: James Le Cuirot <chewi@gentoo.org>
+Date: Tue, 1 Mar 2022 21:29:32 +0000
+Subject: [PATCH] Fix musl build by checking whether execinfo.h's backtrace is
+ present
+
+Closes: https://github.com/odamex/odamex/issues/533
+(cherry picked from commit df3f5976416d342198879db80e4bf35f69eb2ed7)
+---
+ common/CMakeLists.txt | 9 +++++++++
+ common/i_crash_noop.cpp | 2 +-
+ common/i_crash_posix.cpp | 2 +-
+ 3 files changed, 11 insertions(+), 2 deletions(-)
+
+diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt
+index 2850607e5..8d02b3212 100644
+--- a/common/CMakeLists.txt
++++ b/common/CMakeLists.txt
+@@ -6,3 +6,12 @@ configure_file(git_describe.h.in "${CMAKE_CURRENT_BINARY_DIR}/git_describe.h")
+ add_library(odamex-common INTERFACE)
+ target_sources(odamex-common INTERFACE ${COMMON_SOURCES} ${COMMON_HEADERS})
+ target_include_directories(odamex-common INTERFACE . ${CMAKE_CURRENT_BINARY_DIR})
++
++if(UNIX)
++ include(CheckSymbolExists)
++ check_symbol_exists(backtrace "execinfo.h" HAVE_BACKTRACE)
++
++ if(HAVE_BACKTRACE)
++ target_compile_definitions(odamex-common INTERFACE HAVE_BACKTRACE)
++ endif()
++endif()
+diff --git a/common/i_crash_noop.cpp b/common/i_crash_noop.cpp
+index 4eb8e70f4..84a406fb3 100644
+--- a/common/i_crash_noop.cpp
++++ b/common/i_crash_noop.cpp
+@@ -23,7 +23,7 @@
+
+
+ #if defined _WIN32 && !defined _XBOX && defined _MSC_VER && !defined _DEBUG
+-#elif defined UNIX && !defined GEKKO
++#elif defined UNIX && defined HAVE_BACKTRACE && !defined GEKKO
+ #else
+
+ #include "odamex.h"
+diff --git a/common/i_crash_posix.cpp b/common/i_crash_posix.cpp
+index 8e6270872..4bf8727f6 100644
+--- a/common/i_crash_posix.cpp
++++ b/common/i_crash_posix.cpp
+@@ -22,7 +22,7 @@
+ //-----------------------------------------------------------------------------
+
+
+-#if defined UNIX && !defined GCONSOLE
++#if defined UNIX && defined HAVE_BACKTRACE && !defined GCONSOLE
+
+ #include "odamex.h"
+
+--
+2.34.1
+
diff --git a/games-engines/odamex/odamex-0.9.5.ebuild b/games-engines/odamex/odamex-0.9.5.ebuild
index 56b4b013e2cf..eb8519c9e40f 100644
--- a/games-engines/odamex/odamex-0.9.5.ebuild
+++ b/games-engines/odamex/odamex-0.9.5.ebuild
@@ -36,6 +36,7 @@ S="${WORKDIR}/${PN}-src-${PV}"
PATCHES=(
"${FILESDIR}/${PN}-0.9.0-Unbundle-miniupnpc.patch"
+ "${FILESDIR}/${PN}-10.0.0-musl.patch"
)
src_prepare() {