summaryrefslogtreecommitdiff
path: root/pkgs/lwjgl/0002-build-allow-local-kotlin.patch
blob: 7b7a4a2db653adfcda09fcb48960a03a46f5a5af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
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