summaryrefslogtreecommitdiff
path: root/pkgs/lwjgl/0001-build-use-pkg-config-for-linux-dependencies.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/0001-build-use-pkg-config-for-linux-dependencies.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/0001-build-use-pkg-config-for-linux-dependencies.patch')
-rw-r--r--pkgs/lwjgl/0001-build-use-pkg-config-for-linux-dependencies.patch81
1 files changed, 81 insertions, 0 deletions
diff --git a/pkgs/lwjgl/0001-build-use-pkg-config-for-linux-dependencies.patch b/pkgs/lwjgl/0001-build-use-pkg-config-for-linux-dependencies.patch
new file mode 100644
index 0000000..38c3878
--- /dev/null
+++ b/pkgs/lwjgl/0001-build-use-pkg-config-for-linux-dependencies.patch
@@ -0,0 +1,81 @@
+From cee6a98721d8417802fcd394df0215312be9a7ea Mon Sep 17 00:00:00 2001
+From: Seth Flynn <[email protected]>
+Date: Wed, 5 Mar 2025 16:20:59 -0500
+Subject: [PATCH 1/5] build: use pkg-config for linux dependencies
+
+Adapted from https://cgit.freebsd.org/ports/commit/?id=680dc7bb031d0f708c2dd38f055ec8d63ee68b8a
+---
+ config/linux/build.xml | 37 ++++++++++++++++++++++---------------
+ 1 file changed, 22 insertions(+), 15 deletions(-)
+
+diff --git a/config/linux/build.xml b/config/linux/build.xml
+index a1798b6aa..11e4743ab 100644
+--- a/config/linux/build.xml
++++ b/config/linux/build.xml
+@@ -281,16 +281,17 @@
+ <!-- NativeFileDialog -->
+ <build module="nfd" simple="true" linker="g++" if:true="${binding.nfd}">
+ <beforeCompile>
++ <local name="gtk3-cflags"/>
++ <local name="gtk3-libflags"/>
++ <local name="stderr"/>
++ <exec outputproperty="gtk3-cflags" errorproperty="stderr" executable="pkg-config" failonerror="true" taskname="gtk-3.0-cflags">
++ <arg line="--cflags gtk+-3.0"/>
++ </exec>
++ <exec outputproperty="gtk3-libflags" errorproperty="stderr" executable="pkg-config" failonerror="true" taskname="gtk-3.0-libflags">
++ <arg line="--libs gtk+-3.0"/>
++ </exec>
+ <compile lang="c++">
+- <arg value="-I/usr/include/gtk-3.0"/>
+- <arg value="-I/usr/include/glib-2.0"/>
+- <arg value="-I/usr/include/pango-1.0"/>
+- <arg value="-I/usr/include/harfbuzz"/>
+- <arg value="-I/usr/include/cairo"/>
+- <arg value="-I/usr/include/gdk-pixbuf-2.0"/>
+- <arg value="-I/usr/include/atk-1.0"/>
+- <arg value="-I/usr/lib64/glib-2.0/include"/>
+- <arg value="-I/usr/lib/${linux.triplet}/glib-2.0/include"/>
++ <arg line="${gtk3-cflags}"/>
+ <arg value="-I${src.main.rel}/include"/>
+ <fileset dir="." includes="${src.main}/nfd_gtk.cpp"/>
+ </compile>
+@@ -299,16 +300,22 @@
+ <arg value="-I${src.main.rel}/include"/>
+ </source>
+ <link>
+- <arg value="-lglib-2.0"/>
+- <arg value="-lgobject-2.0"/>
+- <arg value="-lgtk-3"/>
+- <arg value="-lgdk-3"/>
++ <arg line="${gtk3-libflags}"/>
+ </link>
+ </build>
+ <build module="nfd" suffix="_portal" simple="true" linker="g++" if:true="${binding.nfd}">
+ <beforeCompile>
++ <local name="glib-cflags"/>
++ <local name="glib-libflags"/>
++ <local name="stderr"/>
++ <exec outputproperty="glib-cflags" errorproperty="stderr" executable="pkg-config" failonerror="true" taskname="glib-cflags">
++ <arg line="--cflags glib-2.0"/>
++ </exec>
++ <exec outputproperty="glib-libflags" errorproperty="stderr" executable="pkg-config" failonerror="true" taskname="glib-libflags">
++ <arg line="--libs glib-2.0"/>
++ </exec>
+ <compile lang="c++">
+- <arg line="-I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/lib/${linux.triplet}/dbus-1.0/include"/>
++ <arg line="${glib-cflags}"/>
+ <arg value="-I${src.main.rel}/include"/>
+ <fileset dir="." includes="${src.main}/nfd_portal.cpp"/>
+ </compile>
+@@ -317,7 +324,7 @@
+ <arg value="-I${src.main.rel}/include"/>
+ </source>
+ <link>
+- <arg value="-ldbus-1"/>
++ <arg line="${glib-libflags}"/>
+ </link>
+ </build>
+
+--
+2.48.1
+