diff options
Diffstat (limited to 'games/lwjgl3/files')
9 files changed, 158 insertions, 32 deletions
diff --git a/games/lwjgl3/files/patch-build.xml b/games/lwjgl3/files/patch-build.xml deleted file mode 100644 index 3ed34b1ff2fd..000000000000 --- a/games/lwjgl3/files/patch-build.xml +++ /dev/null @@ -1,10 +0,0 @@ ---- build.xml.orig 2014-04-04 16:45:10 UTC -+++ build.xml -@@ -7,7 +7,6 @@ - <import file="platform_build/build-applet.xml"/> - <import file="platform_build/build-webstart.xml"/> - <import file="platform_build/build-maven.xml"/> -- <import file="eclipse-update/org.lwjgl.build/build-updatesite.xml"/> - - <!-- ================================================================== --> - <!-- Everything below this line is targets. --> diff --git a/games/lwjgl3/files/patch-config_build-definitions.xml b/games/lwjgl3/files/patch-config_build-definitions.xml new file mode 100644 index 000000000000..a8664fe7cb93 --- /dev/null +++ b/games/lwjgl3/files/patch-config_build-definitions.xml @@ -0,0 +1,12 @@ +--- config/build-definitions.xml.orig 2023-12-18 14:22:59 UTC ++++ config/build-definitions.xml +@@ -100,7 +100,8 @@ This script is included in /build.xml and /config/upda + + <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/games/lwjgl3/files/patch-config_freebsd_build.xml b/games/lwjgl3/files/patch-config_freebsd_build.xml new file mode 100644 index 000000000000..e4ef6a9204eb --- /dev/null +++ b/games/lwjgl3/files/patch-config_freebsd_build.xml @@ -0,0 +1,23 @@ +--- config/freebsd/build.xml.orig 2023-12-18 14:22:59 UTC ++++ config/freebsd/build.xml +@@ -159,16 +159,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> + diff --git a/games/lwjgl3/files/patch-modules_lwjgl_core_src_main_java_org_lwjgl_system_MemoryManage.java b/games/lwjgl3/files/patch-modules_lwjgl_core_src_main_java_org_lwjgl_system_MemoryManage.java new file mode 100644 index 000000000000..0e976ea34e68 --- /dev/null +++ b/games/lwjgl3/files/patch-modules_lwjgl_core_src_main_java_org_lwjgl_system_MemoryManage.java @@ -0,0 +1,12 @@ +--- modules/lwjgl/core/src/main/java/org/lwjgl/system/MemoryManage.java.orig 2023-12-18 14:22:59 UTC ++++ modules/lwjgl/core/src/main/java/org/lwjgl/system/MemoryManage.java +@@ -34,6 +34,9 @@ final class MemoryManage { + String className; + if (allocator == null || "jemalloc".equals(allocator)) { + className = "org.lwjgl.system.jemalloc.JEmallocAllocator"; ++ if (Platform.get() == Platform.FREEBSD) { ++ Configuration.JEMALLOC_LIBRARY_NAME.set("libc.so.7"); ++ } + } else if ("rpmalloc".equals(allocator)) { + className = "org.lwjgl.system.rpmalloc.RPmallocAllocator"; + } else { diff --git a/games/lwjgl3/files/patch-modules_lwjgl_jemalloc_src_generated_java_org_lwjgl_system_jemalloc_JEmalloc.java b/games/lwjgl3/files/patch-modules_lwjgl_jemalloc_src_generated_java_org_lwjgl_system_jemalloc_JEmalloc.java new file mode 100644 index 000000000000..8de303595b8f --- /dev/null +++ b/games/lwjgl3/files/patch-modules_lwjgl_jemalloc_src_generated_java_org_lwjgl_system_jemalloc_JEmalloc.java @@ -0,0 +1,69 @@ +--- modules/lwjgl/jemalloc/src/generated/java/org/lwjgl/system/jemalloc/JEmalloc.java.orig 2023-12-18 14:22:59 UTC ++++ modules/lwjgl/jemalloc/src/generated/java/org/lwjgl/system/jemalloc/JEmalloc.java +@@ -40,27 +40,27 @@ public class JEmalloc { + + /** Function address. */ + public static final long +- malloc_message = apiGetFunctionAddress(JEMALLOC, "je_malloc_message"), +- malloc = apiGetFunctionAddress(JEMALLOC, "je_malloc"), +- calloc = apiGetFunctionAddress(JEMALLOC, "je_calloc"), +- posix_memalign = apiGetFunctionAddress(JEMALLOC, "je_posix_memalign"), +- aligned_alloc = apiGetFunctionAddress(JEMALLOC, "je_aligned_alloc"), +- realloc = apiGetFunctionAddress(JEMALLOC, "je_realloc"), +- free = apiGetFunctionAddress(JEMALLOC, "je_free"), +- free_sized = apiGetFunctionAddress(JEMALLOC, "je_free_sized"), +- free_aligned_sized = apiGetFunctionAddress(JEMALLOC, "je_free_aligned_sized"), +- mallocx = apiGetFunctionAddress(JEMALLOC, "je_mallocx"), +- rallocx = apiGetFunctionAddress(JEMALLOC, "je_rallocx"), +- xallocx = apiGetFunctionAddress(JEMALLOC, "je_xallocx"), +- sallocx = apiGetFunctionAddress(JEMALLOC, "je_sallocx"), +- dallocx = apiGetFunctionAddress(JEMALLOC, "je_dallocx"), +- sdallocx = apiGetFunctionAddress(JEMALLOC, "je_sdallocx"), +- nallocx = apiGetFunctionAddress(JEMALLOC, "je_nallocx"), +- mallctl = apiGetFunctionAddress(JEMALLOC, "je_mallctl"), +- mallctlnametomib = apiGetFunctionAddress(JEMALLOC, "je_mallctlnametomib"), +- mallctlbymib = apiGetFunctionAddress(JEMALLOC, "je_mallctlbymib"), +- malloc_stats_print = apiGetFunctionAddress(JEMALLOC, "je_malloc_stats_print"), +- malloc_usable_size = apiGetFunctionAddress(JEMALLOC, "je_malloc_usable_size"); ++ malloc_message = apiGetFunctionAddress(JEMALLOC, functionNamePrefix + "malloc_message"), ++ malloc = apiGetFunctionAddress(JEMALLOC, functionNamePrefix + "malloc"), ++ calloc = apiGetFunctionAddress(JEMALLOC, functionNamePrefix + "calloc"), ++ posix_memalign = apiGetFunctionAddress(JEMALLOC, functionNamePrefix + "posix_memalign"), ++ aligned_alloc = apiGetFunctionAddress(JEMALLOC, functionNamePrefix + "aligned_alloc"), ++ realloc = apiGetFunctionAddress(JEMALLOC, functionNamePrefix + "realloc"), ++ free = apiGetFunctionAddress(JEMALLOC, functionNamePrefix + "free"), ++ free_sized = apiGetFunctionAddress(JEMALLOC, functionNamePrefix + "free_sized"), ++ free_aligned_sized = apiGetFunctionAddress(JEMALLOC, functionNamePrefix + "free_aligned_sized"), ++ mallocx = apiGetFunctionAddress(JEMALLOC, functionNamePrefix + "mallocx"), ++ rallocx = apiGetFunctionAddress(JEMALLOC, functionNamePrefix + "rallocx"), ++ xallocx = apiGetFunctionAddress(JEMALLOC, functionNamePrefix + "xallocx"), ++ sallocx = apiGetFunctionAddress(JEMALLOC, functionNamePrefix + "sallocx"), ++ dallocx = apiGetFunctionAddress(JEMALLOC, functionNamePrefix + "dallocx"), ++ sdallocx = apiGetFunctionAddress(JEMALLOC, functionNamePrefix + "sdallocx"), ++ nallocx = apiGetFunctionAddress(JEMALLOC, functionNamePrefix + "nallocx"), ++ mallctl = apiGetFunctionAddress(JEMALLOC, functionNamePrefix + "mallctl"), ++ mallctlnametomib = apiGetFunctionAddress(JEMALLOC, functionNamePrefix + "mallctlnametomib"), ++ mallctlbymib = apiGetFunctionAddress(JEMALLOC, functionNamePrefix + "mallctlbymib"), ++ malloc_stats_print = apiGetFunctionAddress(JEMALLOC, functionNamePrefix + "malloc_stats_print"), ++ malloc_usable_size = apiGetFunctionAddress(JEMALLOC, functionNamePrefix + "malloc_usable_size"); + + } + +@@ -105,11 +105,16 @@ public class JEmalloc { + /** Use as arena index in "stats.arenas.<i>.*" mallctl interfaces to select destroyed arenas. */ + public static final int MALLCTL_ARENAS_DESTROYED = 0x1001; + ++ private static String functionNamePrefix = "je_"; ++ + static { ++ if (Platform.get() == Platform.FREEBSD) { ++ functionNamePrefix = ""; ++ } + // Force jemalloc to initialize before anyone else uses it. + // This avoids a dangerous race when the first jemalloc functions are called concurrently. + if (Platform.get() == Platform.WINDOWS) { +- invokePV(invokePP(8L, apiGetFunctionAddress(JEMALLOC, "je_malloc")), apiGetFunctionAddress(JEMALLOC, "je_free")); ++ invokePV(invokePP(8L, apiGetFunctionAddress(JEMALLOC, functionNamePrefix + "malloc")), apiGetFunctionAddress(JEMALLOC, functionNamePrefix + "free")); + } + } + diff --git a/games/lwjgl3/files/patch-modules_lwjgl_shaderc_src_generated_java_org_lwjgl_util_shaderc_Shaderc.java b/games/lwjgl3/files/patch-modules_lwjgl_shaderc_src_generated_java_org_lwjgl_util_shaderc_Shaderc.java new file mode 100644 index 000000000000..262e86b4b7b8 --- /dev/null +++ b/games/lwjgl3/files/patch-modules_lwjgl_shaderc_src_generated_java_org_lwjgl_util_shaderc_Shaderc.java @@ -0,0 +1,11 @@ +--- modules/lwjgl/shaderc/src/generated/java/org/lwjgl/util/shaderc/Shaderc.java.orig 2023-12-18 14:22:59 UTC ++++ modules/lwjgl/shaderc/src/generated/java/org/lwjgl/util/shaderc/Shaderc.java +@@ -20,7 +20,7 @@ import static org.lwjgl.system.MemoryUtil.*; + /** Native bindings to the libshaderc C API of the <a href="https://github.com/google/shaderc/">shaderc</a> library. */ + public class Shaderc { + +- private static final SharedLibrary SHADERC = Library.loadNative(Shaderc.class, "org.lwjgl.shaderc", Configuration.SHADERC_LIBRARY_NAME.get(Platform.mapLibraryNameBundled("shaderc")), true); ++ private static final SharedLibrary SHADERC = Library.loadNative(Shaderc.class, "org.lwjgl.shaderc", Configuration.SHADERC_LIBRARY_NAME.get(Platform.mapLibraryNameBundled(Platform.get() == Platform.FREEBSD ? "shaderc_shared" : "shaderc")), true); + + /** Contains the function pointers loaded from the shaderc {@link SharedLibrary}. */ + public static final class Functions { diff --git a/games/lwjgl3/files/patch-modules_lwjgl_spvc_src_generated_java_org_lwjgl_util_spvc_Spvc.java b/games/lwjgl3/files/patch-modules_lwjgl_spvc_src_generated_java_org_lwjgl_util_spvc_Spvc.java new file mode 100644 index 000000000000..361420cf9ca1 --- /dev/null +++ b/games/lwjgl3/files/patch-modules_lwjgl_spvc_src_generated_java_org_lwjgl_util_spvc_Spvc.java @@ -0,0 +1,11 @@ +--- modules/lwjgl/spvc/src/generated/java/org/lwjgl/util/spvc/Spvc.java.orig 2023-12-18 14:22:59 UTC ++++ modules/lwjgl/spvc/src/generated/java/org/lwjgl/util/spvc/Spvc.java +@@ -40,7 +40,7 @@ import static org.lwjgl.system.MemoryUtil.*; + */ + public class Spvc { + +- private static final SharedLibrary SPVC = Library.loadNative(Spvc.class, "org.lwjgl.spvc", Configuration.SPVC_LIBRARY_NAME.get(Platform.mapLibraryNameBundled("spirv-cross")), true); ++ private static final SharedLibrary SPVC = Library.loadNative(Spvc.class, "org.lwjgl.spvc", Configuration.SPVC_LIBRARY_NAME.get(Platform.mapLibraryNameBundled(Platform.get() == Platform.FREEBSD ? "spirv-cross-c-shared" : "spirv-cross")), true); + + /** Contains the function pointers loaded from the spvc {@link SharedLibrary}. */ + public static final class Functions { diff --git a/games/lwjgl3/files/patch-platform_build__bsd_ant__build.xml b/games/lwjgl3/files/patch-platform_build__bsd_ant__build.xml deleted file mode 100644 index f700a84daf83..000000000000 --- a/games/lwjgl3/files/patch-platform_build__bsd_ant__build.xml +++ /dev/null @@ -1,22 +0,0 @@ ---- platform_build/bsd_ant/build.xml.orig 2019-12-10 20:24:26 -+++ platform_build/bsd_ant/build.xml -@@ -4,8 +4,8 @@ - <property name="native" location="../../src/native"/> - <property name="libname32" value="liblwjgl.so"/> - <property name="libname64" value="liblwjgl64.so"/> -- <property name="libs32" value="-L/usr/X11R6/lib -L/usr/local/lib -lm -lX11 -lXext -lXcursor -lXrandr -pthread -L${java.home}/lib/i386 -ljawt" /> -- <property name="libs64" value="-L/usr/X11R6/lib -L/usr/local/lib -lm -lX11 -lXext -lXcursor -lXrandr -lXxf86vm -pthread -L${java.home}/lib/amd64 -ljawt" /> -+ <property name="libs32" value="-LPREFIX/lib -lm -lX11 -lXext -lXcursor -lXrandr -pthread -L${java.home}/lib/i386 -ljawt" /> -+ <property name="libs64" value="-LPREFIX/lib -lm -lX11 -lXext -lXcursor -lXrandr -lXxf86vm -pthread -L${java.home}/lib/amd64 -ljawt" /> - <property name="cflags32" value="-O2 -Wall -c -fPIC -std=c99 -Wunused"/> - - <target name="clean"> -@@ -39,7 +39,7 @@ - <os name="SunOS" /> - </condition> - -- <property name="linker_flags32" value="${version_script_flags32} -shared -O2 -Wall -o ${libname32} ${libs32} ${xf86vm_lib}"/> -+ <property name="linker_flags32" value="${version_script_flags32} -shared -O2 -Wall -z notext -o ${libname32} ${libs32} ${xf86vm_lib}"/> - <property name="linker_flags64" value="${version_script_flags64} -shared -O2 -Wall -o ${libname64} ${libs64} ${xf86vm_lib}"/> - - <condition property="build.32bit.only"> diff --git a/games/lwjgl3/files/patch-update-dependencies.xml b/games/lwjgl3/files/patch-update-dependencies.xml new file mode 100644 index 000000000000..4c3943508b63 --- /dev/null +++ b/games/lwjgl3/files/patch-update-dependencies.xml @@ -0,0 +1,20 @@ +--- update-dependencies.xml.orig 2023-12-18 14:22:59 UTC ++++ 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. --> |