git: 22b81149f098 - 2026Q3 - devel/juce{,706}: fix build on armv7

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

URL: https://cgit.FreeBSD.org/ports/commit/?id=22b81149f098ef7d9f048a112709e2b189b0eaad

commit 22b81149f098ef7d9f048a112709e2b189b0eaad
Author:     Robert Clausecker <fuz@FreeBSD.org>
AuthorDate: 2026-07-15 11:41:02 +0000
Commit:     Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2026-07-16 14:16:37 +0000

    devel/juce{,706}: fix build on armv7
    
    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 a28798f49247eefdcee26258cf40071a8e0b8a8d)
---
 devel/juce/Makefile                                         |  1 -
 ...tch-modules_juce__core_native_juce__BasicNativeHeaders.h | 10 ++++++++++
 ...h-modules_juce__core_native_juce__SystemStats__linux.cpp | 13 +++++++++++++
 ...tch-modules_juce__core_native_juce__BasicNativeHeaders.h | 10 ++++++++++
 ...h-modules_juce__core_native_juce__SystemStats__linux.cpp | 13 +++++++++++++
 5 files changed, 46 insertions(+), 1 deletion(-)

diff --git a/devel/juce/Makefile b/devel/juce/Makefile
index 73fecc50f4d2..77bc3ffdbe18 100644
--- a/devel/juce/Makefile
+++ b/devel/juce/Makefile
@@ -13,7 +13,6 @@ LICENSE_NAME=	JUCE 6 End User License Agreement
 LICENSE_FILE=	${WRKSRC}/LICENSE.md
 LICENSE_PERMS=	auto-accept dist-mirror pkg-mirror
 
-BROKEN_armv7=	compilation fails due to the 'mb' variable conflict, pending https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=283492
 BROKEN_riscv64=	Hard-float 'd' ABI can't be used for a target that doesn't support the D instruction set extension (ignoring target-abi)
 
 BUILD_DEPENDS=	ladspa>0:audio/ladspa
diff --git a/devel/juce/files/patch-modules_juce__core_native_juce__BasicNativeHeaders.h b/devel/juce/files/patch-modules_juce__core_native_juce__BasicNativeHeaders.h
new file mode 100644
index 000000000000..4343cbee9d6c
--- /dev/null
+++ b/devel/juce/files/patch-modules_juce__core_native_juce__BasicNativeHeaders.h
@@ -0,0 +1,10 @@
+--- modules/juce_core/native/juce_BasicNativeHeaders.h.orig	2026-07-15 10:59:26 UTC
++++ 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/devel/juce/files/patch-modules_juce__core_native_juce__SystemStats__linux.cpp b/devel/juce/files/patch-modules_juce__core_native_juce__SystemStats__linux.cpp
new file mode 100644
index 000000000000..c6af44a597f4
--- /dev/null
+++ b/devel/juce/files/patch-modules_juce__core_native_juce__SystemStats__linux.cpp
@@ -0,0 +1,13 @@
+--- modules/juce_core/native/juce_SystemStats_linux.cpp.orig	2026-07-15 11:00:01 UTC
++++ modules/juce_core/native/juce_SystemStats_linux.cpp
+@@ -20,6 +20,10 @@
+   ==============================================================================
+ */
+ 
++#if JUCE_BSD
++#include <sys/user.h>
++#endif
++
+ #if JUCE_BELA
+ extern "C" int cobalt_thread_mode();
+ #endif
diff --git a/devel/juce706/files/patch-modules_juce__core_native_juce__BasicNativeHeaders.h b/devel/juce706/files/patch-modules_juce__core_native_juce__BasicNativeHeaders.h
new file mode 100644
index 000000000000..4343cbee9d6c
--- /dev/null
+++ b/devel/juce706/files/patch-modules_juce__core_native_juce__BasicNativeHeaders.h
@@ -0,0 +1,10 @@
+--- modules/juce_core/native/juce_BasicNativeHeaders.h.orig	2026-07-15 10:59:26 UTC
++++ 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/devel/juce706/files/patch-modules_juce__core_native_juce__SystemStats__linux.cpp b/devel/juce706/files/patch-modules_juce__core_native_juce__SystemStats__linux.cpp
new file mode 100644
index 000000000000..c6af44a597f4
--- /dev/null
+++ b/devel/juce706/files/patch-modules_juce__core_native_juce__SystemStats__linux.cpp
@@ -0,0 +1,13 @@
+--- modules/juce_core/native/juce_SystemStats_linux.cpp.orig	2026-07-15 11:00:01 UTC
++++ modules/juce_core/native/juce_SystemStats_linux.cpp
+@@ -20,6 +20,10 @@
+   ==============================================================================
+ */
+ 
++#if JUCE_BSD
++#include <sys/user.h>
++#endif
++
+ #if JUCE_BELA
+ extern "C" int cobalt_thread_mode();
+ #endif