summaryrefslogtreecommitdiff
path: root/pkgs/lwjgl/0002-build-allow-local-kotlin.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/0002-build-allow-local-kotlin.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/0002-build-allow-local-kotlin.patch')
-rw-r--r--pkgs/lwjgl/0002-build-allow-local-kotlin.patch50
1 files changed, 50 insertions, 0 deletions
diff --git a/pkgs/lwjgl/0002-build-allow-local-kotlin.patch b/pkgs/lwjgl/0002-build-allow-local-kotlin.patch
new file mode 100644
index 0000000..7b7a4a2
--- /dev/null
+++ b/pkgs/lwjgl/0002-build-allow-local-kotlin.patch
@@ -0,0 +1,50 @@
+From 05573f96ed4b73591679bdf2c17a83f57acfd171 Mon Sep 17 00:00:00 2001
+From: Seth Flynn <[email protected]>
+Date: Wed, 5 Mar 2025 16:34:50 -0500
+Subject: [PATCH 2/5] build: allow local kotlin
+
+Adapted from https://cgit.freebsd.org/ports/commit/?id=680dc7bb031d0f708c2dd38f055ec8d63ee68b8a
+---
+ config/build-definitions.xml | 3 ++-
+ update-dependencies.xml | 4 ++--
+ 2 files changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/config/build-definitions.xml b/config/build-definitions.xml
+index 407195ff7..4026a057c 100644
+--- a/config/build-definitions.xml
++++ b/config/build-definitions.xml
+@@ -121,7 +121,8 @@ This script is included in /build.xml and /config/update-dependencies.xml.
+
+ <property name="lib" location="bin/libs" relative="true"/>
+
+- <property name="kotlinc" location="${lib}/kotlinc" relative="true"/>
++ <property name="kotlinc" location="${lib}/kotlinc" relative="true" unless:set="local.kotlin" />
++ <property name="kotlinc" location="${local.kotlin}" relative="false" if:set="local.kotlin"/>
+
+ <property name="module.lwjgl" location="modules/lwjgl" relative="true"/>
+
+diff --git a/update-dependencies.xml b/update-dependencies.xml
+index 98fd77b19..39501492a 100644
+--- a/update-dependencies.xml
++++ b/update-dependencies.xml
+@@ -27,7 +27,7 @@
+ <target name="check-dependencies" description="Updates LWJGL dependencies, if required" unless="${build.offline}">
+ <!-- Checks if the Kotlin compiler must be updated -->
+ <local name="kotlinc-build-current"/>
+- <loadfile property="kotlinc-build-current" srcfile="${kotlinc}/build.txt" quiet="true" taskname="kotlinc"/>
++ <loadfile property="kotlinc-build-current" srcfile="${kotlinc}/build.txt" quiet="true" taskname="kotlinc" unless:set="local.kotlin" />
+ <condition property="kotlinc-uptodate">
+ <and>
+ <isset property="kotlinc-build-current"/>
+@@ -54,7 +54,7 @@
+ <mkdir dir="${lib}"/>
+ <mkdir dir="${lib}/java"/>
+ <antcall target="-lib-download"/>
+- <antcall target="-kotlinc-download"/>
++ <antcall target="-kotlinc-download" unless:set="local.kotlin" />
+ </target>
+
+ <!-- Downloads and extracts the Kotlin compiler. -->
+--
+2.48.1
+