summaryrefslogtreecommitdiff
path: root/games/lwjgl
diff options
context:
space:
mode:
authorChris Rees <crees@FreeBSD.org>2012-04-18 13:35:45 +0000
committerChris Rees <crees@FreeBSD.org>2012-04-18 13:35:45 +0000
commit261e45efd9cd86a8041a019a6e7750851b687734 (patch)
tree1d87fadc84152e156128bf6ad177260f76532ad3 /games/lwjgl
parent- Remove MD5. (diff)
The Lightweight Java Game Library
WWW: http://www.lwjgl.org PR: ports/166679 Submitted by: loader
Notes
Notes: svn path=/head/; revision=295010
Diffstat (limited to 'games/lwjgl')
-rw-r--r--games/lwjgl/Makefile75
-rw-r--r--games/lwjgl/distinfo2
-rw-r--r--games/lwjgl/files/patch-build.xml75
-rw-r--r--games/lwjgl/files/patch-platform_build__build-applet.xml21
-rw-r--r--games/lwjgl/files/patch-platform_build__linux_ant__build.xml75
-rw-r--r--games/lwjgl/files/patch-src__java__org__lwjgl__MacOSXSysImplementation.java23
-rw-r--r--games/lwjgl/files/patch-src__java__org__lwjgl__opengl__MacOSXDisplay.java32
-rw-r--r--games/lwjgl/pkg-descr3
8 files changed, 306 insertions, 0 deletions
diff --git a/games/lwjgl/Makefile b/games/lwjgl/Makefile
new file mode 100644
index 000000000000..0e28f51adae8
--- /dev/null
+++ b/games/lwjgl/Makefile
@@ -0,0 +1,75 @@
+# New ports collection makefile for: jinput
+# Date created: Mar 25 2012
+# Whom: loader <loader@freebsdmall.com>
+#
+# $FreeBSD$
+#
+
+PORTNAME= lwjgl
+DISTVERSION= 2.7.1
+CATEGORIES= games java
+MASTER_SITES= SF/java-game-lib/Official%20Releases/${PORTNAME:U}%20${PORTVERSION}/
+DISTNAME= ${PORTNAME}-source-${DISTVERSION}
+
+MAINTAINER= loader@freebsdmall.com
+COMMENT= The Lightweight Java Game Library
+
+BUILD_DEPENDS= ${JAVALIBDIR}/jutils/jutils.jar:${PORTSDIR}/games/jutils \
+ ${JAVALIBDIR}/jinput/jinput.jar:${PORTSDIR}/games/jinput \
+ ${LOCALBASE}/include/X11/extensions/xf86vmode.h:${PORTSDIR}/x11/libXxf86vm \
+ ${LOCALBASE}/include/X11/extensions/Xrandr.h:${PORTSDIR}/x11/libXrandr \
+ ${LOCALBASE}/include/X11/Xcursor/Xcursor.h:${PORTSDIR}/x11/libXcursor
+RUN_DEPENDS= ${JAVALIBDIR}/jutils/jutils.jar:${PORTSDIR}/games/jutils \
+ ${JAVALIBDIR}/jinput/jinput.jar:${PORTSDIR}/games/jinput \
+ ${LOCALBASE}/include/X11/extensions/xf86vmode.h:${PORTSDIR}/x11/libXxf86vm \
+ ${LOCALBASE}/include/X11/extensions/Xrandr.h:${PORTSDIR}/x11/libXrandr \
+ ${LOCALBASE}/include/X11/Xcursor/Xcursor.h:${PORTSDIR}/x11/libXcursor
+
+ONLY_FOR_ARCHS= i386 amd64
+WRKSRC= ${WRKDIR}/${PORTNAME}-${DISTVERSION}
+EXTRACT_AFTER_ARGS= -d ${WRKSRC}
+
+USE_ZIP= yes
+USE_JAVA= yes
+USE_LDCONFIG= yes
+USE_DOS2UNIX= yes
+JAVA_VERSION= 1.6+
+JAVA_OS= native
+JAVA_VENDOR= openjdk
+USE_ANT= yes
+MAKE_ENV+= CLASSPATH=${JAVALIBDIR}/jutils/jutils.jar:${JAVALIBDIR}/jinput/jinput.jar
+ALL_TARGET= jars compile_native
+
+PLIST_FILES= %%JAVAJARDIR%%/${PORTNAME}/${PORTNAME}.jar \
+ %%JAVAJARDIR%%/${PORTNAME}/${PORTNAME}_test.jar \
+ %%JAVAJARDIR%%/${PORTNAME}/${PORTNAME}_util.jar \
+ %%JAVAJARDIR%%/${PORTNAME}/${PORTNAME}_util_applet.jar
+PLIST_DIRS= %%JAVAJARDIR%%/${PORTNAME} \
+ lib/${PORTNAME}${PORTVERSION}
+
+.include <bsd.port.pre.mk>
+
+.if ${ARCH} == "i386"
+PLIST_FILES+= lib/${PORTNAME}${PORTVERSION}/lib${PORTNAME}.so
+.endif
+
+.if ${ARCH} == "amd64"
+PLIST_FILES+= lib/${PORTNAME}${PORTVERSION}/lib${PORTNAME}64.so
+.endif
+
+do-install:
+ @${ECHO_MSG} -n ">> Install JAR files in ${JAVAJARDIR}/${PORTNAME}/ ..."
+ @${MKDIR} ${JAVAJARDIR}/${PORTNAME}
+.for _jar in ${PLIST_FILES:M*.jar}
+ @${INSTALL_DATA} ${WRKSRC}/libs/${_jar:T} ${JAVAJARDIR}/${PORTNAME}
+.endfor
+ @${ECHO_MSG} " [ DONE ]"
+ @${MKDIR} ${PREFIX}/lib/${PORTNAME}${PORTVERSION}
+.if ${ARCH} == "i386"
+ @${INSTALL_DATA} ${WRKSRC}/libs/linux/lib${PORTNAME}.so ${PREFIX}/lib/${PORTNAME}${PORTVERSION}
+.endif
+.if ${ARCH} == "amd64"
+ @${INSTALL_DATA} ${WRKSRC}/libs/linux/lib${PORTNAME}64.so ${PREFIX}/lib/${PORTNAME}${PORTVERSION}
+.endif
+
+.include <bsd.port.post.mk>
diff --git a/games/lwjgl/distinfo b/games/lwjgl/distinfo
new file mode 100644
index 000000000000..2bd509c7f0f9
--- /dev/null
+++ b/games/lwjgl/distinfo
@@ -0,0 +1,2 @@
+SHA256 (lwjgl-source-2.7.1.zip) = f6805e7ec4f00198b772063d0df5e2063f44ce839f615677b9bc68ad037644b6
+SIZE (lwjgl-source-2.7.1.zip) = 2149031
diff --git a/games/lwjgl/files/patch-build.xml b/games/lwjgl/files/patch-build.xml
new file mode 100644
index 000000000000..f746b8ded716
--- /dev/null
+++ b/games/lwjgl/files/patch-build.xml
@@ -0,0 +1,75 @@
+Obtained from http://foo.poildetroll.net/minecraft/lwjgl-2.7.1-freebsd.diff
+
+
+--- ./build.xml.orig 2011-02-06 19:23:40.000000000 +0000
++++ ./build.xml 2012-03-26 18:14:03.079373854 +0000
+@@ -246,7 +246,7 @@
+ <class name="org.lwjgl.opengl.WindowsContextImplementation" />
+ </javah>
+
+- <javah classpath="${lwjgl.bin}" destdir="${lwjgl.src.native}/macosx" force="yes">
++ <!-- <javah classpath="${lwjgl.bin}" destdir="${lwjgl.src.native}/macosx" force="yes">
+ <class name="org.lwjgl.MacOSXSysImplementation" />
+ <class name="org.lwjgl.opengl.MacOSXMouseEventQueue" />
+ <class name="org.lwjgl.opengl.MacOSXCanvasPeerInfo" />
+@@ -254,7 +254,7 @@
+ <class name="org.lwjgl.opengl.MacOSXPbufferPeerInfo" />
+ <class name="org.lwjgl.opengl.MacOSXDisplay" />
+ <class name="org.lwjgl.opengl.MacOSXContextImplementation" />
+- </javah>
++ </javah> -->
+
+ <javah classpath="${lwjgl.bin}" destdir="${lwjgl.src.headers}" force="yes">
+ <class name="org.lwjgl.opengl.AWTSurfaceLock" />
+@@ -293,13 +293,13 @@
+ </tokenfilter>
+ </filterchain>
+ </loadfile>
+- <loadfile srcfile="${lwjgl.src}/java/org/lwjgl/MacOSXSysImplementation.java" property="lwjgl.java.macosx.version">
++ <!-- <loadfile srcfile="${lwjgl.src}/java/org/lwjgl/MacOSXSysImplementation.java" property="lwjgl.java.macosx.version">
+ <filterchain>
+ <tokenfilter>
+ <containsstring contains="JNI_VERSION ="/>
+ </tokenfilter>
+ </filterchain>
+- </loadfile>
++ </loadfile> -->
+ <loadfile srcfile="${lwjgl.src.native}/windows/org_lwjgl_WindowsSysImplementation.h" property="lwjgl.native.windows.version">
+ <filterchain>
+ <tokenfilter>
+@@ -314,13 +314,13 @@
+ </tokenfilter>
+ </filterchain>
+ </loadfile>
+- <loadfile srcfile="${lwjgl.src.native}/macosx/org_lwjgl_MacOSXSysImplementation.h" property="lwjgl.native.macosx.version">
++ <!-- <loadfile srcfile="${lwjgl.src.native}/macosx/org_lwjgl_MacOSXSysImplementation.h" property="lwjgl.native.macosx.version">
+ <filterchain>
+ <tokenfilter>
+ <containsstring contains="#define org_lwjgl_MacOSXSysImplementation_JNI_VERSION"/>
+ </tokenfilter>
+ </filterchain>
+- </loadfile>
++ </loadfile> -->
+ <echo>
+ lwjgl.java.windows.version = ${lwjgl.java.windows.version}
+ lwjgl.native.windows.version = ${lwjgl.native.windows.version}
+@@ -380,7 +380,10 @@
+ <antcall target="-compile_native_win32" />
+
+ <condition property="lwjgl.platform.linux">
+- <os name="Linux" />
++ <or>
++ <os name="Linux" />
++ <os name="FreeBSD" />
++ </or>
+ </condition>
+ <antcall target="-compile_native_linux" />
+
+@@ -493,6 +496,7 @@
+ <condition property="native_path" value="libs/linux">
+ <or>
+ <os name="Linux" />
++ <os name="FreeBSD" />
+ <os name="SunOS" />
+ </or>
+ </condition>
diff --git a/games/lwjgl/files/patch-platform_build__build-applet.xml b/games/lwjgl/files/patch-platform_build__build-applet.xml
new file mode 100644
index 000000000000..99b3375318f3
--- /dev/null
+++ b/games/lwjgl/files/patch-platform_build__build-applet.xml
@@ -0,0 +1,21 @@
+Obtained from http://foo.poildetroll.net/minecraft/lwjgl-2.7.1-freebsd.diff
+
+
+--- ./platform_build/build-applet.xml.orig 2011-02-06 19:22:46.000000000 +0000
++++ ./platform_build/build-applet.xml 2012-03-26 18:14:03.104373501 +0000
+@@ -1,7 +1,7 @@
+ <project name="applet">
+
+ <!-- Create our packer task -->
+- <taskdef name="pack200" classname="com.sun.tools.apache.ant.pack200.Pack200Task" classpath="platform_build/Pack200Task.jar"/>
++ <!-- <taskdef name="pack200" classname="com.sun.tools.apache.ant.pack200.Pack200Task" classpath="platform_build/Pack200Task.jar"/> -->
+
+ <target name="applet">
+ <antcall target="-applet">
+@@ -144,4 +144,4 @@
+ <param name="output" value="applet/advance/solaris_natives.jar.lzma"/>
+ </antcall>
+ </target>
+-</project>
+\ No newline at end of file
++</project>
diff --git a/games/lwjgl/files/patch-platform_build__linux_ant__build.xml b/games/lwjgl/files/patch-platform_build__linux_ant__build.xml
new file mode 100644
index 000000000000..5bd2aa378caf
--- /dev/null
+++ b/games/lwjgl/files/patch-platform_build__linux_ant__build.xml
@@ -0,0 +1,75 @@
+Obtained from http://foo.poildetroll.net/minecraft/lwjgl-2.7.1-freebsd.diff
+
+
+--- ./platform_build/linux_ant/build.xml.orig 2011-02-06 19:22:44.000000000 +0000
++++ ./platform_build/linux_ant/build.xml 2012-03-26 18:14:03.120371531 +0000
+@@ -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/X11R6/lib -L/usr/X11/lib -lm -lX11 -lXext -lXcursor -lXrandr -lpthread -L${java.home}/lib/i386 -ljawt" />
+- <property name="libs64" value="-L/usr/X11R6/lib64 -L/usr/X11/lib64 -lm -lX11 -lXext -lXcursor -lXrandr -lXxf86vm -lpthread -L${java.home}/lib/amd64 -ljawt" />
++ <property name="libs32" value="-L/usr/lib -L/usr/local/lib -lm -lX11 -lXext -lXcursor -lXrandr -lpthread -L${java.home}/lib/i386 -ljawt" />
++ <property name="libs64" value="-L/usr/lib -L/usr/local/lib -lm -lX11 -lXext -lXcursor -lXrandr -lXxf86vm -lpthread -L${java.home}/lib/amd64 -ljawt" />
+ <property name="cflags32" value="-O2 -Wall -c -fPIC -std=c99 -Wunused"/>
+
+ <target name="clean">
+@@ -46,6 +46,7 @@
+ <not>
+ <or>
+ <equals arg1="${hwplatform}" arg2="x86_64"/>
++ <equals arg1="${hwplatform}" arg2="amd64"/>
+ <equals arg1="${hwplatform}" arg2="i86pc"/>
+ </or>
+ </not>
+@@ -53,10 +54,16 @@
+
+ <!-- On linux, the 64 bit jre doesn't have the 32 bit libs -->
+ <condition property="build.64bit.only">
+- <and>
+- <os name="Linux"/>
+- <equals arg1="${hwplatform}" arg2="x86_64"/>
+- </and>
++ <or>
++ <and>
++ <os name="Linux"/>
++ <equals arg1="${hwplatform}" arg2="x86_64"/>
++ </and>
++ <and>
++ <os name="FreeBSD"/>
++ <equals arg1="${hwplatform}" arg2="amd64"/>
++ </and>
++ </or>
+ </condition>
+
+ <antcall target="compile32"/>
+@@ -69,11 +76,14 @@
+ <arg line="${cflags32} ${cflags_pthread}"/>
+ <arg value="-I${java.home}/include"/>
+ <arg value="-I${java.home}/include/linux"/>
++ <arg value="-I${java.home}/include/freebsd"/>
+ <arg value="-I${java.home}/../include"/>
+ <arg value="-I${java.home}/../include/linux"/>
+ <arg value="-I${java.home}/../include/solaris"/>
++ <arg value="-I${java.home}/../include/freebsd"/>
+ <arg value="-I${native}/common"/>
+ <arg value="-I${native}/linux"/>
++ <arg value="-I/usr/local/include"/>
+ <mapper type="glob" from="*.c" to="*.o"/>
+ <fileset dir="${native}/linux" includes="*.c"/>
+ <fileset dir="${native}/generated" includes="*.c"/>
+@@ -95,11 +105,14 @@
+ <arg line="${cflags64} ${cflags_pthread}"/>
+ <arg value="-I${java.home}/include"/>
+ <arg value="-I${java.home}/include/linux"/>
++ <arg value="-I${java.home}/include/freebsd"/>
+ <arg value="-I${java.home}/../include"/>
+ <arg value="-I${java.home}/../include/linux"/>
+ <arg value="-I${java.home}/../include/solaris"/>
++ <arg value="-I${java.home}/../include/freebsd"/>
+ <arg value="-I${native}/common"/>
+ <arg value="-I${native}/linux"/>
++ <arg value="-I/usr/local/include"/>
+ <mapper type="glob" from="*.c" to="*.o"/>
+ <fileset dir="${native}/linux" includes="*.c"/>
+ <fileset dir="${native}/generated" includes="*.c"/>
diff --git a/games/lwjgl/files/patch-src__java__org__lwjgl__MacOSXSysImplementation.java b/games/lwjgl/files/patch-src__java__org__lwjgl__MacOSXSysImplementation.java
new file mode 100644
index 000000000000..ada378a46ff4
--- /dev/null
+++ b/games/lwjgl/files/patch-src__java__org__lwjgl__MacOSXSysImplementation.java
@@ -0,0 +1,23 @@
+Obtained from http://foo.poildetroll.net/minecraft/lwjgl-2.7.1-freebsd.diff
+
+
+--- ./src/java/org/lwjgl/MacOSXSysImplementation.java.orig 2011-02-06 19:23:32.000000000 +0000
++++ ./src/java/org/lwjgl/MacOSXSysImplementation.java 2012-03-26 18:14:03.135376460 +0000
+@@ -33,7 +33,7 @@
+
+ import java.awt.Toolkit;
+
+-import com.apple.eio.FileManager;
++// import com.apple.eio.FileManager;
+
+ /**
+ *
+@@ -55,7 +55,7 @@
+
+ public boolean openURL(String url) {
+ try {
+- FileManager.openURL(url);
++ // FileManager.openURL(url);
+ return true;
+ } catch (Exception e) {
+ LWJGLUtil.log("Exception occurred while trying to invoke browser: " + e);
diff --git a/games/lwjgl/files/patch-src__java__org__lwjgl__opengl__MacOSXDisplay.java b/games/lwjgl/files/patch-src__java__org__lwjgl__opengl__MacOSXDisplay.java
new file mode 100644
index 000000000000..c757b88e322e
--- /dev/null
+++ b/games/lwjgl/files/patch-src__java__org__lwjgl__opengl__MacOSXDisplay.java
@@ -0,0 +1,32 @@
+Obtained from http://foo.poildetroll.net/minecraft/lwjgl-2.7.1-freebsd.diff
+
+
+--- ./src/java/org/lwjgl/opengl/MacOSXDisplay.java.orig 2011-02-06 19:23:26.000000000 +0000
++++ ./src/java/org/lwjgl/opengl/MacOSXDisplay.java 2012-03-26 18:14:03.153375501 +0000
+@@ -54,9 +54,9 @@
+ import org.lwjgl.LWJGLException;
+ import org.lwjgl.LWJGLUtil;
+
+-import com.apple.eawt.Application;
+-import com.apple.eawt.ApplicationAdapter;
+-import com.apple.eawt.ApplicationEvent;
++// import com.apple.eawt.Application;
++// import com.apple.eawt.ApplicationAdapter;
++// import com.apple.eawt.ApplicationEvent;
+
+ import static org.lwjgl.opengl.GL11.*;
+
+@@ -79,11 +79,11 @@
+ try {
+ AccessController.doPrivileged(new PrivilegedExceptionAction<Object>() {
+ public Object run() throws Exception {
+- Application.getApplication().addApplicationListener(new ApplicationAdapter() {
++/* Application.getApplication().addApplicationListener(new ApplicationAdapter() {
+ public void handleQuit(ApplicationEvent event) {
+ doHandleQuit();
+ }
+- });
++ }); */
+ return null;
+ }
+ });
diff --git a/games/lwjgl/pkg-descr b/games/lwjgl/pkg-descr
new file mode 100644
index 000000000000..18c252199544
--- /dev/null
+++ b/games/lwjgl/pkg-descr
@@ -0,0 +1,3 @@
+The Lightweight Java Game Library
+
+WWW: http://www.lwjgl.org