pd: fix musl build
This commit is contained in:
parent
568d6745f8
commit
7f57dadfe2
2 changed files with 14 additions and 4 deletions
14
srcpkgs/pd/patches/musl-no-qsort_r.patch
Normal file
14
srcpkgs/pd/patches/musl-no-qsort_r.patch
Normal file
|
@ -0,0 +1,14 @@
|
|||
Index: src/x_text.c
|
||||
===================================================================
|
||||
--- src/x_text.c.orig
|
||||
+++ src/x_text.c
|
||||
@@ -475,7 +475,8 @@ equal:
|
||||
* Both are not available in Emscripten, Android or older MSVC versions.
|
||||
* 'stupid_sortcompare' is thread-safe but not reentrant.
|
||||
*/
|
||||
-#if defined(_WIN32) || defined(__EMSCRIPTEN__) || defined(__ANDROID__)
|
||||
+#if defined(_WIN32) || defined(__EMSCRIPTEN__) || defined(__ANDROID__) \
|
||||
+ || (defined(__linux__) && !defined(__GLIBC__))
|
||||
#define STUPID_SORT
|
||||
static PERTHREAD void *stupid_zkeyinfo;
|
||||
static int stupid_sortcompare(const void *z1, const void *z2)
|
|
@ -15,10 +15,6 @@ license="BSD-3-Clause"
|
|||
homepage="https://puredata.info"
|
||||
distfiles="http://msp.ucsd.edu/Software/pd-$_ver.src.tar.gz"
|
||||
checksum=52591f18316e9f2471ca21c3d6b41c56336e0615ec40a093232e95cc230bfcc1
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
*-musl) # Causes pd to fail if qsort is used without thread local storage.
|
||||
CFLAGS="-DMICROSOFT_STUPID_SORT" ;;
|
||||
esac
|
||||
|
||||
pre_configure() {
|
||||
./autogen.sh
|
||||
|
|
Loading…
Reference in a new issue