summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Le Cuirot <chewi@gentoo.org>2020-05-16 21:07:11 +0100
committerJames Le Cuirot <chewi@gentoo.org>2020-05-16 21:43:26 +0100
commit365bcd090bd85a3be7f7fa14205026e93170ace6 (patch)
tree6873132ad93e831a0d10fd6357a586434d7dcc40 /dev-games
parentprofiles: Mask dev-games/cegui[debug] on musl (diff)
downloadgentoo-365bcd090bd85a3be7f7fa14205026e93170ace6.tar.gz
gentoo-365bcd090bd85a3be7f7fa14205026e93170ace6.tar.bz2
gentoo-365bcd090bd85a3be7f7fa14205026e93170ace6.zip
dev-games/cegui: Fix build on musl
Now the problematic header is only needed when USE=debug and this has just been masked on musl. Closes: https://bugs.gentoo.org/715934 Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: James Le Cuirot <chewi@gentoo.org>
Diffstat (limited to 'dev-games')
-rw-r--r--dev-games/cegui/cegui-0.8.7-r1.ebuild1
-rw-r--r--dev-games/cegui/files/cegui-0.8.7-musl.patch72
2 files changed, 73 insertions, 0 deletions
diff --git a/dev-games/cegui/cegui-0.8.7-r1.ebuild b/dev-games/cegui/cegui-0.8.7-r1.ebuild
index 53693c9adf45..a9349feec0c7 100644
--- a/dev-games/cegui/cegui-0.8.7-r1.ebuild
+++ b/dev-games/cegui/cegui-0.8.7-r1.ebuild
@@ -61,6 +61,7 @@ DEPEND="${RDEPEND}
PATCHES=(
"${FILESDIR}"/${P}-icu-59.patch
"${FILESDIR}"/${P}-python3.patch
+ "${FILESDIR}"/${P}-musl.patch
)
pkg_setup() {
diff --git a/dev-games/cegui/files/cegui-0.8.7-musl.patch b/dev-games/cegui/files/cegui-0.8.7-musl.patch
new file mode 100644
index 000000000000..6eb62018dcfc
--- /dev/null
+++ b/dev-games/cegui/files/cegui-0.8.7-musl.patch
@@ -0,0 +1,72 @@
+From e7611d3ef0b9ab2e00f485030234dea3a58c7aa4 Mon Sep 17 00:00:00 2001
+From: James Le Cuirot <chewi@gentoo.org>
+Date: Sat, 16 May 2020 20:07:02 +0100
+Subject: [PATCH] Fix debug build and rework Exceptions includes logic
+
+Commit 3ddf92058392 broke the debug build. HAVE_EXECINFO_H is never
+defined by the build system so this header is never included, even
+when it is needed by the debug code.
+
+The right way to fix this is only to include these headers when debug
+is actually enabled. This does mean that the debug build is still
+broken under musl but fixing that would require using libunwind
+instead.
+---
+ cegui/src/Exceptions.cpp | 16 ++++------------
+ 1 file changed, 4 insertions(+), 12 deletions(-)
+
+diff --git a/cegui/src/Exceptions.cpp b/cegui/src/Exceptions.cpp
+index 138081a..934989e 100644
+--- a/cegui/src/Exceptions.cpp
++++ b/cegui/src/Exceptions.cpp
+@@ -33,12 +33,13 @@
+
+ #if defined( __WIN32__ ) || defined( _WIN32)
+ # include <windows.h>
++#elif defined(__ANDROID__)
++# include <android/log.h>
+ #endif
+
++#if defined(_DEBUG) || defined(DEBUG)
+ #if defined(_MSC_VER)
+ # include <dbghelp.h>
+-#elif defined(__ANDROID__)
+-# include <android/log.h>
+ #elif (defined(__linux__) && !defined(__ANDROID__)) \
+ || defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__) \
+ || defined(__HAIKU__)
+@@ -47,6 +48,7 @@
+ # include <cxxabi.h>
+ # include <cstdlib>
+ #endif
++#endif
+
+ // Start of CEGUI namespace section
+ namespace CEGUI
+@@ -57,14 +59,6 @@ bool Exception::d_stdErrEnabled(true);
+ //----------------------------------------------------------------------------//
+ static void dumpBacktrace(size_t frames)
+ {
+-
+-#if defined(__ANDROID__)
+-
+- // Not implemented yet.
+- CEGUI_UNUSED(frames);
+-
+-#else
+-
+ #if defined(_DEBUG) || defined(DEBUG)
+ #if defined(_MSC_VER)
+ SymSetOptions(SYMOPT_DEFERRED_LOADS | SYMOPT_INCLUDE_32BIT_MODULES);
+@@ -187,8 +181,6 @@ static void dumpBacktrace(size_t frames)
+
+ CEGUI_UNUSED(frames);
+
+-#endif
+-
+ #endif
+ }
+
+--
+2.26.2
+