summaryrefslogtreecommitdiff
path: root/audio
diff options
context:
space:
mode:
authorYuri Victorovich <yuri@FreeBSD.org>2022-10-16 16:42:04 -0700
committerYuri Victorovich <yuri@FreeBSD.org>2022-10-16 16:55:55 -0700
commit4838430844ed6d3a86ad82c591af3a575db113ab (patch)
treea9fd74b12c53d7ee0e08b45174da25117fabe731 /audio
parentbenchmarks/uica: add support for powerpc* (diff)
audio/dexed: Add better workaround for broken ENVIRON(7) in shared libraries
Diffstat (limited to 'audio')
-rw-r--r--audio/dexed/Makefile2
-rw-r--r--audio/dexed/files/patch-libs_JUCE_modules_juce__core_native_juce__linux__Files.cpp12
2 files changed, 8 insertions, 6 deletions
diff --git a/audio/dexed/Makefile b/audio/dexed/Makefile
index c449fd29c0c1..d50b38503dbb 100644
--- a/audio/dexed/Makefile
+++ b/audio/dexed/Makefile
@@ -2,7 +2,7 @@ PORTNAME= dexed
DISTVERSIONPREFIX= v
DISTVERSION= 0.9.6-16
DISTVERSIONSUFFIX= -g1df9a58
-PORTREVISION= 4
+PORTREVISION= 5
CATEGORIES= audio
PKGNAMESUFFIX= -synth
diff --git a/audio/dexed/files/patch-libs_JUCE_modules_juce__core_native_juce__linux__Files.cpp b/audio/dexed/files/patch-libs_JUCE_modules_juce__core_native_juce__linux__Files.cpp
index 2814210653f1..0d81b4ad053b 100644
--- a/audio/dexed/files/patch-libs_JUCE_modules_juce__core_native_juce__linux__Files.cpp
+++ b/audio/dexed/files/patch-libs_JUCE_modules_juce__core_native_juce__linux__Files.cpp
@@ -1,22 +1,24 @@
- otherwise it fails with unknown 'environ' symbol, see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=263265
---- libs/JUCE/modules/juce_core/native/juce_linux_Files.cpp.orig 2022-04-13 18:55:08 UTC
+--- libs/JUCE/modules/juce_core/native/juce_linux_Files.cpp.orig 2022-08-15 18:29:17 UTC
+++ libs/JUCE/modules/juce_core/native/juce_linux_Files.cpp
-@@ -21,7 +21,7 @@
+@@ -21,7 +21,9 @@
*/
#if JUCE_BSD
-extern char** environ;
-+//extern char** environ;
++//extern char** environ; // this is broken on FreeBSD, see https://reviews.freebsd.org/D30842
++#include <dlfcn.h>
++static char*** environ_ptr = (char***)dlsym(RTLD_DEFAULT, "environ"); // workaround for the above
#endif
namespace juce
-@@ -230,7 +230,7 @@ bool Process::openDocument (const String& fileName, co
+@@ -229,7 +231,7 @@ bool Process::openDocument (const String& fileName, co
setsid();
// Child process
- execve (argv[0], (char**) argv, environ);
-+ execv (argv[0], (char**) argv);
++ execve (argv[0], (char**) argv, *environ_ptr);
exit (0);
}