wip lwjgl3 port for freebsd

This commit is contained in:
Mia T. Rain 2022-07-27 04:51:37 -04:00
commit 734469172a
Signed by: Mia
GPG Key ID: 5F40D66F94DECFE8
3 changed files with 86 additions and 0 deletions

74
Makefile Normal file
View File

@ -0,0 +1,74 @@
# Created by: Mia <mia-rain@tuta.io>
PORTNAME= lwjgl3
DISTVERSION= 3.2.4.alpha2
CATEGORIES= games java
MASTER_SITES= https://github.com/JetBrains/kotlin/releases/download/v1.3.61/:compiler https://kurt.mosiejcz.uk/pub/distfiles/:maven
DISTFILES+= kotlin-compiler-1.3.61.zip:compiler lwjgl3-maven-20210208.tar.gz:maven
# these maven libaraies are pulled from openbsd; their original source is https://www.lwjgl.org/customize with mode:maven
# however 3.2.4* is an unoffical release and modifications may have been made to the maven libs
EXTRACT_ONLY= ${DISTNAME}.tar.gz
MAINTAINER= mia-rain@tuta.io
COMMENT= Lightweight Java Game Library v3
LICENSE= BSD3CLAUSE
ONLY_FOR_ARCHS= amd64 powerpc64 powerpc64le
BROKEN_i386= ld: error: undefined symbol: __stack_smash_handler # openbsd reports this error, however I am unable to test it
BUILD_DEPENDS= ant:devel/apache-ant \
unzip:archivers/unzip \
ant:devel/apache-ant \
${PREFIX}/libdata/pkgconfig/bullet.pc:devel/bullet \
${PREFIX}/include/dynload.h:devel/dyncall\
${PREFIX}/libdata/pkgconfig/liblz4.pc:archivers/liblz4
LIB_DEPENDS= libopenal.so:audio/openal-soft \
libopus.so:audio/opus \
liblmdb.so:databases/lmdb \
libglfw.so:graphics/glfw \
libassimp.so:multimedia/assimp \
libxxhash.so:devel/xxhash \
libgtk-3.so:x11-toolkits/gtk30
USES= dos2unix xorg
USE_GITHUB= yes
GH_ACCOUNT= kmosiejczuk
GH_TAGNAME= 3b9d8ce
GH_PROJECT= ${PORTNAME}
DOS2UNIX_REGEX= .*.[^jp][^an][^rg]$
USE_JAVA= yes
USE_ANT= yes
USE_XORG= xcursor xrandr xxf86vm
MAKE_ENV+= LWJGL_BUILD_OFFLINE=true
ALL_TARGET= compile-templates generate compile release
JAVA_VERSION= 8
# LWJGL3 calls for 10+ however bindings /fails/ to compile on newer than 8
# lang/rhino might fix this
LWJGL3_HOME= ${JAVASHAREDIR}/lwjgl3
.include <bsd.port.pre.mk>
post-extract:
${MKDIR} ${WRKSRC}/bin/libs
${LOCALBASE}/bin/unzip -oq -d ${WRKSRC}/bin/libs/ \
${DISTDIR}/kotlin-compiler-1.3.61.zip
${TAR} -C ${WRKSRC}/bin/libs -zxf \
${DISTDIR}/lwjgl3-maven-20210208.tar.gz
do-install:
${SETENV} ${MAKE_ENV} LWJGL_BUILD_OFFLINE=true
${RM} ${WRKSRC}/bin/RELEASE/lwjgl*/lwjgl-*-sources.jar
${MKDIR} ${STAGEDIR}/${LWJGL3_HOME}
for x in ${WRKSRC}/bin/RELEASE/lwjgl*/*.jar; do \
${INSTALL_DATA} $$x ${STAGEDIR}/${LWJGL3_HOME}/; \
done
for x in ${WRKSRC}/bin/RELEASE/lwjgl*/*license.txt; do \
${INSTALL_DATA} $$x ${STAGEDIR}/${LWJGL3_HOME}/; \
done
.include <bsd.port.post.mk>

7
distinfo Normal file
View File

@ -0,0 +1,7 @@
TIMESTAMP = 1658622735
SHA256 (kotlin-compiler-1.3.61.zip) = 3901151ad5d94798a268d1771c6c0b7e305a608c2889fc98a674802500597b1c
SIZE (kotlin-compiler-1.3.61.zip) = 53125546
SHA256 (lwjgl3-maven-20210208.tar.gz) = 7a3e11b74c9b2c0144105b2eabcbe81a66cac42b053e7782b6d59e3ec932c69b
SIZE (lwjgl3-maven-20210208.tar.gz) = 5798632
SHA256 (kmosiejczuk-lwjgl3-3.2.4.alpha2-3b9d8ce_GH0.tar.gz) = c952c7a0f6244d78a8ddeda0ecd1911f16e507b4b6cc972fd9d88660236a6d20
SIZE (kmosiejczuk-lwjgl3-3.2.4.alpha2-3b9d8ce_GH0.tar.gz) = 5214336

5
pkg-descr Normal file
View File

@ -0,0 +1,5 @@
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://www.lwjgl.org/