diff options
author | Yuri Victorovich <yuri@FreeBSD.org> | 2022-10-16 22:11:00 +0000 |
---|---|---|
committer | Yuri Victorovich <yuri@FreeBSD.org> | 2022-10-16 22:14:45 +0000 |
commit | 00180663d1e163f50dfae6916e9eac4c4192338d (patch) | |
tree | b4d7cff8f3d4cb848da7afdc96dfbcd199a1292c | |
parent | 9339a6b13090d9bb219226adbba28a62aae92709 (diff) | |
download | ports-00180663d1e163f50dfae6916e9eac4c4192338d.tar.gz ports-00180663d1e163f50dfae6916e9eac4c4192338d.zip |
devel/juce: Add better workaround for broken ENVIRON(7) in shared libraries
New workaround exactly mimics the effect of ENVIRON(7).
-rw-r--r-- | devel/juce/Makefile | 2 | ||||
-rw-r--r-- | devel/juce/files/patch-modules_juce__core_native_juce__linux__Files.cpp | 17 |
2 files changed, 15 insertions, 4 deletions
diff --git a/devel/juce/Makefile b/devel/juce/Makefile index 77cbb3a7987b..2ae237a153ac 100644 --- a/devel/juce/Makefile +++ b/devel/juce/Makefile @@ -1,6 +1,6 @@ PORTNAME= juce DISTVERSION= 7.0.2 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= devel PATCH_SITES= https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/ diff --git a/devel/juce/files/patch-modules_juce__core_native_juce__linux__Files.cpp b/devel/juce/files/patch-modules_juce__core_native_juce__linux__Files.cpp index 707d077e2b20..085a1b166a93 100644 --- a/devel/juce/files/patch-modules_juce__core_native_juce__linux__Files.cpp +++ b/devel/juce/files/patch-modules_juce__core_native_juce__linux__Files.cpp @@ -1,13 +1,24 @@ - workaround for https://reviews.freebsd.org/D30842 ---- modules/juce_core/native/juce_linux_Files.cpp.orig 2022-10-16 19:17:29 UTC +--- modules/juce_core/native/juce_linux_Files.cpp.orig 2022-08-15 18:29:17 UTC +++ modules/juce_core/native/juce_linux_Files.cpp -@@ -229,7 +229,7 @@ bool Process::openDocument (const String& fileName, co +@@ -21,7 +21,9 @@ + */
+
+ #if JUCE_BSD
+-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
+@@ -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);
}
|