Bug 275279 - [NEW PORT] games/lwjgl3: Lightweight Java Game Library 3
Summary: [NEW PORT] games/lwjgl3: Lightweight Java Game Library 3
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Some People
Assignee: Vladimir Druzenko
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-11-23 12:05 UTC by er2
Modified: 2024-03-14 17:29 UTC (History)
2 users (show)

See Also:


Attachments
games/lwjgl3: new port (12.82 KB, patch)
2023-11-23 12:05 UTC, er2
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description er2 2023-11-23 12:05:53 UTC
Created attachment 246513 [details]
games/lwjgl3: new port
Comment 1 Evgenii Khramtsov 2023-11-23 20:56:15 UTC
Thanks for porting.

Port needs ALLOW_NETWORKING_PACKAGES in poudriere.conf to build in poudriere.
Comment 2 Ivan 2023-12-04 18:17:18 UTC
Thanks for porting!
Comment 3 Vladimir Druzenko freebsd_committer freebsd_triage 2024-01-15 08:03:24 UTC
Can you make it use locally installed Kotlin (lang/kotlin) and prevent it from downloading every time you compile?
Comment 4 Vladimir Druzenko freebsd_committer freebsd_triage 2024-01-22 19:20:54 UTC
Using Kotlin from ports and downloading jar-libraries from maven during fetch stage done.
But downloading native FreeBSD libraries during build still need fix:
lib/lwjgl/libassimp.so
lib/lwjgl/libbgfx.so
lib/lwjgl/libdraco.so
lib/lwjgl/libfreetype.so
lib/lwjgl/libglfw.so
lib/lwjgl/libharfbuzz.so
lib/lwjgl/libhwloc.so
lib/lwjgl/libjemalloc.so
lib/lwjgl/libktx.so
lib/lwjgl/libopenal.so
lib/lwjgl/libopenxr_loader.so
lib/lwjgl/libopus.so
lib/lwjgl/libshaderc.so
lib/lwjgl/libspirv-cross.so

Details are here: https://github.com/LWJGL/lwjgl3/issues/421#issuecomment-1894326241
Comment 5 Ivan 2024-01-23 17:48:52 UTC
Vladimir, have you tried to use this method https://github.com/er2off/freebsd-ports/blob/main/games/lwjgl3/files/patch-build.xml ?

Just searched for libassimp.so over the code:
https://github.com/search?q=repo%3ALWJGL%2Flwjgl3+libassimp.so&type=code

The dependency located in these files: config/freebsd/build.xml and build.xml

So, try to change one, than another. Build everytime. If no luck, revert the change.

I don't know that strange build system, but the method works)

libassimp.so is in the ports multimedia/assimp that installs libassimp.so.5
Comment 6 Ivan 2024-01-23 18:10:13 UTC
Vladimir, Have you tried disabling auto-natives variable?
Comment 7 Ivan 2024-01-23 18:32:23 UTC
Found a gentoo ebuild for lwjgl3:

https://gitweb.gentoo.org/repo/user/superposition.git/tree/dev-java/lwjgl3/lwjgl3-3.1.3.ebuild

It looks quite simple.

Look at these variables:
JAVA_ANT_REWRITE_CLASSPATH="true"
EANT_BUILD_TARGET="compile-native"

It executes compile-native target instead of building all. Is this reasonable?
Comment 8 commit-hook freebsd_committer freebsd_triage 2024-02-27 21:26:32 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=c3d51eebc94b491afe0e26b2bfbdd39b09c1090d

commit c3d51eebc94b491afe0e26b2bfbdd39b09c1090d
Author:     Vladimir Druzenko <vvd@FreeBSD.org>
AuthorDate: 2024-02-27 21:19:52 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2024-02-27 21:25:48 +0000

    graphics/openxr: new port - required for games/lwjgl3

    OpenXR provides access to Augmented and Virtual Reality (XR-platforms).

    This port required for build lwjgl 3, and lwjgl 3 required for Java
    Minecraft Client 1.20.x run on FreeBSD without linux compatibility layer.

    PR:                     275279 269879 269900
    Approved by:            arrowd (mentor)
    Differential Revision:  https://reviews.freebsd.org/D44119

 graphics/Makefile                                    |  1 +
 graphics/openxr/Makefile (new)                       | 20 ++++++++++++++++++++
 graphics/openxr/distinfo (new)                       |  3 +++
 graphics/openxr/files/patch-src_CMakeLists.txt (new) | 11 +++++++++++
 graphics/openxr/pkg-descr (new)                      |  3 +++
 graphics/openxr/pkg-plist (new)                      | 13 +++++++++++++
 6 files changed, 51 insertions(+)
Comment 9 commit-hook freebsd_committer freebsd_triage 2024-02-27 21:26:35 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=3a0031639dc5fe8d44b003fbf93512d8aacc4648

