git: 7f15b9c6ffc3 - main - games/lwjgl3: add powerpc64le support

From: Piotr Kubaj <pkubaj_at_FreeBSD.org>
Date: Fri, 11 Sep 2026 12:50:30 UTC
The branch main has been updated by pkubaj:

URL: https://cgit.FreeBSD.org/ports/commit/?id=7f15b9c6ffc368022be94a3231479a66f7caf12e

commit 7f15b9c6ffc368022be94a3231479a66f7caf12e
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2026-09-07 11:38:07 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2026-09-11 12:49:32 +0000

    games/lwjgl3: add powerpc64le support
---
 games/lwjgl3/Makefile                             |  2 +-
 games/lwjgl3/files/patch-build.xml                | 37 +++++++++++++++++++++++
 games/lwjgl3/files/patch-config_freebsd_build.xml | 14 +++++++--
 3 files changed, 49 insertions(+), 4 deletions(-)

diff --git a/games/lwjgl3/Makefile b/games/lwjgl3/Makefile
index 80477f89b72e..2e49a992499c 100644
--- a/games/lwjgl3/Makefile
+++ b/games/lwjgl3/Makefile
@@ -26,7 +26,7 @@ WWW=		https://www.lwjgl.org
 
 LICENSE=	BSD3CLAUSE
 
-ONLY_FOR_ARCHS=		amd64
+ONLY_FOR_ARCHS=		amd64 powerpc64le
 ONLY_FOR_ARCHS_REASON=	Upstream support FreeBSD on amd64 only: https://github.com/LWJGL/lwjgl3/issues/421
 
 BUILD_DEPENDS=		${LOCALBASE}/openjdk8/bin/java:java/openjdk8 \
diff --git a/games/lwjgl3/files/patch-build.xml b/games/lwjgl3/files/patch-build.xml
new file mode 100644
index 000000000000..d32cd72490d3
--- /dev/null
+++ b/games/lwjgl3/files/patch-build.xml
@@ -0,0 +1,37 @@
+--- build.xml.orig	2026-09-07 10:44:17 UTC
++++ build.xml
+@@ -1238,6 +1238,9 @@
+                 <get-release platform="freebsd" arch="x64" file="lib@{native-library}.so" if:set="auto-natives"/>
+                 <get-release platform="freebsd" arch="x64" file="lib@{native-library}.so.git" if:set="git-revision"/>
+ 
++                <get-release platform="freebsd" arch="ppc64le" file="lib@{native-library}.so" if:set="auto-natives"/>
++                <get-release platform="freebsd" arch="ppc64le" file="lib@{native-library}.so.git" if:set="git-revision"/>
++
+                 <get-release platform="linux" arch="x64" file="lib@{native-library}.so" if:set="auto-natives"/>
+                 <get-release platform="linux" arch="x64" file="lib@{native-library}.so.git" if:set="git-revision"/>
+ 
+@@ -1311,7 +1314,7 @@
+ 
+                 <!-- Create native jar files -->
+                 <parallel threadsPerProcessor="1" failonany="true">
+-                    <natives-jar name="@{name}" title="@{title}" platform="freebsd" path="freebsd/x64" type="so">
++                    <natives-jar name="@{name}" title="@{title}" platform="freebsd" path="freebsd/${build.arch}" type="so">
+                         <freebsd-content/>
+                     </natives-jar>
+                     <natives-jar name="@{name}" title="@{title}" platform="linux" path="linux/x64" type="so">
+@@ -1897,6 +1900,7 @@
+         <release-module name="nfd" native-library="lwjgl_nfd" title="Native File Dialog" if:true="${binding.nfd}">
+             <natives>
+                 <get-release platform="freebsd" arch="x64" file="liblwjgl_nfd_portal.so"/>
++                <get-release platform="freebsd" arch="ppc64le" file="liblwjgl_nfd_portal.so"/>
+ 
+                 <get-release platform="linux" arch="x64" file="liblwjgl_nfd_portal.so"/>
+                 <get-release platform="linux" arch="arm64" file="liblwjgl_nfd_portal.so"/>
+@@ -2001,6 +2005,7 @@
+         <release-module name="remotery" title="remotery" if:true="${binding.remotery}">
+             <natives>
+                 <get-release platform="freebsd" arch="x64" file="liblwjgl_remotery.so"/>
++                <get-release platform="freebsd" arch="ppc64le" file="liblwjgl_remotery.so"/>
+ 
+                 <get-release platform="linux" arch="x64" file="liblwjgl_remotery.so"/>
+                 <get-release platform="linux" arch="arm64" file="liblwjgl_remotery.so"/>
diff --git a/games/lwjgl3/files/patch-config_freebsd_build.xml b/games/lwjgl3/files/patch-config_freebsd_build.xml
index 5232841cda47..b1e2e8500310 100644
--- a/games/lwjgl3/files/patch-config_freebsd_build.xml
+++ b/games/lwjgl3/files/patch-config_freebsd_build.xml
@@ -1,6 +1,14 @@
---- config/freebsd/build.xml.orig	2026-02-02 10:58:56 UTC
+--- config/freebsd/build.xml.orig	2026-07-13 17:21:04 UTC
 +++ config/freebsd/build.xml
-@@ -156,16 +156,18 @@
+@@ -145,6 +145,7 @@
+                 <arg value="-I${src.main.rel}/libffi"/>
+                 <arg value="-I${src.main.rel}/libffi/aarch64" if:set="build.arch.arm64"/>
+                 <arg value="-I${src.main.rel}/libffi/arm" if:set="build.arch.arm32"/>
++                <arg value="-I${src.main.rel}/libffi/ppc64le" if:set="build.arch.ppc64le"/>
+                 <arg value="-I${src.main.rel}/libffi/x86" if:set="build.arch.x64|x86"/>
+                 <!-- for libffi/x86/ffitarget.h -->
+                 <arg value="-DX86_64" if:set="build.arch.x64"/>
+@@ -156,16 +157,18 @@
                      <include name="${module.lwjgl}/jawt/src/generated/c/*.c" if:true="${binding.jawt}"/>
                  </fileset>
              </source>
@@ -21,7 +29,7 @@
              </link>
          </build>
  
-@@ -383,7 +385,7 @@
+@@ -383,7 +386,7 @@
          </build>
  
          <!-- zstd -->