Page MenuHomeFreeBSD

games/lwjgl3: Lightweight Java Game Library 3
Needs ReviewPublic

Authored by me_cameronkatri.com on Jul 9 2021, 2:53 PM.

Details

Reviewers
koobs
Group Reviewers
Contributor Reviewers (ports)
Summary

Adds lwjgl3, this is a second package because some package depend on lwjgl 2. This successfully runs Minecraft 1.14.3-1.17.1 with MultiMC. This is marked as amd64 only because I do not have any none amd64 hardware to test it on.

Lightweight Java Game Library 3

The Lightweight Java Game Library (LWJGL) is a solution aimed
directly at professional and amateur Java programmers alike to
enable commercial quality games to be written in Java.

WWW: https://github.com/CRKatri/lwjgl3
Test Plan
  • portlint: Passed
  • testport: poudriere with amd64 13.0 RELEASE built successfully.

Diff Detail

Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

me_cameronkatri.com created this revision.
me_cameronkatri.com edited the summary of this revision. (Show Details)
me_cameronkatri.com removed a subscriber: games.

Very nice :)

games/lwjgl3/Makefile
17

^ no need to specify a dependency on the same port more than once

20

don't use LIB_DEPENDS to depend on glib, gtk, use USES=gnome combined with USE_GNOME=...

39

^it feels a bit weird, to rm in install.

games/lwjgl3/Makefile
39

When should I get rid of these files then?

Add audio/opus, and devel/ocl-icd to LIB_DEPENDS which are all dlopen()d
Use USE_GNOME instead of LIB_DEPENDS
Add USE_XORG with x11, which is dlopen()d
Add egl and glesv2 to USE_GL which are also dlopen()d
Remove duplicate BUILD_DEPENDS on devel/dyncall

games/lwjgl3/Makefile
39

post-extract possibly

I hope you are planing to get your fork merged upstream? :)

games/lwjgl3/Makefile
33

^ I don't quite see at the moment why you would need to include bsd.port.pre.mk, instead of simply using bsd.port.mk at the bottom.

games/lwjgl3/Makefile
39

post-extract possibly

If those files are needed for build but not afterwards, then do-install seems OK.

I hope you are planing to get your fork merged upstream? :)

The lwjgl devs don’t want to support targets that they do not have CI for, although many people have offered CI runners for then running FreeBSD they still seem to have no interest.

me_cameronkatri.com added inline comments.
games/lwjgl3/Makefile
39

These files are generated by the release target in do-build, so they don’t exist then.

games/lwjgl3/Makefile
29

^ you can run portclippy from ports-mgmt/portfmt to get the Makefile order a bit more "standard" conform.

games/lwjgl3/pkg-descr
3

Append a URL to your fork or upstream:

WWW: https://...

Add link to website in pkg-descr
Patch out javadoc and sources targets from build.xml
Run portclippy

me_cameronkatri.com marked 3 inline comments as done.

Don't include bsd.port.pre.mk

koobs requested changes to this revision.Jul 11 2021, 10:31 AM

@me_cameronkatri.com Could you provide this change (new port) as a diff against the existing games/lwjgl port and add a comment regarding patch-build.xml and why its necessary.

Also, while talking with someone on IRC about updating and level'ing up all our minecraft ports, I investigated MultiMC as the second consumer of lwgl and couldn't identify it as a dependency in their upstream build docs [1]

If lwgl isn't an actual dependency or MultiMC (our port version 0.6.11 is now .1 behind the latest release) can use lwgl3, then we should update the existing port.

See also the following bug https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=255349 which provided LWGL3 as well

[1] https://github.com/MultiMC/MultiMC5/blob/develop/BUILD.md

This revision now requires changes to proceed.Jul 11 2021, 10:31 AM
koobs retitled this revision from games/lwjgl3: New port to games/lwjgl3: Lightweight Java Game Library 3.Jul 11 2021, 10:33 AM
koobs edited the summary of this revision. (Show Details)
koobs edited the test plan for this revision. (Show Details)

Note also that with poudriere you can easily test i386 (and other ARCHs) on an amd64 host, which uses jails. If you need help #freebsd-ports @ Libera IRC

@me_cameronkatri.com Could you provide this change (new port) as a diff against the existing games/lwjgl port and add a comment regarding patch-build.xml and why its necessary.

patch-build.xml stops the building of the *-sources.jar and *-javadoc.jar files that I was deleting before, because they don’t get installed, it very much improves the build time.

Also, while talking with someone on IRC about updating and level'ing up all our minecraft ports, I investigated MultiMC as the second consumer of lwgl and couldn't identify it as a dependency in their upstream build docs [1]

Well lwjgl isn’t a dep of multimc, but of Minecraft, on other platforms multiMC will download the lwjgl classes from minecraft.net, but lwjgl doesn’t work in the linuxulator, hence minecraft-client to replace the downloaded with the installed libs.

If lwgl isn't an actual dependency or MultiMC (our port version 0.6.11 is now .1 behind the latest release) can use lwgl3, then we should update the existing port.

Minecraft 1.12 and below use lwjgl but Minecraft 1.13 and up use lwjgl3, I know that I and many others still regularly play 1.12.2 and below because of the fact they are very popular with mod makers and modpack makers. So I want them to be separated so that I can install both.

See also the following bug https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=255349 which provided LWGL3 as well

[1] https://github.com/MultiMC/MultiMC5/blob/develop/BUILD.md

me_cameronkatri.com edited the test plan for this revision. (Show Details)

Regenerate patch with make makepatch
Don't unnecessarily define DISTNAME.

Add devel/pkgconf dependency
Remove amd64 limit, although I couldn't get it to compile for i386 it may work for other archs.

arrowd added inline comments.
games/lwjgl3/Makefile
15

USES=pkgconf

Fix devel/pkgconf dependency (USE=pkgconf)

games/lwjgl3/Makefile
20

pkgconfig, not pkgconf :)

The build fails for me on 140-amd64 [1]

[Compiler] In file included from /wrkdirs/usr/ports/games/lwjgl3/work/lwjgl3-3.2.2-full/modules/lwjgl/xxhash/src/generated/c/org_lwjgl_util_xxhash_XXHash.c:10:
[Compiler] In file included from ../../../../modules/lwjgl/xxhash/src/main/c/xxhash.h:433:
[Compiler] In file included from ../../../../modules/lwjgl/xxhash/src/main/c/xxhash.c:1024:
[Compiler] ../../../../modules/lwjgl/xxhash/src/main/c/xxh3.h:620:1: fatal error: loop not unrolled: the optimizer was unable to perform the requested transformation; the transformation might be disabled or specified as part of an unsupported transformation ordering [-Wpass-failed=transform-warning]
[Compiler] XXH3_hashLong_64b(const void* data, size_t len, XXH64_hash_t seed)
[Compiler] ^
[Compiler] 1 error generated.
     [c++] Linking lwjgl_par
     [c++] Linking lwjgl_meow
     [c++] Linking lwjgl_remotery
     [c++] Linking lwjgl_tinyfd
     [c++] Linking lwjgl_vma
     [c++] Linking lwjgl_opengles
     [c++] Linking lwjgl

[1] https://people.freebsd.org/~tcberner/logs/lwjgl3-3.2.2.log

Fix building in pourdriere on amd64, i386 fails to build.

The build fails for me on 140-amd64 [1]

Should be fixed now.

The build fails for me on 140-amd64 [1]

Should be fixed now.

Macro stlgtm: