Page MenuHomeFreeBSD

games/lwjgl3: Lightweight Java Game Library 3
AbandonedPublic

Authored by me_cameronkatri.com on Jul 9 2021, 2:53 PM.
Tags
None
Referenced Files
F103132792: D31119.diff
Thu, Nov 21, 10:42 AM
F103130248: D31119.id92015.diff
Thu, Nov 21, 9:53 AM
F103126109: D31119.id.diff
Thu, Nov 21, 8:36 AM
F103068240: D31119.id.diff
Wed, Nov 20, 12:35 PM
F103066145: D31119.id92076.diff
Wed, Nov 20, 11:56 AM
Unknown Object (File)
Wed, Nov 20, 5:35 AM
Unknown Object (File)
Tue, Nov 19, 1:02 PM
Unknown Object (File)
Tue, Nov 19, 11:10 AM

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

Repository
R11 FreeBSD ports repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
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
34

^ 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
30

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

games/lwjgl3/pkg-descr
4

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
16

USES=pkgconf

Fix devel/pkgconf dependency (USE=pkgconf)

games/lwjgl3/Makefile
21

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:

Does lwjgl3 have a test suite? If so, it would be great to hook it up in a test target with TEST_DEPENDS where necessary

games/lwjgl3/Makefile
5

3.2.3 is out, can you rebase in your fork and update patch here?

8

Is the aim to upstream this fork in the short term? Are there any open issues / pr's or discussions upstream re FreeBSD support?

13

Add LICENSE_FILE when one is provided in the distribution files

15

Does this need to be the static library? Whats the nature of the linking for this and is it required?

17–19

Minor nit: fix extra whitespace

28

Is this required, whats is it for? Does it stop the build from using the network?

games/lwjgl3/pkg-descr
6

Should we be providing upstreams URL here, particularly if the goal is to upstream freebsd support?

koobs requested changes to this revision.Oct 8 2021, 7:36 AM
This revision now requires changes to proceed.Oct 8 2021, 7:36 AM

Additionally: Should we move games/lwjgl to games/lwjgl2 leaving the portname open for this, or are both 2.x and 3.x going to be long-lived concurrent branches in the long-term?

I see this review has not done any progress since October 2021.

@me_cameronkatri.com: May I ask if you are still working on it? I think it would still be useful to have this port in the tree.

games/lwjgl3/Makefile
5

I will look into it, I am pretty swamped right now, hopefully I will be able to get to it soon.

8

According to previous discussions, upstream is not interesting in it unless they get a FreeBSD runner for their CI, but hasn't taken up any of the offers.

15

devel/dyncall only has a static library

28

Yes.

A patch to update the games/lwjgl port to 3.3.1 has been proposed on bugzilla: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=269879 .

Is this differential revision still relevant? Please note that the bugzilla patch does not change MASTER_SITES: it keeps the same upstream.

Hello.

Does anyone know if lwjgl 2.x will be compatible with 3.x ?
Considering that the source code of both versions is stored in separate repositories.

I tried to build lwjgl3 but my build failed.

tested in my jail: FreeBSD-13.1 amd64

Does anyone have any idea?

BUILD FAILED
/usr/ports/games/lwjgl3/work/lwjgl3-3.2.2-full/build.xml:407: The following error occurred while executing this line:
/usr/ports/games/lwjgl3/work/lwjgl3-3.2.2-full/config/freebsd/build.xml:145: The following error occurred while executing this line:
/usr/ports/games/lwjgl3/work/lwjgl3-3.2.2-full/config/freebsd/build.xml:80: The following error occurred while executing this line:
/usr/ports/games/lwjgl3/work/lwjgl3-3.2.2-full/config/freebsd/build.xml:26: apply returned: 1

Total time: 2 minutes 27 seconds
*** Error code 1

Just to make things clearer: as @Clockwork6400_protonmail.com explained, the update attempt in https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=269879 failed. So this review is again the only attempt to get lwjgl3 working on FreeBSD at the moment.

Is someone actually still working on it?

ping! what's left before we can have a lwjgl3 port landed?

vvd added inline comments.
games/lwjgl3/Makefile
8

They added FreeBSD amd64 support: https://github.com/LWJGL/lwjgl3/issues/421
But build stage download a lot of different files.

games/lwjgl3/Makefile
8

Oh, that's great! Unfortunately I don't have the bandwidth to fix this diff and make it proper with upstream so I'm gonna close this diff and let someone else do it proper.

Review with port games/lwjgl3 3.3.4 (snapshot form 2023-12-18): https://reviews.freebsd.org/D44263