Initial import of lwjgl, a java game development library. This is required
for games like Minecraft. Next release the patches can probably be removed as they were submitted and merged with upstream: https://github.com/LWJGL/lwjgl/pull/54 OK sthen@
This commit is contained in:
parent
8da72b547c
commit
1f809cb430
64
games/lwjgl/Makefile
Normal file
64
games/lwjgl/Makefile
Normal file
@ -0,0 +1,64 @@
|
||||
# $OpenBSD: Makefile,v 1.1.1.1 2014/09/30 17:44:48 abieber Exp $
|
||||
|
||||
COMMENT= lightweight game library for java
|
||||
|
||||
V= 2.9.1
|
||||
GH_ACCOUNT= LWJGL
|
||||
GH_PROJECT= lwjgl
|
||||
GH_TAGNAME= ${GH_PROJECT}${V}
|
||||
DISTNAME= lwjgl${V}
|
||||
PKGNAME= lwjgl-${V}
|
||||
|
||||
.if ${MACHINE_ARCH} == "i386"
|
||||
M_ARCH= ""
|
||||
.elif ${MACHINE_ARCH} == "amd64"
|
||||
M_ARCH= 64
|
||||
.endif
|
||||
|
||||
LWJGL_HOME= ${PREFIX}/share/lwjgl
|
||||
|
||||
CATEGORIES= games devel
|
||||
|
||||
HOMEPAGE= http://lwjgl.org
|
||||
|
||||
MAINTAINER= Aaron Bieber <abieber@openbsd.org>
|
||||
|
||||
# BSD
|
||||
PERMIT_PACKAGE_CDROM= Yes
|
||||
|
||||
# GL listed here as it is dlopen()d by the lib
|
||||
WANTLIB += GL X11 Xcursor Xext Xrandr Xxf86vm m pthread
|
||||
|
||||
MODULES= java
|
||||
MODJAVA_VER= 1.6+
|
||||
MODJAVA_BUILD= ant
|
||||
MODJAVA_JRERUN= Yes
|
||||
|
||||
BUILD_DEPENDS= audio/openal \
|
||||
devel/apache-ant
|
||||
|
||||
SHARED_ONLY= Yes
|
||||
|
||||
NO_TEST= Yes
|
||||
|
||||
ANT_CMD= ${SETENV} ${MAKE_ENV} PATH=${JAVA_HOME}/bin:${PATH} \
|
||||
${LOCALBASE}/bin/ant
|
||||
|
||||
SUBST_VARS+= M_ARCH
|
||||
|
||||
pre-configure:
|
||||
perl -pi -e 's,/usr/X11R6,${X11BASE},g' \
|
||||
${WRKSRC}/platform_build/bsd_ant/build.xml
|
||||
perl -pi -e 's,/usr/local,${LOCALBASE},g' \
|
||||
${WRKSRC}/platform_build/bsd_ant/build.xml
|
||||
|
||||
do-build:
|
||||
cd ${WRKSRC} && ${ANT_CMD}
|
||||
|
||||
do-install:
|
||||
${INSTALL_DATA_DIR} ${LWJGL_HOME}
|
||||
${INSTALL_DATA} ${WRKSRC}/libs/lwjgl.jar ${LWJGL_HOME}/
|
||||
${INSTALL_DATA} ${WRKSRC}/libs/lwjgl_util.jar ${LWJGL_HOME}/
|
||||
${INSTALL_DATA} ${WRKSRC}/libs/openbsd/liblwjgl${M_ARCH}.so ${LWJGL_HOME}/
|
||||
|
||||
.include <bsd.port.mk>
|
2
games/lwjgl/distinfo
Normal file
2
games/lwjgl/distinfo
Normal file
@ -0,0 +1,2 @@
|
||||
SHA256 (lwjgl2.9.1.tar.gz) = 5oN55njpnZvgtXqjw4gR6MbtguHCzCjb5xCu1cX3UFE=
|
||||
SIZE (lwjgl2.9.1.tar.gz) = 15044040
|
67
games/lwjgl/patches/patch-build_xml
Normal file
67
games/lwjgl/patches/patch-build_xml
Normal file
@ -0,0 +1,67 @@
|
||||
$OpenBSD: patch-build_xml,v 1.1.1.1 2014/09/30 17:44:48 abieber Exp $
|
||||
--- build.xml.orig Mon Dec 2 12:50:04 2013
|
||||
+++ build.xml Mon Sep 29 13:37:08 2014
|
||||
@@ -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. -->
|
||||
@@ -33,6 +32,7 @@
|
||||
<mkdir dir="${lwjgl.temp}/native/windows" taskname="initialiazing temp/windows folder" />
|
||||
<mkdir dir="${lwjgl.temp}/native/linux" taskname="initialiazing temp/linux folder" />
|
||||
<mkdir dir="${lwjgl.temp}/native/freebsd" taskname="initialiazing temp/freebsd folder" />
|
||||
+ <mkdir dir="${lwjgl.temp}/native/openbsd" taskname="initialiazing temp/openbsd folder" />
|
||||
<mkdir dir="${lwjgl.temp}/native/macosx" taskname="initialiazing temp/macosx folder" />
|
||||
<mkdir dir="${lwjgl.temp}/native/solaris" taskname="initialiazing temp/solaris folder" />
|
||||
</target>
|
||||
@@ -249,6 +249,11 @@
|
||||
<patternset refid="lwjgl-freebsd.fileset" />
|
||||
</fileset>
|
||||
</copy>
|
||||
+ <copy todir="${lwjgl.temp}/native/openbsd" failonerror="false">
|
||||
+ <fileset dir="${lwjgl.lib}/openbsd">
|
||||
+ <patternset refid="lwjgl-openbsd.fileset" />
|
||||
+ </fileset>
|
||||
+ </copy>
|
||||
<copy todir="${lwjgl.temp}/native/macosx">
|
||||
<fileset dir="${lwjgl.lib}/macosx">
|
||||
<patternset refid="lwjgl-macosx.fileset" />
|
||||
@@ -423,6 +428,8 @@
|
||||
lwjgl.native.linux.version = ${lwjgl.native.linux.version}
|
||||
lwjgl.java.freebsd.version = ${lwjgl.java.linux.version}
|
||||
lwjgl.native.freebsd.version = ${lwjgl.native.linux.version}
|
||||
+ lwjgl.java.openbsd.version = ${lwjgl.java.linux.version}
|
||||
+ lwjgl.native.openbsd.version = ${lwjgl.native.linux.version}
|
||||
lwjgl.java.macosx.version = ${lwjgl.java.macosx.version}
|
||||
lwjgl.native.macosx.version = ${lwjgl.native.macosx.version}
|
||||
</echo>
|
||||
@@ -487,6 +494,11 @@
|
||||
</condition>
|
||||
<antcall target="-compile_native_freebsd" />
|
||||
|
||||
+ <condition property="lwjgl.platform.openbsd">
|
||||
+ <os name="OpenBSD" />
|
||||
+ </condition>
|
||||
+ <antcall target="-compile_native_openbsd" />
|
||||
+
|
||||
<condition property="lwjgl.platform.solaris">
|
||||
<os name="SunOS" />
|
||||
</condition>
|
||||
@@ -520,6 +532,14 @@
|
||||
<target name="-compile_native_freebsd" if="lwjgl.platform.freebsd">
|
||||
<ant antfile="platform_build/bsd_ant/build.xml" inheritAll="false"/>
|
||||
<copy todir="${lwjgl.lib}/freebsd">
|
||||
+ <fileset dir="${lwjgl.bin}/lwjgl" includes="liblwjgl*.so"/>
|
||||
+ </copy>
|
||||
+ </target>
|
||||
+
|
||||
+ <!-- Compiles LWJGL on OpenBSD platforms -->
|
||||
+ <target name="-compile_native_openbsd" if="lwjgl.platform.openbsd">
|
||||
+ <ant antfile="platform_build/bsd_ant/build.xml" inheritAll="false"/>
|
||||
+ <copy todir="${lwjgl.lib}/openbsd">
|
||||
<fileset dir="${lwjgl.bin}/lwjgl" includes="liblwjgl*.so"/>
|
||||
</copy>
|
||||
</target>
|
53
games/lwjgl/patches/patch-platform_build_bsd_ant_build_xml
Normal file
53
games/lwjgl/patches/patch-platform_build_bsd_ant_build_xml
Normal file
@ -0,0 +1,53 @@
|
||||
$OpenBSD: patch-platform_build_bsd_ant_build_xml,v 1.1.1.1 2014/09/30 17:44:48 abieber Exp $
|
||||
--- platform_build/bsd_ant/build.xml.orig Mon Dec 2 12:50:04 2013
|
||||
+++ platform_build/bsd_ant/build.xml Mon Sep 29 13:37:33 2014
|
||||
@@ -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/local/lib -lm -lX11 -lXext -lXcursor -lXrandr -pthread -L${java.home}/lib/i386 -ljawt" />
|
||||
- <property name="libs64" value="-L/usr/local/lib -lm -lX11 -lXext -lXcursor -lXrandr -lXxf86vm -pthread -L${java.home}/lib/amd64 -ljawt" />
|
||||
+ <property name="libs32" value="-L/usr/X11R6/lib -lm -lX11 -lXext -lXcursor -lXrandr -pthread -L${java.home}/lib/i386 -ljawt" />
|
||||
+ <property name="libs64" value="-L/usr/X11R6/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">
|
||||
@@ -57,6 +57,14 @@
|
||||
</and>
|
||||
</condition>
|
||||
|
||||
+ <!-- On OpenBSD, the 64 bit jre doesn't have the 32 bit libs -->
|
||||
+ <condition property="build.64bit.only">
|
||||
+ <and>
|
||||
+ <os name="OpenBSD"/>
|
||||
+ <equals arg1="${hwplatform}" arg2="amd64"/>
|
||||
+ </and>
|
||||
+ </condition>
|
||||
+
|
||||
<antcall target="compile32"/>
|
||||
<antcall target="compile64"/>
|
||||
</target>
|
||||
@@ -67,8 +75,10 @@
|
||||
<arg line="${cflags32} ${cflags_pthread}"/>
|
||||
<arg value="-I${java.home}/include"/>
|
||||
<arg value="-I${java.home}/include/freebsd"/>
|
||||
+ <arg value="-I${java.home}/include/openbsd"/>
|
||||
<arg value="-I${java.home}/../include"/>
|
||||
<arg value="-I${java.home}/../include/freebsd"/>
|
||||
+ <arg value="-I${java.home}/../include/openbsd"/>
|
||||
<arg value="-I/usr/local/include"/>
|
||||
<arg value="-I${native}/common"/>
|
||||
<arg value="-I${native}/common/opengl"/>
|
||||
@@ -99,9 +109,12 @@
|
||||
<arg line="${cflags64} ${cflags_pthread}"/>
|
||||
<arg value="-I${java.home}/include"/>
|
||||
<arg value="-I${java.home}/include/freebsd"/>
|
||||
+ <arg value="-I${java.home}/include/openbsd"/>
|
||||
<arg value="-I${java.home}/../include"/>
|
||||
<arg value="-I${java.home}/../include/freebsd"/>
|
||||
+ <arg value="-I${java.home}/../include/openbsd"/>
|
||||
<arg value="-I/usr/local/include"/>
|
||||
+ <arg value="-I/usr/X11R6/include"/>
|
||||
<arg value="-I${native}/common"/>
|
||||
<arg value="-I${native}/common/opengl"/>
|
||||
<arg value="-I${native}/linux"/>
|
@ -0,0 +1,15 @@
|
||||
$OpenBSD: patch-src_native_linux_opengl_extgl_glx_c,v 1.1.1.1 2014/09/30 17:44:48 abieber Exp $
|
||||
--- src/native/linux/opengl/extgl_glx.c.orig Mon Sep 29 13:38:40 2014
|
||||
+++ src/native/linux/opengl/extgl_glx.c Mon Sep 29 13:39:58 2014
|
||||
@@ -220,7 +220,11 @@ bool extgl_Open(JNIEnv *env) {
|
||||
*
|
||||
* DRI drivers need this flag to work properly
|
||||
*/
|
||||
+#ifdef __OpenBSD__
|
||||
+ lib_gl_handle = dlopen("libGL.so", RTLD_LAZY | RTLD_GLOBAL);
|
||||
+#else
|
||||
lib_gl_handle = dlopen("libGL.so.1", RTLD_LAZY | RTLD_GLOBAL);
|
||||
+#endif
|
||||
if (lib_gl_handle == NULL) {
|
||||
throwFormattedException(env, "Error loading libGL.so.1: %s", dlerror());
|
||||
return false;
|
3
games/lwjgl/pkg/DESCR
Normal file
3
games/lwjgl/pkg/DESCR
Normal file
@ -0,0 +1,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.
|
5
games/lwjgl/pkg/PLIST
Normal file
5
games/lwjgl/pkg/PLIST
Normal file
@ -0,0 +1,5 @@
|
||||
@comment $OpenBSD: PLIST,v 1.1.1.1 2014/09/30 17:44:48 abieber Exp $
|
||||
share/lwjgl/
|
||||
share/lwjgl/liblwjgl${M_ARCH}.so
|
||||
share/lwjgl/lwjgl.jar
|
||||
share/lwjgl/lwjgl_util.jar
|
Loading…
x
Reference in New Issue
Block a user