helm: fix musl and recreate fix_sigemptyset.patch

This commit is contained in:
John 2018-02-20 22:12:28 +01:00 committed by Toyam Cox
parent ae502fac25
commit 24bba09b4b
3 changed files with 56 additions and 21 deletions

View File

@ -0,0 +1,40 @@
--- JUCE/modules/juce_core/juce_core.cpp 2016-08-30 06:24:27.000000000 +0200
+++ JUCE/modules/juce_core/juce_core.cpp 2016-12-12 14:53:23.532613378 +0100
@@ -97,7 +97,7 @@
#include <net/if.h>
#include <sys/ioctl.h>
- #if ! JUCE_ANDROID
+ #if ! JUCE_ANDROID && defined(__GLIBC__)
#include <execinfo.h>
#endif
#endif
--- JUCE/modules/juce_core/system/juce_SystemStats.cpp 2016-08-30 06:24:27.000000000 +0200
+++ JUCE/modules/juce_core/system/juce_SystemStats.cpp 2016-12-12 14:58:35.988986030 +0100
@@ -134,6 +134,8 @@
}
}
+ #elif !defined(__GLIBC__)
+ jassertfalse; // sorry, not implemented yet!
#else
void* stack[128];
int frames = backtrace (stack, numElementsInArray (stack));
--- JUCE/modules/juce_core/native/juce_linux_SystemStats.cpp 2016-08-30 06:24:27.000000000 +0200
+++ JUCE/modules/juce_core/native/juce_linux_SystemStats.cpp 2016-12-12 15:07:35.046607788 +0100
@@ -142,8 +142,15 @@
return result;
}
+#if defined(__GLIBC__)
String SystemStats::getUserLanguage() { return getLocaleValue (_NL_IDENTIFICATION_LANGUAGE); }
String SystemStats::getUserRegion() { return getLocaleValue (_NL_IDENTIFICATION_TERRITORY); }
+#else
+// The identifiers _NL_INDENTIFICATION_LANGUAGE and _TERRIRTORY are not defined in musl libc.
+// TODO: Find a better fix than just returning nonsense. Inspect env("LANG") perhaps?
+String SystemStats::getUserLanguage() { return String("en"); }
+String SystemStats::getUserRegion() { return String("US"); }
+#endif
String SystemStats::getDisplayLanguage() { return getUserLanguage() + "-" + getUserRegion(); }
//==============================================================================

View File

@ -1,16 +1,14 @@
diff --git JUCE/modules/juce_audio_formats/codecs/flac/libFLAC/cpu.c JUCE/modules/juce_audio_formats/codecs/flac/libFLAC/cpu.c --- JUCE/modules/juce_audio_formats/codecs/flac/libFLAC/cpu.c 2017-07-08 23:40:42.000000000 +0200
index 4eac42e..b477709 100644 +++ - 2018-02-20 22:11:47.567333249 +0100
--- JUCE/modules/juce_audio_formats/codecs/flac/libFLAC/cpu.c @@ -244,11 +244,7 @@
+++ JUCE/modules/juce_audio_formats/codecs/flac/libFLAC/cpu.c struct sigaction sigill_save;
@@ -244,11 +244,7 @@ void FLAC__cpu_info(FLAC__CPUInfo *info) struct sigaction sigill_sse;
struct sigaction sigill_save; sigill_sse.sa_sigaction = sigill_handler_sse_os;
struct sigaction sigill_sse; - #ifdef __ANDROID__
sigill_sse.sa_sigaction = sigill_handler_sse_os; sigemptyset (&sigill_sse.sa_mask);
- #ifdef __ANDROID__ - #else
sigemptyset (&sigill_sse.sa_mask); - __sigemptyset(&sigill_sse.sa_mask);
- #else - #endif
- __sigemptyset(&sigill_sse.sa_mask); sigill_sse.sa_flags = SA_SIGINFO | SA_RESETHAND; /* SA_RESETHAND just in case our SIGILL return jump breaks, so we don't get stuck in a loop */
- #endif if(0 == sigaction(SIGILL, &sigill_sse, &sigill_save))
sigill_sse.sa_flags = SA_SIGINFO | SA_RESETHAND; /* SA_RESETHAND just in case our SIGILL return jump breaks, so we don't get stuck in a loop */ {
if(0 == sigaction(SIGILL, &sigill_sse, &sigill_save))
{

View File

@ -4,7 +4,8 @@ version=0.9.0
revision=1 revision=1
build_style=gnu-makefile build_style=gnu-makefile
hostmakedepends="pkg-config" hostmakedepends="pkg-config"
makedepends="alsa-lib-devel libcurl-devel libX11-devel libXext-devel libXinerama-devel freetype-devel MesaLib-devel jack-devel libXcursor-devel" makedepends="alsa-lib-devel libcurl-devel libX11-devel libXext-devel
libXinerama-devel freetype-devel MesaLib-devel jack-devel libXcursor-devel"
maintainer="Olga Ustuzhanina <me@laserbat.pw>" maintainer="Olga Ustuzhanina <me@laserbat.pw>"
short_desc="Polyphonic synth with lots of modulation" short_desc="Polyphonic synth with lots of modulation"
homepage="http://tytel.org/helm" homepage="http://tytel.org/helm"
@ -12,7 +13,3 @@ license="GPL-3"
distfiles="https://github.com/mtytel/helm/archive/v${version}.tar.gz" distfiles="https://github.com/mtytel/helm/archive/v${version}.tar.gz"
checksum=4004c11fd1d773cc2a12adb5336873bc86c5ecbd370b8da2820fed6ef5ec58ad checksum=4004c11fd1d773cc2a12adb5336873bc86c5ecbd370b8da2820fed6ef5ec58ad
nocross="Uses uname -m to set SIMDFLAGS. Should be based on the target, not the host, architecture" nocross="Uses uname -m to set SIMDFLAGS. Should be based on the target, not the host, architecture"
case "$XBPS_TARGET_MACHINE" in
*-musl) broken="Doesn't compile on musl because JUCE depends on execinfo.h"
esac