commit 3a0031639dc5fe8d44b003fbf93512d8aacc4648
Author:     Vladimir Druzenko <vvd@FreeBSD.org>
AuthorDate: 2024-02-27 21:09:51 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2024-02-27 21:25:47 +0000

    graphics/spirv-cross: new port - required for games/lwjgl3

    Tool for parsing and converting SPIR-V to other shader languages.

    This port required for build lwjgl 3, and lwjgl 3 required for Java
    Minecraft Client 1.20.x run on FreeBSD without linux compatibility layer.

    PR:                     275279 269879 269900
    Approved by:            arrowd (mentor)
    Differential Revision:  https://reviews.freebsd.org/D44118

 graphics/Makefile                    |  1 +
 graphics/spirv-cross/Makefile (new)  | 21 ++++++++++++++++
 graphics/spirv-cross/distinfo (new)  |  3 +++
 graphics/spirv-cross/pkg-descr (new) | 16 ++++++++++++
 graphics/spirv-cross/pkg-plist (new) | 49 ++++++++++++++++++++++++++++++++++++
 5 files changed, 90 insertions(+)
Comment 10 commit-hook freebsd_committer freebsd_triage 2024-03-01 16:48:23 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=f892ca876965b22946bfdae27ad875eecce9a3b8

commit f892ca876965b22946bfdae27ad875eecce9a3b8
Author:     Vladimir Druzenko <vvd@FreeBSD.org>
AuthorDate: 2024-03-01 16:45:23 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2024-03-01 16:48:00 +0000

    graphics/khronos-texture: new port - required for games/lwjgl3

    This port required for build lwjgl 3, and lwjgl 3 required for run Java
    Minecraft Client 1.20.x on FreeBSD without linux compatibility layer.

    PR:                     275279 269879 269900
    Approved by:            arrowd (mentor)
    Differential Revision:  https://reviews.freebsd.org/D44120

 graphics/khronos-texture/Makefile (new)  | 45 ++++++++++++++++++++++++++++++++
 graphics/khronos-texture/distinfo (new)  |  3 +++
 graphics/khronos-texture/pkg-descr (new) | 11 ++++++++
 graphics/khronos-texture/pkg-plist (new) | 16 ++++++++++++
 4 files changed, 75 insertions(+)
Comment 11 Vladimir Druzenko freebsd_committer freebsd_triage 2024-03-07 15:56:41 UTC
Review with port games/lwjgl3: https://reviews.freebsd.org/D44263
Comment 12 commit-hook freebsd_committer freebsd_triage 2024-03-14 17:23:00 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=680dc7bb031d0f708c2dd38f055ec8d63ee68b8a

commit 680dc7bb031d0f708c2dd38f055ec8d63ee68b8a
Author:     Vladimir Druzenko <vvd@FreeBSD.org>
AuthorDate: 2024-03-14 17:14:40 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2024-03-14 17:21:38 +0000

    games/lwjgl3: update to 3.3.4.20231218

    This port required for games/minecraft-client (Java Minecraft Client)
    1.20.x run on FreeBSD without linux compatibility layer.

    Upstream support FreeBSD on amd64 only, but on linux they support
    i386, arm* and ppc* too - if somebody can and want to add support
    for other arches - welcome.

    PR:                     275279 269879 269900
    Approved by:            arrowd (mentor)
    Differential Revision:  https://reviews.freebsd.org/D44263

 games/Makefile                                     |   1 +
 games/lwjgl3/Makefile                              | 154 ++++++++++++++-------
 games/lwjgl3/distinfo                              |  36 ++++-
 games/lwjgl3/files/patch-build.xml (gone)          |  10 --
 .../files/patch-config_build-definitions.xml (new) |  12 ++
 .../files/patch-config_freebsd_build.xml (new)     |  23 +++
 ...n_java_org_lwjgl_system_MemoryManage.java (new) |  12 ++
 ...a_org_lwjgl_system_jemalloc_JEmalloc.java (new) |  69 +++++++++
 ..._java_org_lwjgl_util_shaderc_Shaderc.java (new) |  11 ++
 ...erated_java_org_lwjgl_util_spvc_Spvc.java (new) |  11 ++
 ...patch-platform_build__bsd_ant__build.xml (gone) |  22 ---
 .../files/patch-update-dependencies.xml (new)      |  20 +++
 games/lwjgl3/pkg-descr                             |  13 +-
 games/lwjgl3/pkg-plist (new)                       | 140 +++++++++++++++++++
 14 files changed, 445 insertions(+), 89 deletions(-)
Comment 13 commit-hook freebsd_committer freebsd_triage 2024-03-14 17:23:03 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=dae9e94dee9b0b5da30557653107b7419e260ca0

commit dae9e94dee9b0b5da30557653107b7419e260ca0
Author:     Vladimir Druzenko <vvd@FreeBSD.org>
AuthorDate: 2024-03-14 17:11:14 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2024-03-14 17:21:38 +0000

    games/lwjgl3: bootstrap from games/lwjgl

    Copy games/lwjgl unchanged

    PR:                     275279 269879 269900
    Approved by:            arrowd (mentor)

 games/lwjgl3/Makefile (new)                        | 79 ++++++++++++++++++++++
 games/lwjgl3/distinfo (new)                        |  3 +
 games/lwjgl3/files/patch-build.xml (new)           | 10 +++
 .../patch-platform_build__bsd_ant__build.xml (new) | 22 ++++++
 games/lwjgl3/pkg-descr (new)                       |  1 +
 5 files changed, 115 insertions(+)