summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Le Cuirot <chewi@gentoo.org>2021-10-18 17:31:37 +0100
committerJames Le Cuirot <chewi@gentoo.org>2021-10-18 17:31:37 +0100
commit1a3cdc7e4e06d62b30c081c0e5c655414cb5a414 (patch)
tree7427701e0af8f0bed514fb704a70fed7295e29e4 /app-emulation/fs-uae
parentwww-servers/nginx-unit: Rebuild with new ruby when detected (diff)
downloadgentoo-1a3cdc7e4e06d62b30c081c0e5c655414cb5a414.tar.gz
gentoo-1a3cdc7e4e06d62b30c081c0e5c655414cb5a414.tar.bz2
gentoo-1a3cdc7e4e06d62b30c081c0e5c655414cb5a414.zip
app-emulation/fs-uae: Fix 3.1.35 build on musl
Closes: https://bugs.gentoo.org/818757 Signed-off-by: James Le Cuirot <chewi@gentoo.org>
Diffstat (limited to 'app-emulation/fs-uae')
-rw-r--r--app-emulation/fs-uae/files/fs-uae-3.1.35-deepbind.patch43
-rw-r--r--app-emulation/fs-uae/fs-uae-3.1.35.ebuild1
2 files changed, 44 insertions, 0 deletions
diff --git a/app-emulation/fs-uae/files/fs-uae-3.1.35-deepbind.patch b/app-emulation/fs-uae/files/fs-uae-3.1.35-deepbind.patch
new file mode 100644
index 000000000000..0a60301772f1
--- /dev/null
+++ b/app-emulation/fs-uae/files/fs-uae-3.1.35-deepbind.patch
@@ -0,0 +1,43 @@
+From c5b02df4598c5fbe7a034b67ee06c506abeb3828 Mon Sep 17 00:00:00 2001
+From: James Le Cuirot <chewi@gentoo.org>
+Date: Mon, 18 Oct 2021 10:22:09 +0100
+Subject: [PATCH] Don't assume RTLD_DEEPBIND is always present on Linux
+
+It's not supported by musl.
+---
+ configure.ac | 5 +++++
+ src/dlopen.cpp | 2 +-
+ 2 files changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 6e41d68e..2cac2dac 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -655,6 +655,11 @@ AC_CHECK_FUNCS([gettimeofday])
+ AC_CHECK_DECLS([CLOCK_MONOTONIC], [], [], [#include <time.h>])
+
+
++# RTLD_DEEPBIND is not supported by all C libraries.
++
++AC_CHECK_DECLS([RTLD_DEEPBIND], [], [], [#include <dlfcn.h>])
++
++
+ # Check for POSIX support.
+
+ AS_CASE([$host_os],
+diff --git a/src/dlopen.cpp b/src/dlopen.cpp
+index f79c401b..14edbc02 100644
+--- a/src/dlopen.cpp
++++ b/src/dlopen.cpp
+@@ -22,7 +22,7 @@ UAE_DLHANDLE uae_dlopen(const TCHAR *path)
+ }
+ #ifdef _WIN32
+ result = LoadLibrary(path);
+-#elif defined(LINUX)
++#elif HAVE_DECL_RTLD_DEEPBIND == 1
+ result = dlopen(path, RTLD_NOW | RTLD_DEEPBIND);
+ #else
+ result = dlopen(path, RTLD_NOW);
+--
+2.32.0
+
diff --git a/app-emulation/fs-uae/fs-uae-3.1.35.ebuild b/app-emulation/fs-uae/fs-uae-3.1.35.ebuild
index d60ff90041d6..be1afebd83dd 100644
--- a/app-emulation/fs-uae/fs-uae-3.1.35.ebuild
+++ b/app-emulation/fs-uae/fs-uae-3.1.35.ebuild
@@ -41,6 +41,7 @@ PATCHES=(
"${FILESDIR}"/${PN}-3.0.0-libmpeg2.patch
"${FILESDIR}"/${PN}-3.0.0-Xatom.h.patch
"${FILESDIR}"/${PN}-3.1.35-ar.patch
+ "${FILESDIR}"/${PN}-3.1.35-deepbind.patch
)
src_prepare() {