summaryrefslogtreecommitdiff
path: root/pkgs/lwjgl/0003-build-allow-linking-against-system-libffi.patch
diff options
context:
space:
mode:
authorSeth Flynn <[email protected]>2025-03-06 03:00:58 -0500
committerSeth Flynn <[email protected]>2025-03-06 03:18:59 -0500
commit77f2cc5791904caf4077c526fbdaca4ad27e2374 (patch)
treecb8707a8cf28cf59ef16fcab81e83828e75970b1 /pkgs/lwjgl/0003-build-allow-linking-against-system-libffi.patch
parent6fa4458f59160cdf9e82ad2138300b1041f510ad (diff)
apply build system patches
This is a more upstreamable approach, and doesn't require any kind of weird substitution on our end. It also avoids downloading Kotlin in our antDeps and fixes cross compilation!! (only tested on aarch64) Signed-off-by: Seth Flynn <[email protected]>
Diffstat (limited to 'pkgs/lwjgl/0003-build-allow-linking-against-system-libffi.patch')
-rw-r--r--pkgs/lwjgl/0003-build-allow-linking-against-system-libffi.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/pkgs/lwjgl/0003-build-allow-linking-against-system-libffi.patch b/pkgs/lwjgl/0003-build-allow-linking-against-system-libffi.patch
new file mode 100644
index 0000000..e212bfa
--- /dev/null
+++ b/pkgs/lwjgl/0003-build-allow-linking-against-system-libffi.patch
@@ -0,0 +1,38 @@
+From f79338f70f72e5d4606b8d99c2f49f85b486be3e Mon Sep 17 00:00:00 2001
+From: Seth Flynn <[email protected]>
+Date: Wed, 5 Mar 2025 16:43:57 -0500
+Subject: [PATCH 3/5] build: allow linking against system libffi
+
+Adapted from https://cgit.freebsd.org/ports/commit/?id=680dc7bb031d0f708c2dd38f055ec8d63ee68b8a
+---
+ config/linux/build.xml | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/config/linux/build.xml b/config/linux/build.xml
+index 11e4743ab..4500d23c0 100644
+--- a/config/linux/build.xml
++++ b/config/linux/build.xml
+@@ -194,16 +194,18 @@
+ <include name="${module.lwjgl}/jawt/src/generated/c/*.c" if:true="${binding.jawt}"/>
+ </fileset>
+ </source>
+- <beforeLink>
++ <beforeLink unless:true="${use.libffi.so}">
+ <parallel threadsPerProcessor="2" failonany="true" unless:set="lib-dependencies-uptodate">
+ <update-dependency module="core" artifact="core/libffi.a"/>
+ </parallel>
+ </beforeLink>
+ <link>
+- <fileset dir="${lib.native}/org/lwjgl">
++ <fileset dir="${lib.native}/org/lwjgl" unless:true="${use.libffi.so}">
+ <include name="libffi.a"/>
+ </fileset>
+ <arg value="-ldl"/>
++ <arg value="-lffi" if:true="${use.libffi.so}"/>
++ <arg value="-L${libffi.path}" if:set="libffi.path"/>
+ </link>
+ </build>
+
+--
+2.48.1
+