diff --git a/srcpkgs/libopenshot-audio/patches/fix-musl.patch b/srcpkgs/libopenshot-audio/patches/fix-musl.patch new file mode 100644 index 0000000000..ace2a53328 --- /dev/null +++ b/srcpkgs/libopenshot-audio/patches/fix-musl.patch @@ -0,0 +1,40 @@ +--- JuceLibraryCode/modules/juce_core/juce_core.cpp 2016-08-30 06:24:27.000000000 +0200 ++++ JuceLibraryCode/modules/juce_core/juce_core.cpp 2016-12-12 14:53:23.532613378 +0100 +@@ -97,7 +97,7 @@ + #include + #include + +- #if ! JUCE_ANDROID ++ #if ! JUCE_ANDROID && defined(__GLIBC__) + #include + #endif + #endif +--- JuceLibraryCode/modules/juce_core/system/juce_SystemStats.cpp 2016-08-30 06:24:27.000000000 +0200 ++++ JuceLibraryCode/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)); +--- JuceLibraryCode/modules/juce_core/native/juce_linux_SystemStats.cpp 2016-08-30 06:24:27.000000000 +0200 ++++ JuceLibraryCode/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(); } + + //==============================================================================