git: 75d72a7f27c1 - 2026Q3 - audio/libopenshot-audio: patch armv7 build issue properly

From: Robert Clausecker <fuz_at_FreeBSD.org>
Date: Thu, 16 Jul 2026 14:16:49 UTC
The branch 2026Q3 has been updated by fuz:

URL: https://cgit.FreeBSD.org/ports/commit/?id=75d72a7f27c1cd1ac34e2f567c73c022fae30b73

commit 75d72a7f27c1cd1ac34e2f567c73c022fae30b73
Author:     Robert Clausecker <fuz@FreeBSD.org>
AuthorDate: 2026-07-15 09:48:16 +0000
Commit:     Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2026-07-16 14:16:37 +0000

    audio/libopenshot-audio: patch armv7 build issue properly
    
    juce_BasicNativeHeaders.h pulls in <sys/user.h> which in turn pulls in
    <machine/atomic.h> transitively, which then defines a mb macro polluting
    the name space.  <sys/user.h> is only needed for struct kproc_info,
    which is only needed in juce_SystemStats_linux.cpp to check for
    P_TRACED.  Remove <sys/user.h> from juce_BasicNativeHeaders.h and only
    include it in juce_SystemStats_linux.cpp to avoid namespace pollution
    issues.
    
    I'll try to tackle the other ports using or bundling JUCE in a future
    commit.  As always, please try to unbundle dependencies if possible.
    
    Approved by:    portmgr (build fix blanket)
    MFH:            2026Q3
    PR:             283492
    
    (cherry picked from commit 3a7ad3ed54851dd27d5ed8a65c8aa77b246c5472)
---
 ...ch-JuceLibraryCode_modules_juce__core_juce__core.cpp | 14 --------------
 ...modules_juce__core_native_juce__BasicNativeHeaders.h | 10 ++++++++++
 ...dules_juce__core_native_juce__SystemStats__linux.cpp | 17 ++++++++++++++---
 3 files changed, 24 insertions(+), 17 deletions(-)

diff --git a/audio/libopenshot-audio/files/patch-JuceLibraryCode_modules_juce__core_juce__core.cpp b/audio/libopenshot-audio/files/patch-JuceLibraryCode_modules_juce__core_juce__core.cpp
deleted file mode 100644
index 6135252f7975..000000000000
--- a/audio/libopenshot-audio/files/patch-JuceLibraryCode_modules_juce__core_juce__core.cpp
+++ /dev/null
@@ -1,14 +0,0 @@
---- JuceLibraryCode/modules/juce_core/juce_core.cpp.orig	2026-04-21 21:01:11 UTC
-+++ JuceLibraryCode/modules/juce_core/juce_core.cpp
-@@ -119,6 +119,11 @@
- 
- #undef check
- 
-+/* workaround for <machine/atomic.h> defining dumb things on arm */
-+#ifdef mb
-+#undef mb
-+#endif
-+
- //==============================================================================
- #include "containers/juce_AbstractFifo.cpp"
- #include "containers/juce_ArrayBase.cpp"
diff --git a/audio/libopenshot-audio/files/patch-JuceLibraryCode_modules_juce__core_native_juce__BasicNativeHeaders.h b/audio/libopenshot-audio/files/patch-JuceLibraryCode_modules_juce__core_native_juce__BasicNativeHeaders.h
new file mode 100644
index 000000000000..e140139159df
--- /dev/null
+++ b/audio/libopenshot-audio/files/patch-JuceLibraryCode_modules_juce__core_native_juce__BasicNativeHeaders.h
@@ -0,0 +1,10 @@
+--- JuceLibraryCode/modules/juce_core/native/juce_BasicNativeHeaders.h.orig	2026-07-15 09:36:34 UTC
++++ JuceLibraryCode/modules/juce_core/native/juce_BasicNativeHeaders.h
+@@ -243,7 +243,6 @@
+  #include <sys/sysctl.h>
+  #include <sys/time.h>
+  #include <sys/types.h>
+- #include <sys/user.h>
+  #include <sys/wait.h>
+  #include <utime.h>
+  #include <poll.h>
diff --git a/audio/libopenshot-audio/files/patch-JuceLibraryCode_modules_juce__core_native_juce__SystemStats__linux.cpp b/audio/libopenshot-audio/files/patch-JuceLibraryCode_modules_juce__core_native_juce__SystemStats__linux.cpp
index 747510df7b3a..0ef8f7ce962d 100644
--- a/audio/libopenshot-audio/files/patch-JuceLibraryCode_modules_juce__core_native_juce__SystemStats__linux.cpp
+++ b/audio/libopenshot-audio/files/patch-JuceLibraryCode_modules_juce__core_native_juce__SystemStats__linux.cpp
@@ -1,6 +1,17 @@
---- JuceLibraryCode/modules/juce_core/native/juce_SystemStats_linux.cpp.orig	2024-12-21 22:21:33 UTC
+--- JuceLibraryCode/modules/juce_core/native/juce_SystemStats_linux.cpp.orig	2026-03-16 17:51:52 UTC
 +++ JuceLibraryCode/modules/juce_core/native/juce_SystemStats_linux.cpp
-@@ -56,7 +56,11 @@ SystemStats::OperatingSystemType SystemStats::getOpera
+@@ -20,6 +20,10 @@
+   ==============================================================================
+ */
+ 
++#if JUCE_BSD
++#include <sys/user.h>
++#endif
++
+ #if JUCE_BELA
+ extern "C" int cobalt_thread_mode();
+ #endif
+@@ -56,7 +60,11 @@ String SystemStats::getOperatingSystemName()
  
  String SystemStats::getOperatingSystemName()
  {
@@ -12,7 +23,7 @@
  }
  
  bool SystemStats::isOperatingSystem64Bit()
-@@ -318,18 +322,17 @@ String SystemStats::getUniqueDeviceID()
+@@ -318,18 +326,17 @@ String SystemStats::getUniqueDeviceID()
              return {};
          };