mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
games-engines/odamex: Patch to fix musl issue
Closes: https://bugs.gentoo.org/831788 Signed-off-by: James Le Cuirot <chewi@gentoo.org>
This commit is contained in:
60
games-engines/odamex/files/odamex-10.0.0-musl.patch
Normal file
60
games-engines/odamex/files/odamex-10.0.0-musl.patch
Normal file
@@ -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
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user