summaryrefslogtreecommitdiff
path: root/pkgs/lwjgl/patches/3.3.4/0002-build-allow-local-kotlin.patch
blob: 361cdf6fdef84e4a25e97810b13fc802059e460b (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 ed2815bff5eadbe5128dc66cd689ff88e93bc19c Mon Sep 17 00:00:00 2001
From: Seth Flynn <[email protected]>
Date: Wed, 5 Mar 2025 16:34:50 -0500
Subject: [PATCH 2/6] 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 fdba3a476..7a3cace54 100644
--- a/config/build-definitions.xml
+++ b/config/build-definitions.xml
@@ -100,7 +100,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 87b110045..10a9da19d 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