1 |
commit: c15ae9c2d0bcb0f0277b878f82e9b64ed186e67b |
2 |
Author: James Le Cuirot <chewi <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Mar 4 22:48:21 2022 +0000 |
4 |
Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Mar 4 22:48:21 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c15ae9c2 |
7 |
|
8 |
games-engines/odamex: Patch to fix musl issue |
9 |
|
10 |
Closes: https://bugs.gentoo.org/831788 |
11 |
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org> |
12 |
|
13 |
.../odamex/files/odamex-10.0.0-musl.patch | 60 ++++++++++++++++++++++ |
14 |
games-engines/odamex/odamex-0.9.5.ebuild | 1 + |
15 |
2 files changed, 61 insertions(+) |
16 |
|
17 |
diff --git a/games-engines/odamex/files/odamex-10.0.0-musl.patch b/games-engines/odamex/files/odamex-10.0.0-musl.patch |
18 |
new file mode 100644 |
19 |
index 000000000000..92af6ad305bd |
20 |
--- /dev/null |
21 |
+++ b/games-engines/odamex/files/odamex-10.0.0-musl.patch |
22 |
@@ -0,0 +1,60 @@ |
23 |
+From b87798fe9fed746e98871aaa10978324e4b9378f Mon Sep 17 00:00:00 2001 |
24 |
+From: James Le Cuirot <chewi@g.o> |
25 |
+Date: Tue, 1 Mar 2022 21:29:32 +0000 |
26 |
+Subject: [PATCH] Fix musl build by checking whether execinfo.h's backtrace is |
27 |
+ present |
28 |
+ |
29 |
+Closes: https://github.com/odamex/odamex/issues/533 |
30 |
+(cherry picked from commit df3f5976416d342198879db80e4bf35f69eb2ed7) |
31 |
+--- |
32 |
+ common/CMakeLists.txt | 9 +++++++++ |
33 |
+ common/i_crash_noop.cpp | 2 +- |
34 |
+ common/i_crash_posix.cpp | 2 +- |
35 |
+ 3 files changed, 11 insertions(+), 2 deletions(-) |
36 |
+ |
37 |
+diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt |
38 |
+index 2850607e5..8d02b3212 100644 |
39 |
+--- a/common/CMakeLists.txt |
40 |
++++ b/common/CMakeLists.txt |
41 |
+@@ -6,3 +6,12 @@ configure_file(git_describe.h.in "${CMAKE_CURRENT_BINARY_DIR}/git_describe.h") |
42 |
+ add_library(odamex-common INTERFACE) |
43 |
+ target_sources(odamex-common INTERFACE ${COMMON_SOURCES} ${COMMON_HEADERS}) |
44 |
+ target_include_directories(odamex-common INTERFACE . ${CMAKE_CURRENT_BINARY_DIR}) |
45 |
++ |
46 |
++if(UNIX) |
47 |
++ include(CheckSymbolExists) |
48 |
++ check_symbol_exists(backtrace "execinfo.h" HAVE_BACKTRACE) |
49 |
++ |
50 |
++ if(HAVE_BACKTRACE) |
51 |
++ target_compile_definitions(odamex-common INTERFACE HAVE_BACKTRACE) |
52 |
++ endif() |
53 |
++endif() |
54 |
+diff --git a/common/i_crash_noop.cpp b/common/i_crash_noop.cpp |
55 |
+index 4eb8e70f4..84a406fb3 100644 |
56 |
+--- a/common/i_crash_noop.cpp |
57 |
++++ b/common/i_crash_noop.cpp |
58 |
+@@ -23,7 +23,7 @@ |
59 |
+ |
60 |
+ |
61 |
+ #if defined _WIN32 && !defined _XBOX && defined _MSC_VER && !defined _DEBUG |
62 |
+-#elif defined UNIX && !defined GEKKO |
63 |
++#elif defined UNIX && defined HAVE_BACKTRACE && !defined GEKKO |
64 |
+ #else |
65 |
+ |
66 |
+ #include "odamex.h" |
67 |
+diff --git a/common/i_crash_posix.cpp b/common/i_crash_posix.cpp |
68 |
+index 8e6270872..4bf8727f6 100644 |
69 |
+--- a/common/i_crash_posix.cpp |
70 |
++++ b/common/i_crash_posix.cpp |
71 |
+@@ -22,7 +22,7 @@ |
72 |
+ //----------------------------------------------------------------------------- |
73 |
+ |
74 |
+ |
75 |
+-#if defined UNIX && !defined GCONSOLE |
76 |
++#if defined UNIX && defined HAVE_BACKTRACE && !defined GCONSOLE |
77 |
+ |
78 |
+ #include "odamex.h" |
79 |
+ |
80 |
+-- |
81 |
+2.34.1 |
82 |
+ |
83 |
|
84 |
diff --git a/games-engines/odamex/odamex-0.9.5.ebuild b/games-engines/odamex/odamex-0.9.5.ebuild |
85 |
index 56b4b013e2cf..eb8519c9e40f 100644 |
86 |
--- a/games-engines/odamex/odamex-0.9.5.ebuild |
87 |
+++ b/games-engines/odamex/odamex-0.9.5.ebuild |
88 |
@@ -36,6 +36,7 @@ S="${WORKDIR}/${PN}-src-${PV}" |
89 |
|
90 |
PATCHES=( |
91 |
"${FILESDIR}/${PN}-0.9.0-Unbundle-miniupnpc.patch" |
92 |
+ "${FILESDIR}/${PN}-10.0.0-musl.patch" |
93 |
) |
94 |
|
95 |
src_prepare() { |