branch libgdx out into parallel versions, at this point 1.9.9 and 1.9.11.
This is due to a lack of backwards compatibility; all these and others are full versions. Separate versions can be installed at the same time; there are no file conflicts. 1.9.9 will allow running Urtuk the Desolation. At this point, remove the scripts libgdx-{setup,run} as they don't fit in this layout anymore. Discussed the gritty details of this with sthen, jca, espie...
This commit is contained in:
parent
f7e5ccfe55
commit
1d2e98751f
6
games/libgdx/1.9.11/Makefile
Normal file
6
games/libgdx/1.9.11/Makefile
Normal file
@ -0,0 +1,6 @@
|
||||
VERSION = 1.9.11
|
||||
REVISION = 3
|
||||
|
||||
WANTLIB += ${COMPILER_LIBCXX} X11 m
|
||||
|
||||
.include <bsd.port.mk>
|
@ -1,6 +1,3 @@
|
||||
libGDX is a cross-platform Java game development framework based on OpenGL (ES)
|
||||
that works on Windows, Linux, Mac OS X, Android, your WebGL enabled browser and
|
||||
iOS.
|
||||
|
||||
This port serves as an OpenBSD-compatible backend. It ships with libgdx-setup
|
||||
and libgdx-run to launch libgdx games.
|
1843
games/libgdx/1.9.11/pkg/PLIST
Normal file
1843
games/libgdx/1.9.11/pkg/PLIST
Normal file
File diff suppressed because it is too large
Load Diff
5
games/libgdx/1.9.9/Makefile
Normal file
5
games/libgdx/1.9.9/Makefile
Normal file
@ -0,0 +1,5 @@
|
||||
VERSION = 1.9.9
|
||||
|
||||
WANTLIB += ${COMPILER_LIBCXX} X11 m
|
||||
|
||||
.include <bsd.port.mk>
|
4
games/libgdx/1.9.9/distinfo
Normal file
4
games/libgdx/1.9.9/distinfo
Normal file
@ -0,0 +1,4 @@
|
||||
SHA256 (libgdx/libgdx-gdx-parent-1.9.9.tar.gz) = z0aZ8EKVT4DeVH3FETak2x5b8MDu1egEROKBMIXE3ZM=
|
||||
SHA256 (libgdx/m2repo-libgdx-1.9.9-tools.tar.gz) = ZKIzMRDiBg2Qevrv5apaNaB1CYNFa90Nu93tJitAPv0=
|
||||
SIZE (libgdx/libgdx-gdx-parent-1.9.9.tar.gz) = 102022501
|
||||
SIZE (libgdx/m2repo-libgdx-1.9.9-tools.tar.gz) = 16245552
|
@ -0,0 +1,14 @@
|
||||
hijack Linux codepath
|
||||
|
||||
Index: backends/gdx-backend-lwjgl/src/com/badlogic/gdx/backends/lwjgl/LwjglNativesLoader.java
|
||||
--- backends/gdx-backend-lwjgl/src/com/badlogic/gdx/backends/lwjgl/LwjglNativesLoader.java.orig
|
||||
+++ backends/gdx-backend-lwjgl/src/com/badlogic/gdx/backends/lwjgl/LwjglNativesLoader.java
|
||||
@@ -58,7 +58,7 @@ public final class LwjglNativesLoader {
|
||||
} else if (isMac) {
|
||||
nativesDir = loader.extractFile("liblwjgl.dylib", null).getParentFile();
|
||||
if (!LwjglApplicationConfiguration.disableAudio) loader.extractFileTo("openal.dylib", nativesDir);
|
||||
- } else if (isLinux) {
|
||||
+ } else {
|
||||
nativesDir = loader.extractFile(is64Bit ? "liblwjgl64.so" : "liblwjgl.so", null).getParentFile();
|
||||
if (!LwjglApplicationConfiguration.disableAudio)
|
||||
loader.extractFileTo(is64Bit ? "libopenal64.so" : "libopenal.so", nativesDir);
|
@ -0,0 +1,14 @@
|
||||
don't break on OpenAL error
|
||||
|
||||
Index: backends/gdx-backend-lwjgl/src/com/badlogic/gdx/backends/lwjgl/audio/OpenALMusic.java
|
||||
--- backends/gdx-backend-lwjgl/src/com/badlogic/gdx/backends/lwjgl/audio/OpenALMusic.java.orig
|
||||
+++ backends/gdx-backend-lwjgl/src/com/badlogic/gdx/backends/lwjgl/audio/OpenALMusic.java
|
||||
@@ -80,7 +80,7 @@ public abstract class OpenALMusic implements Music {
|
||||
alGenBuffers(buffers);
|
||||
int errorCode = alGetError();
|
||||
if (errorCode != AL_NO_ERROR)
|
||||
- throw new GdxRuntimeException("Unable to allocate audio buffers. AL Error: " + errorCode);
|
||||
+ System.out.println("Unable to allocate audio buffers. AL Error: " + errorCode);
|
||||
}
|
||||
alSourcei(sourceID, AL_LOOPING, AL_FALSE);
|
||||
setPan(pan, volume);
|
@ -0,0 +1,128 @@
|
||||
use build-linux64.xml for OpenBSD build
|
||||
|
||||
Index: extensions/gdx-box2d/gdx-box2d/jni/build-linux64.xml
|
||||
--- extensions/gdx-box2d/gdx-box2d/jni/build-linux64.xml.orig
|
||||
+++ extensions/gdx-box2d/gdx-box2d/jni/build-linux64.xml
|
||||
@@ -2,11 +2,11 @@
|
||||
<!-- include the environment -->
|
||||
<property environment="env"/>
|
||||
<!-- output directory for temporary object files -->
|
||||
- <property name="buildDir" value="target/linux64" />
|
||||
+ <property name="buildDir" value="target/openbsd" />
|
||||
<!-- output directory for the shared library -->
|
||||
- <property name="libsDir" value="../libs/linux64" />
|
||||
+ <property name="libsDir" value="../libs/openbsd" />
|
||||
<!-- the name of the shared library -->
|
||||
- <property name="libName" value="libgdx-box2d64.so"/>
|
||||
+ <property name="libName" value="libgdx-box2d${M_ARCH}.so"/>
|
||||
<!-- the jni header jniPlatform to use -->
|
||||
<property name="jniPlatform" value="linux"/>
|
||||
<!-- the compilerPrefix for the C & C++ compilers -->
|
||||
@@ -14,10 +14,10 @@
|
||||
<!-- the compilerSuffix for the C & C++ compilers -->
|
||||
<property name="compilerSuffix" value="" />
|
||||
|
||||
- <!-- define gcc compiler, options and files to compile -->
|
||||
- <property name="gcc" value="${compilerPrefix}gcc${compilerSuffix}"/>
|
||||
- <property name="gcc-opts" value="-c -Wall -O2 -mfpmath=sse -msse -fmessage-length=0 -m64 -fPIC"/>
|
||||
- <fileset id="gcc-files" dir="./">
|
||||
+ <!-- define cc compiler, options and files to compile -->
|
||||
+ <property name="cc" value="${compilerPrefix}cc${compilerSuffix}"/>
|
||||
+ <property name="cc-opts" value="-c -Wall ${CFLAGS} -fPIC"/>
|
||||
+ <fileset id="cc-files" dir="./">
|
||||
<exclude name="target/"/>
|
||||
<include name="memcpy_wrap.c"/>
|
||||
<include name="**/*.c"/>
|
||||
@@ -25,10 +25,10 @@
|
||||
|
||||
</fileset>
|
||||
|
||||
- <!-- define g++ compiler, options and files to compile -->
|
||||
- <property name="g++" value="${compilerPrefix}g++${compilerSuffix}"/>
|
||||
- <property name="g++-opts" value="-c -Wall -O2 -mfpmath=sse -msse -fmessage-length=0 -m64 -fPIC"/>
|
||||
- <fileset id="g++-files" dir="./">
|
||||
+ <!-- define c++ compiler, options and files to compile -->
|
||||
+ <property name="c++" value="${compilerPrefix}c++${compilerSuffix}"/>
|
||||
+ <property name="c++-opts" value="-c -Wall ${CXXFLAGS} -fPIC"/>
|
||||
+ <fileset id="c++-files" dir="./">
|
||||
<exclude name="target/"/>
|
||||
<include name="**/*.cpp"/>
|
||||
|
||||
@@ -36,8 +36,8 @@
|
||||
</fileset>
|
||||
|
||||
<!-- define linker and options -->
|
||||
- <property name="linker" value="${compilerPrefix}g++${compilerSuffix}"/>
|
||||
- <property name="linker-opts" value="-shared -m64 -Wl,-wrap,memcpy"/>
|
||||
+ <property name="linker" value="${compilerPrefix}c++${compilerSuffix}"/>
|
||||
+ <property name="linker-opts" value="-shared"/>
|
||||
<property name="libraries" value=""/>
|
||||
|
||||
<!-- cleans the build directory, removes all object files and shared libs -->
|
||||
@@ -53,13 +53,13 @@
|
||||
<and>
|
||||
<or>
|
||||
<!-- Include both b/c Windows might be either -->
|
||||
- <available file="${g++}" filepath="${env.PATH}"/>
|
||||
- <available file="${g++}" filepath="${env.Path}"/>
|
||||
+ <available file="${c++}" filepath="${env.PATH}"/>
|
||||
+ <available file="${c++}" filepath="${env.Path}"/>
|
||||
</or>
|
||||
<or>
|
||||
<!-- Include both b/c Windows might be either -->
|
||||
- <available file="${gcc}" filepath="${env.PATH}"/>
|
||||
- <available file="${gcc}" filepath="${env.Path}"/>
|
||||
+ <available file="${cc}" filepath="${env.PATH}"/>
|
||||
+ <available file="${cc}" filepath="${env.Path}"/>
|
||||
</or>
|
||||
</and>
|
||||
</condition>
|
||||
@@ -72,8 +72,8 @@
|
||||
<target name="create-build-dir" depends="precompile" if="has-compiler">
|
||||
<!-- FIXME this is pretty nasty :/ -->
|
||||
<copy todir="${buildDir}">
|
||||
- <fileset refid="g++-files"/>
|
||||
- <fileset refid="gcc-files"/>
|
||||
+ <fileset refid="c++-files"/>
|
||||
+ <fileset refid="cc-files"/>
|
||||
</copy>
|
||||
<delete>
|
||||
<fileset dir="${buildDir}">
|
||||
@@ -86,8 +86,8 @@
|
||||
<!-- compiles all C and C++ files to object files in the build directory -->
|
||||
<target name="compile" depends="create-build-dir" if="has-compiler">
|
||||
<mkdir dir="${buildDir}"/>
|
||||
- <apply failonerror="true" executable="${g++}" dest="${buildDir}" verbose="true">
|
||||
- <arg line="${g++-opts}"/>
|
||||
+ <apply failonerror="true" executable="${c++}" dest="${buildDir}" verbose="true">
|
||||
+ <arg line="${c++-opts}"/>
|
||||
<arg value="-Ijni-headers"/>
|
||||
<arg value="-Ijni-headers/${jniPlatform}"/>
|
||||
<arg value="-I."/>
|
||||
@@ -95,14 +95,14 @@
|
||||
<srcfile/>
|
||||
<arg value="-o"/>
|
||||
<targetfile/>
|
||||
- <fileset refid="g++-files"/>
|
||||
+ <fileset refid="c++-files"/>
|
||||
<compositemapper>
|
||||
<mapper type="glob" from="*.cpp" to="*.o"/>
|
||||
<mapper type="glob" from="*.mm" to="*.o"/>
|
||||
</compositemapper>
|
||||
</apply>
|
||||
- <apply failonerror="true" executable="${gcc}" dest="${buildDir}" verbose="true">
|
||||
- <arg line="${gcc-opts}"/>
|
||||
+ <apply failonerror="true" executable="${cc}" dest="${buildDir}" verbose="true">
|
||||
+ <arg line="${cc-opts}"/>
|
||||
<arg value="-Ijni-headers"/>
|
||||
<arg value="-Ijni-headers/${jniPlatform}"/>
|
||||
<arg value="-I."/>
|
||||
@@ -110,7 +110,7 @@
|
||||
<srcfile/>
|
||||
<arg value="-o"/>
|
||||
<targetfile/>
|
||||
- <fileset refid="gcc-files"/>
|
||||
+ <fileset refid="cc-files"/>
|
||||
<compositemapper>
|
||||
<mapper type="glob" from="*.c" to="*.o"/>
|
||||
<mapper type="glob" from="*.m" to="*.o"/>
|
@ -0,0 +1,139 @@
|
||||
shamelessly abuse build-linux64.xml to build on/for OpenBSD
|
||||
at the moment this allows building, but doesn't allow controller use
|
||||
|
||||
Index: extensions/gdx-controllers/gdx-controllers-desktop/jni/build-linux64.xml
|
||||
--- extensions/gdx-controllers/gdx-controllers-desktop/jni/build-linux64.xml.orig
|
||||
+++ extensions/gdx-controllers/gdx-controllers-desktop/jni/build-linux64.xml
|
||||
@@ -1,12 +1,12 @@
|
||||
-<project name="gdx-controllers-desktop-Linux-64" basedir="." default="postcompile">
|
||||
+<project name="gdx-controllers-desktop-OpenBSD" basedir="." default="postcompile">
|
||||
<!-- include the environment -->
|
||||
<property environment="env"/>
|
||||
<!-- output directory for temporary object files -->
|
||||
- <property name="buildDir" value="target/linux64" />
|
||||
+ <property name="buildDir" value="target/openbsd" />
|
||||
<!-- output directory for the shared library -->
|
||||
- <property name="libsDir" value="../libs/linux64" />
|
||||
+ <property name="libsDir" value="../libs/openbsd" />
|
||||
<!-- the name of the shared library -->
|
||||
- <property name="libName" value="libgdx-controllers-desktop64.so"/>
|
||||
+ <property name="libName" value="libgdx-controllers-desktop${M_ARCH}.so"/>
|
||||
<!-- the jni header jniPlatform to use -->
|
||||
<property name="jniPlatform" value="linux"/>
|
||||
<!-- the compilerPrefix for the C & C++ compilers -->
|
||||
@@ -14,10 +14,10 @@
|
||||
<!-- the compilerSuffix for the C & C++ compilers -->
|
||||
<property name="compilerSuffix" value="" />
|
||||
|
||||
- <!-- define gcc compiler, options and files to compile -->
|
||||
- <property name="gcc" value="${compilerPrefix}gcc${compilerSuffix}"/>
|
||||
- <property name="gcc-opts" value="-c -Wall -O2 -mfpmath=sse -msse -fmessage-length=0 -m64 -fPIC"/>
|
||||
- <fileset id="gcc-files" dir="./">
|
||||
+ <!-- define cc compiler, options and files to compile -->
|
||||
+ <property name="cc" value="${compilerPrefix}cc${compilerSuffix}"/>
|
||||
+ <property name="cc-opts" value="-c -Wall ${CFLAGS} -fPIC"/>
|
||||
+ <fileset id="cc-files" dir="./">
|
||||
<exclude name="target/"/>
|
||||
<include name="memcpy_wrap.c"/>
|
||||
<include name="**/*.c"/>
|
||||
@@ -25,10 +25,10 @@
|
||||
|
||||
</fileset>
|
||||
|
||||
- <!-- define g++ compiler, options and files to compile -->
|
||||
- <property name="g++" value="${compilerPrefix}g++${compilerSuffix}"/>
|
||||
- <property name="g++-opts" value="-c -Wall -O2 -mfpmath=sse -msse -fmessage-length=0 -m64 -fPIC"/>
|
||||
- <fileset id="g++-files" dir="./">
|
||||
+ <!-- define c++ compiler, options and files to compile -->
|
||||
+ <property name="c++" value="${compilerPrefix}c++${compilerSuffix}"/>
|
||||
+ <property name="c++-opts" value="-c -Wall ${CXXFLAGS} -fPIC"/>
|
||||
+ <fileset id="c++-files" dir="./">
|
||||
<exclude name="target/"/>
|
||||
<include name="*.cpp"/>
|
||||
<include name="ois-v1-4svn/src/*.cpp"/>
|
||||
@@ -38,9 +38,9 @@
|
||||
</fileset>
|
||||
|
||||
<!-- define linker and options -->
|
||||
- <property name="linker" value="${compilerPrefix}g++${compilerSuffix}"/>
|
||||
- <property name="linker-opts" value="-shared -m64 -Wl,-wrap,memcpy"/>
|
||||
- <property name="libraries" value="-lX11"/>
|
||||
+ <property name="linker" value="${compilerPrefix}c++${compilerSuffix}"/>
|
||||
+ <property name="linker-opts" value="-shared"/>
|
||||
+ <property name="libraries" value="-L${X11BASE}/lib -lX11"/>
|
||||
|
||||
<!-- cleans the build directory, removes all object files and shared libs -->
|
||||
<target name="clean">
|
||||
@@ -55,13 +55,13 @@
|
||||
<and>
|
||||
<or>
|
||||
<!-- Include both b/c Windows might be either -->
|
||||
- <available file="${g++}" filepath="${env.PATH}"/>
|
||||
- <available file="${g++}" filepath="${env.Path}"/>
|
||||
+ <available file="${c++}" filepath="${env.PATH}"/>
|
||||
+ <available file="${c++}" filepath="${env.Path}"/>
|
||||
</or>
|
||||
<or>
|
||||
<!-- Include both b/c Windows might be either -->
|
||||
- <available file="${gcc}" filepath="${env.PATH}"/>
|
||||
- <available file="${gcc}" filepath="${env.Path}"/>
|
||||
+ <available file="${cc}" filepath="${env.PATH}"/>
|
||||
+ <available file="${cc}" filepath="${env.Path}"/>
|
||||
</or>
|
||||
</and>
|
||||
</condition>
|
||||
@@ -74,8 +74,8 @@
|
||||
<target name="create-build-dir" depends="precompile" if="has-compiler">
|
||||
<!-- FIXME this is pretty nasty :/ -->
|
||||
<copy todir="${buildDir}">
|
||||
- <fileset refid="g++-files"/>
|
||||
- <fileset refid="gcc-files"/>
|
||||
+ <fileset refid="c++-files"/>
|
||||
+ <fileset refid="cc-files"/>
|
||||
</copy>
|
||||
<delete>
|
||||
<fileset dir="${buildDir}">
|
||||
@@ -88,35 +88,37 @@
|
||||
<!-- compiles all C and C++ files to object files in the build directory -->
|
||||
<target name="compile" depends="create-build-dir" if="has-compiler">
|
||||
<mkdir dir="${buildDir}"/>
|
||||
- <apply failonerror="true" executable="${g++}" dest="${buildDir}" verbose="true">
|
||||
- <arg line="${g++-opts}"/>
|
||||
+ <apply failonerror="true" executable="${c++}" dest="${buildDir}" verbose="true">
|
||||
+ <arg line="${c++-opts}"/>
|
||||
<arg value="-Ijni-headers"/>
|
||||
<arg value="-Ijni-headers/${jniPlatform}"/>
|
||||
<arg value="-I."/>
|
||||
<arg value="-Iois-v1-4svn/includes"/>
|
||||
<arg value="-Idinput/"/>
|
||||
+ <arg value="-I${X11BASE}/include"/>
|
||||
|
||||
<srcfile/>
|
||||
<arg value="-o"/>
|
||||
<targetfile/>
|
||||
- <fileset refid="g++-files"/>
|
||||
+ <fileset refid="c++-files"/>
|
||||
<compositemapper>
|
||||
<mapper type="glob" from="*.cpp" to="*.o"/>
|
||||
<mapper type="glob" from="*.mm" to="*.o"/>
|
||||
</compositemapper>
|
||||
</apply>
|
||||
- <apply failonerror="true" executable="${gcc}" dest="${buildDir}" verbose="true">
|
||||
- <arg line="${gcc-opts}"/>
|
||||
+ <apply failonerror="true" executable="${cc}" dest="${buildDir}" verbose="true">
|
||||
+ <arg line="${cc-opts}"/>
|
||||
<arg value="-Ijni-headers"/>
|
||||
<arg value="-Ijni-headers/${jniPlatform}"/>
|
||||
<arg value="-I."/>
|
||||
<arg value="-Iois-v1-4svn/includes"/>
|
||||
<arg value="-Idinput/"/>
|
||||
+ <arg value="-I${X11BASE}/include"/>
|
||||
|
||||
<srcfile/>
|
||||
<arg value="-o"/>
|
||||
<targetfile/>
|
||||
- <fileset refid="gcc-files"/>
|
||||
+ <fileset refid="cc-files"/>
|
||||
<compositemapper>
|
||||
<mapper type="glob" from="*.c" to="*.o"/>
|
||||
<mapper type="glob" from="*.m" to="*.o"/>
|
@ -0,0 +1,13 @@
|
||||
remove reference to header file that is Linux-specific
|
||||
|
||||
Index: extensions/gdx-controllers/gdx-controllers-desktop/jni/ois-v1-4svn/includes/linux/LinuxForceFeedback.h
|
||||
--- extensions/gdx-controllers/gdx-controllers-desktop/jni/ois-v1-4svn/includes/linux/LinuxForceFeedback.h.orig
|
||||
+++ extensions/gdx-controllers/gdx-controllers-desktop/jni/ois-v1-4svn/includes/linux/LinuxForceFeedback.h
|
||||
@@ -25,7 +25,6 @@ restrictions:
|
||||
|
||||
#include "linux/LinuxPrereqs.h"
|
||||
#include "OISForceFeedback.h"
|
||||
-#include <linux/input.h>
|
||||
|
||||
namespace OIS
|
||||
{
|
@ -0,0 +1,126 @@
|
||||
remove reference to header file that we don't have
|
||||
stub functions
|
||||
|
||||
Index: extensions/gdx-controllers/gdx-controllers-desktop/jni/ois-v1-4svn/src/linux/EventHelpers.cpp
|
||||
--- extensions/gdx-controllers/gdx-controllers-desktop/jni/ois-v1-4svn/src/linux/EventHelpers.cpp.orig
|
||||
+++ extensions/gdx-controllers/gdx-controllers-desktop/jni/ois-v1-4svn/src/linux/EventHelpers.cpp
|
||||
@@ -26,7 +26,6 @@ restrictions:
|
||||
#include "OISException.h"
|
||||
#include "OISJoyStick.h"
|
||||
|
||||
-#include <linux/input.h>
|
||||
#include <cstring>
|
||||
|
||||
//#define OIS_LINUX_JOY_DEBUG
|
||||
@@ -52,6 +51,10 @@ bool inline isBitSet(unsigned char bits[], unsigned in
|
||||
//-----------------------------------------------------------------------------//
|
||||
DeviceComponentInfo getComponentInfo( int deviceID )
|
||||
{
|
||||
+#ifdef __OpenBSD__
|
||||
+ DeviceComponentInfo components;
|
||||
+ return components;
|
||||
+#else
|
||||
unsigned char ev_bits[1 + EV_MAX/8/sizeof(unsigned char)];
|
||||
memset( ev_bits, 0, sizeof(ev_bits) );
|
||||
|
||||
@@ -64,7 +67,6 @@ DeviceComponentInfo getComponentInfo( int deviceID )
|
||||
OIS_EXCEPT( E_General, "Could not read device events features");
|
||||
|
||||
DeviceComponentInfo components;
|
||||
-
|
||||
for (int i = 0; i < EV_MAX; i++)
|
||||
{
|
||||
if( isBitSet(ev_bits, i) )
|
||||
@@ -152,11 +154,15 @@ DeviceComponentInfo getComponentInfo( int deviceID )
|
||||
}
|
||||
|
||||
return components;
|
||||
+#endif
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------//
|
||||
bool EventUtils::isJoyStick( int deviceID, JoyStickInfo &js )
|
||||
{
|
||||
+#ifdef __OpenBSD__
|
||||
+ return false;
|
||||
+#else
|
||||
if( deviceID == -1 )
|
||||
OIS_EXCEPT( E_General, "Error with File Descriptor" );
|
||||
|
||||
@@ -231,11 +237,15 @@ bool EventUtils::isJoyStick( int deviceID, JoyStickInf
|
||||
}
|
||||
|
||||
return joyButtonFound;
|
||||
+#endif
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------//
|
||||
string EventUtils::getName( int deviceID )
|
||||
{
|
||||
+#ifdef __OpenBSD__
|
||||
+ return "";
|
||||
+#else
|
||||
#ifdef OIS_LINUX_JOY_DEBUG
|
||||
cout << "EventUtils::getName(" << deviceID
|
||||
<< ") : Reading device name" << endl;
|
||||
@@ -245,11 +255,15 @@ string EventUtils::getName( int deviceID )
|
||||
if (ioctl(deviceID, EVIOCGNAME(OIS_DEVICE_NAME), name) == -1)
|
||||
OIS_EXCEPT( E_General, "Could not read device name");
|
||||
return string(name);
|
||||
+#endif
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------//
|
||||
string EventUtils::getUniqueId( int deviceID )
|
||||
{
|
||||
+#ifdef __OpenBSD__
|
||||
+ return "";
|
||||
+#else
|
||||
#ifdef OIS_LINUX_JOY_DEBUG
|
||||
cout << "EventUtils::getUniqueId(" << deviceID
|
||||
<< ") : Reading device unique Id" << endl;
|
||||
@@ -260,11 +274,15 @@ string EventUtils::getUniqueId( int deviceID )
|
||||
if (ioctl(deviceID, EVIOCGUNIQ(OIS_DEVICE_UNIQUE_ID), uId) == -1)
|
||||
OIS_EXCEPT( E_General, "Could not read device unique Id");
|
||||
return string(uId);
|
||||
+#endif
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------//
|
||||
string EventUtils::getPhysicalLocation( int deviceID )
|
||||
{
|
||||
+#ifdef __OpenBSD__
|
||||
+ return "";
|
||||
+#else
|
||||
#ifdef OIS_LINUX_JOY_DEBUG
|
||||
cout << "EventUtils::getPhysicalLocation(" << deviceID
|
||||
<< ") : Reading device physical location" << endl;
|
||||
@@ -275,11 +293,13 @@ string EventUtils::getPhysicalLocation( int deviceID )
|
||||
if (ioctl(deviceID, EVIOCGPHYS(OIS_DEVICE_PHYSICAL_LOCATION), physLoc) == -1)
|
||||
OIS_EXCEPT( E_General, "Could not read device physical location");
|
||||
return string(physLoc);
|
||||
+#endif
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------//
|
||||
void EventUtils::enumerateForceFeedback( int deviceID, LinuxForceFeedback** ff )
|
||||
{
|
||||
+#if !defined(__OpenBSD__)
|
||||
//Linux Event to OIS Event Mappings
|
||||
map<int, Effect::EType> typeMap;
|
||||
typeMap[FF_CONSTANT] = Effect::Constant;
|
||||
@@ -367,11 +387,14 @@ void EventUtils::enumerateForceFeedback( int deviceID,
|
||||
const ForceFeedback::SupportedEffectList &list = (*ff)->getSupportedEffects();
|
||||
if( list.size() == 0 )
|
||||
removeForceFeedback( ff );
|
||||
+#endif
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------//
|
||||
void EventUtils::removeForceFeedback( LinuxForceFeedback** ff )
|
||||
{
|
||||
+#if !defined(__OpenBSD__)
|
||||
delete *ff;
|
||||
*ff = 0;
|
||||
+#endif
|
||||
}
|
@ -0,0 +1,226 @@
|
||||
stub all functions
|
||||
|
||||
Index: extensions/gdx-controllers/gdx-controllers-desktop/jni/ois-v1-4svn/src/linux/LinuxForceFeedback.cpp
|
||||
--- extensions/gdx-controllers/gdx-controllers-desktop/jni/ois-v1-4svn/src/linux/LinuxForceFeedback.cpp.orig
|
||||
+++ extensions/gdx-controllers/gdx-controllers-desktop/jni/ois-v1-4svn/src/linux/LinuxForceFeedback.cpp
|
||||
@@ -46,6 +46,7 @@ LinuxForceFeedback::LinuxForceFeedback(int deviceID) :
|
||||
//--------------------------------------------------------------//
|
||||
LinuxForceFeedback::~LinuxForceFeedback()
|
||||
{
|
||||
+#if !defined(__OpenBSD__)
|
||||
// Unload all effects.
|
||||
for(EffectList::iterator i = mEffectList.begin(); i != mEffectList.end(); ++i )
|
||||
{
|
||||
@@ -55,12 +56,16 @@ LinuxForceFeedback::~LinuxForceFeedback()
|
||||
}
|
||||
|
||||
mEffectList.clear();
|
||||
+#endif
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------//
|
||||
unsigned short LinuxForceFeedback::getFFMemoryLoad()
|
||||
{
|
||||
int nEffects = -1;
|
||||
+#ifdef __OpenBSD__
|
||||
+ return nEffects;
|
||||
+#else
|
||||
if (ioctl(mJoyStick, EVIOCGEFFECTS, &nEffects) == -1)
|
||||
OIS_EXCEPT(E_General, "Unknown error reading max number of uploaded effects.");
|
||||
#if (OIS_LINUX_JOYFF_DEBUG > 1)
|
||||
@@ -69,11 +74,13 @@ unsigned short LinuxForceFeedback::getFFMemoryLoad()
|
||||
#endif
|
||||
|
||||
return (unsigned short int)(nEffects > 0 ? 100.0*mEffectList.size()/nEffects : 100);
|
||||
+#endif
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------//
|
||||
void LinuxForceFeedback::setMasterGain(float value)
|
||||
{
|
||||
+#if !defined(__OpenBSD__)
|
||||
if (!mSetGainSupport)
|
||||
{
|
||||
#if (OIS_LINUX_JOYFF_DEBUG > 0)
|
||||
@@ -102,11 +109,13 @@ void LinuxForceFeedback::setMasterGain(float value)
|
||||
if (write(mJoyStick, &event, sizeof(event)) != sizeof(event)) {
|
||||
OIS_EXCEPT(E_General, "Unknown error changing master gain.");
|
||||
}
|
||||
+#endif
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------//
|
||||
void LinuxForceFeedback::setAutoCenterMode(bool enabled)
|
||||
{
|
||||
+#if !defined(__OpenBSD__)
|
||||
if (!mSetAutoCenterSupport)
|
||||
{
|
||||
#if (OIS_LINUX_JOYFF_DEBUG > 0)
|
||||
@@ -131,11 +140,13 @@ void LinuxForceFeedback::setAutoCenterMode(bool enable
|
||||
if (write(mJoyStick, &event, sizeof(event)) != sizeof(event)) {
|
||||
OIS_EXCEPT(E_General, "Unknown error toggling auto-center.");
|
||||
}
|
||||
+#endif
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------//
|
||||
void LinuxForceFeedback::upload( const Effect* effect )
|
||||
{
|
||||
+#if !defined(__OpenBSD__)
|
||||
switch( effect->force )
|
||||
{
|
||||
case OIS::Effect::ConstantForce:
|
||||
@@ -157,17 +168,21 @@ void LinuxForceFeedback::upload( const Effect* effect
|
||||
OIS_EXCEPT(E_NotImplemented, "Requested force not implemented yet, sorry!");
|
||||
break;
|
||||
}
|
||||
+#endif
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------//
|
||||
void LinuxForceFeedback::modify( const Effect* effect )
|
||||
{
|
||||
+#if !defined(__OpenBSD__)
|
||||
upload(effect);
|
||||
+#endif
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------//
|
||||
void LinuxForceFeedback::remove( const Effect* effect )
|
||||
{
|
||||
+#if !defined(__OpenBSD__)
|
||||
//Get the effect - if it exists
|
||||
EffectList::iterator i = mEffectList.find(effect->_handle);
|
||||
if( i != mEffectList.end() )
|
||||
@@ -186,6 +201,7 @@ void LinuxForceFeedback::remove( const Effect* effect
|
||||
else
|
||||
mEffectList.erase(i);
|
||||
}
|
||||
+#endif
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------//
|
||||
@@ -224,6 +240,7 @@ void LinuxForceFeedback::_setCommonProperties(struct f
|
||||
struct ff_envelope *ffenvelope,
|
||||
const Effect* effect, const Envelope *envelope )
|
||||
{
|
||||
+#if !defined(__OpenBSD__)
|
||||
memset(event, 0, sizeof(struct ff_effect));
|
||||
|
||||
if (envelope && ffenvelope && envelope->isUsed()) {
|
||||
@@ -278,11 +295,13 @@ void LinuxForceFeedback::_setCommonProperties(struct f
|
||||
<< " Delay : " << effect->replay_delay
|
||||
<< " => " << event->replay.delay << endl;
|
||||
#endif
|
||||
+#endif
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------//
|
||||
void LinuxForceFeedback::_updateConstantEffect( const Effect* eff )
|
||||
{
|
||||
+#if !defined(__OpenBSD__)
|
||||
struct ff_effect event;
|
||||
|
||||
ConstantEffect *effect = static_cast<ConstantEffect*>(eff->getForceEffect());
|
||||
@@ -300,11 +319,13 @@ void LinuxForceFeedback::_updateConstantEffect( const
|
||||
#endif
|
||||
|
||||
_upload(&event, eff);
|
||||
+#endif
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------//
|
||||
void LinuxForceFeedback::_updateRampEffect( const Effect* eff )
|
||||
{
|
||||
+#if !defined(__OpenBSD__)
|
||||
struct ff_effect event;
|
||||
|
||||
RampEffect *effect = static_cast<RampEffect*>(eff->getForceEffect());
|
||||
@@ -325,11 +346,13 @@ void LinuxForceFeedback::_updateRampEffect( const Effe
|
||||
#endif
|
||||
|
||||
_upload(&event, eff);
|
||||
+#endif
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------//
|
||||
void LinuxForceFeedback::_updatePeriodicEffect( const Effect* eff )
|
||||
{
|
||||
+#if !defined(__OpenBSD__)
|
||||
struct ff_effect event;
|
||||
|
||||
PeriodicEffect *effect = static_cast<PeriodicEffect*>(eff->getForceEffect());
|
||||
@@ -386,11 +409,13 @@ void LinuxForceFeedback::_updatePeriodicEffect( const
|
||||
#endif
|
||||
|
||||
_upload(&event, eff);
|
||||
+#endif
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------//
|
||||
void LinuxForceFeedback::_updateConditionalEffect( const Effect* eff )
|
||||
{
|
||||
+#if !defined(__OpenBSD__)
|
||||
struct ff_effect event;
|
||||
|
||||
ConditionalEffect *effect = static_cast<ConditionalEffect*>(eff->getForceEffect());
|
||||
@@ -445,11 +470,13 @@ void LinuxForceFeedback::_updateConditionalEffect( con
|
||||
cout << " Condition[1] : Not implemented" << endl;
|
||||
#endif
|
||||
_upload(&event, eff);
|
||||
+#endif
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------//
|
||||
void LinuxForceFeedback::_upload( struct ff_effect* ffeffect, const Effect* effect)
|
||||
{
|
||||
+#if !defined(__OpenBSD__)
|
||||
struct ff_effect *linEffect = 0;
|
||||
|
||||
//Get the effect - if it exists
|
||||
@@ -507,10 +534,12 @@ void LinuxForceFeedback::_upload( struct ff_effect* ff
|
||||
cout << "LinuxForceFeedback("<< mJoyStick
|
||||
<< ") : Effect handle : " << effect->_handle << endl;
|
||||
#endif
|
||||
+#endif
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------//
|
||||
void LinuxForceFeedback::_stop( int handle) {
|
||||
+#if !defined(__OpenBSD__)
|
||||
struct input_event stop;
|
||||
|
||||
stop.type = EV_FF;
|
||||
@@ -525,10 +554,12 @@ void LinuxForceFeedback::_stop( int handle) {
|
||||
if (write(mJoyStick, &stop, sizeof(stop)) != sizeof(stop)) {
|
||||
OIS_EXCEPT(E_General, "Unknown error stopping effect->..");
|
||||
}
|
||||
+#endif
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------//
|
||||
void LinuxForceFeedback::_start( int handle) {
|
||||
+#if !defined(__OpenBSD__)
|
||||
struct input_event play;
|
||||
|
||||
play.type = EV_FF;
|
||||
@@ -543,11 +574,13 @@ void LinuxForceFeedback::_start( int handle) {
|
||||
if (write(mJoyStick, &play, sizeof(play)) != sizeof(play)) {
|
||||
OIS_EXCEPT(E_General, "Unknown error playing effect->..");
|
||||
}
|
||||
+#endif
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------//
|
||||
void LinuxForceFeedback::_unload( int handle)
|
||||
{
|
||||
+#if !defined(__OpenBSD__)
|
||||
#if (OIS_LINUX_JOYFF_DEBUG > 1)
|
||||
cout << endl << "LinuxForceFeedback("<< mJoyStick
|
||||
<< ") : Removing effect with handle " << handle << endl;
|
||||
@@ -556,4 +589,5 @@ void LinuxForceFeedback::_unload( int handle)
|
||||
if (ioctl(mJoyStick, EVIOCRMFF, handle) == -1) {
|
||||
OIS_EXCEPT(E_General, "Unknown error removing effect->..");
|
||||
}
|
||||
+#endif
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
remove linux' input.h
|
||||
stub functions
|
||||
|
||||
Index: extensions/gdx-controllers/gdx-controllers-desktop/jni/ois-v1-4svn/src/linux/LinuxJoyStickEvents.cpp
|
||||
--- extensions/gdx-controllers/gdx-controllers-desktop/jni/ois-v1-4svn/src/linux/LinuxJoyStickEvents.cpp.orig
|
||||
+++ extensions/gdx-controllers/gdx-controllers-desktop/jni/ois-v1-4svn/src/linux/LinuxJoyStickEvents.cpp
|
||||
@@ -32,7 +32,6 @@ restrictions:
|
||||
|
||||
#include <fcntl.h> //Needed to Open a file descriptor
|
||||
#include <cassert>
|
||||
-#include <linux/input.h>
|
||||
|
||||
|
||||
#include <sstream>
|
||||
@@ -86,6 +85,7 @@ void LinuxJoyStick::_initialize()
|
||||
//-------------------------------------------------------------------//
|
||||
void LinuxJoyStick::capture()
|
||||
{
|
||||
+#if !defined(__OpenBSD__)
|
||||
static const short POV_MASK[8] = {0,0,1,1,2,2,3,3};
|
||||
|
||||
//Used to determine if an axis has been changed and needs an event
|
||||
@@ -209,16 +209,19 @@ void LinuxJoyStick::capture()
|
||||
if( mListener->axisMoved( JoyStickEvent(this,mState), i) == false )
|
||||
return;
|
||||
}
|
||||
+#endif
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------//
|
||||
void LinuxJoyStick::setBuffered(bool buffered)
|
||||
{
|
||||
+#if !defined(__OpenBSD__)
|
||||
if( buffered != mBuffered )
|
||||
{
|
||||
mBuffered = buffered;
|
||||
_initialize();
|
||||
}
|
||||
+#endif
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------//
|
@ -0,0 +1,17 @@
|
||||
disable building of unneeded parts of gdx-controllers-*
|
||||
|
||||
Index: extensions/gdx-controllers/pom.xml
|
||||
--- extensions/gdx-controllers/pom.xml.orig
|
||||
+++ extensions/gdx-controllers/pom.xml
|
||||
@@ -15,9 +15,11 @@
|
||||
<modules>
|
||||
<module>gdx-controllers</module>
|
||||
<module>gdx-controllers-desktop</module>
|
||||
+ <!--
|
||||
<module>gdx-controllers-desktop/jni/maven</module>
|
||||
<module>gdx-controllers-lwjgl3</module>
|
||||
<module>gdx-controllers-android</module>
|
||||
<module>gdx-controllers-gwt</module>
|
||||
+ -->
|
||||
</modules>
|
||||
</project>
|
@ -0,0 +1,130 @@
|
||||
shamelessly abuse build-linux64.xml for OpenBSD build
|
||||
|
||||
Index: extensions/gdx-freetype/jni/build-linux64.xml
|
||||
--- extensions/gdx-freetype/jni/build-linux64.xml.orig
|
||||
+++ extensions/gdx-freetype/jni/build-linux64.xml
|
||||
@@ -1,12 +1,12 @@
|
||||
-<project name="gdx-freetype-Linux-64" basedir="." default="postcompile">
|
||||
+<project name="gdx-freetype-OpenBSD" basedir="." default="postcompile">
|
||||
<!-- include the environment -->
|
||||
<property environment="env"/>
|
||||
<!-- output directory for temporary object files -->
|
||||
- <property name="buildDir" value="target/linux64" />
|
||||
+ <property name="buildDir" value="target/openbsd" />
|
||||
<!-- output directory for the shared library -->
|
||||
- <property name="libsDir" value="../libs/linux64" />
|
||||
+ <property name="libsDir" value="../libs/openbsd" />
|
||||
<!-- the name of the shared library -->
|
||||
- <property name="libName" value="libgdx-freetype64.so"/>
|
||||
+ <property name="libName" value="libgdx-freetype${M_ARCH}.so"/>
|
||||
<!-- the jni header jniPlatform to use -->
|
||||
<property name="jniPlatform" value="linux"/>
|
||||
<!-- the compilerPrefix for the C & C++ compilers -->
|
||||
@@ -14,10 +14,10 @@
|
||||
<!-- the compilerSuffix for the C & C++ compilers -->
|
||||
<property name="compilerSuffix" value="" />
|
||||
|
||||
- <!-- define gcc compiler, options and files to compile -->
|
||||
- <property name="gcc" value="${compilerPrefix}gcc${compilerSuffix}"/>
|
||||
- <property name="gcc-opts" value="-c -Wall -O2 -mfpmath=sse -msse -fmessage-length=0 -m64 -fPIC -DFT2_BUILD_LIBRARY"/>
|
||||
- <fileset id="gcc-files" dir="./">
|
||||
+ <!-- define cc compiler, options and files to compile -->
|
||||
+ <property name="cc" value="${compilerPrefix}cc${compilerSuffix}"/>
|
||||
+ <property name="cc-opts" value="-c -Wall ${CFLAGS} -fPIC -DFT2_BUILD_LIBRARY"/>
|
||||
+ <fileset id="cc-files" dir="./">
|
||||
<exclude name="target/"/>
|
||||
<include name="memcpy_wrap.c"/>
|
||||
<include name="freetype-2.6.2/src/base/ftsystem.c"/>
|
||||
@@ -68,10 +68,10 @@
|
||||
|
||||
</fileset>
|
||||
|
||||
- <!-- define g++ compiler, options and files to compile -->
|
||||
- <property name="g++" value="${compilerPrefix}g++${compilerSuffix}"/>
|
||||
- <property name="g++-opts" value="-c -Wall -O2 -mfpmath=sse -msse -fmessage-length=0 -m64 -fPIC -DFT2_BUILD_LIBRARY"/>
|
||||
- <fileset id="g++-files" dir="./">
|
||||
+ <!-- define c++ compiler, options and files to compile -->
|
||||
+ <property name="c++" value="${compilerPrefix}c++${compilerSuffix}"/>
|
||||
+ <property name="c++-opts" value="-c -Wall ${CXXFLAGS} -fPIC -DFT2_BUILD_LIBRARY"/>
|
||||
+ <fileset id="c++-files" dir="./">
|
||||
<exclude name="target/"/>
|
||||
<include name="**/*.cpp"/>
|
||||
|
||||
@@ -79,8 +79,8 @@
|
||||
</fileset>
|
||||
|
||||
<!-- define linker and options -->
|
||||
- <property name="linker" value="${compilerPrefix}g++${compilerSuffix}"/>
|
||||
- <property name="linker-opts" value="-shared -m64 -Wl,-wrap,memcpy"/>
|
||||
+ <property name="linker" value="${compilerPrefix}c++${compilerSuffix}"/>
|
||||
+ <property name="linker-opts" value="-shared"/>
|
||||
<property name="libraries" value=""/>
|
||||
|
||||
<!-- cleans the build directory, removes all object files and shared libs -->
|
||||
@@ -96,13 +96,13 @@
|
||||
<and>
|
||||
<or>
|
||||
<!-- Include both b/c Windows might be either -->
|
||||
- <available file="${g++}" filepath="${env.PATH}"/>
|
||||
- <available file="${g++}" filepath="${env.Path}"/>
|
||||
+ <available file="${c++}" filepath="${env.PATH}"/>
|
||||
+ <available file="${c++}" filepath="${env.Path}"/>
|
||||
</or>
|
||||
<or>
|
||||
<!-- Include both b/c Windows might be either -->
|
||||
- <available file="${gcc}" filepath="${env.PATH}"/>
|
||||
- <available file="${gcc}" filepath="${env.Path}"/>
|
||||
+ <available file="${cc}" filepath="${env.PATH}"/>
|
||||
+ <available file="${cc}" filepath="${env.Path}"/>
|
||||
</or>
|
||||
</and>
|
||||
</condition>
|
||||
@@ -115,8 +115,8 @@
|
||||
<target name="create-build-dir" depends="precompile" if="has-compiler">
|
||||
<!-- FIXME this is pretty nasty :/ -->
|
||||
<copy todir="${buildDir}">
|
||||
- <fileset refid="g++-files"/>
|
||||
- <fileset refid="gcc-files"/>
|
||||
+ <fileset refid="c++-files"/>
|
||||
+ <fileset refid="cc-files"/>
|
||||
</copy>
|
||||
<delete>
|
||||
<fileset dir="${buildDir}">
|
||||
@@ -129,8 +129,8 @@
|
||||
<!-- compiles all C and C++ files to object files in the build directory -->
|
||||
<target name="compile" depends="create-build-dir" if="has-compiler">
|
||||
<mkdir dir="${buildDir}"/>
|
||||
- <apply failonerror="true" executable="${g++}" dest="${buildDir}" verbose="true">
|
||||
- <arg line="${g++-opts}"/>
|
||||
+ <apply failonerror="true" executable="${c++}" dest="${buildDir}" verbose="true">
|
||||
+ <arg line="${c++-opts}"/>
|
||||
<arg value="-Ijni-headers"/>
|
||||
<arg value="-Ijni-headers/${jniPlatform}"/>
|
||||
<arg value="-I."/>
|
||||
@@ -139,14 +139,14 @@
|
||||
<srcfile/>
|
||||
<arg value="-o"/>
|
||||
<targetfile/>
|
||||
- <fileset refid="g++-files"/>
|
||||
+ <fileset refid="c++-files"/>
|
||||
<compositemapper>
|
||||
<mapper type="glob" from="*.cpp" to="*.o"/>
|
||||
<mapper type="glob" from="*.mm" to="*.o"/>
|
||||
</compositemapper>
|
||||
</apply>
|
||||
- <apply failonerror="true" executable="${gcc}" dest="${buildDir}" verbose="true">
|
||||
- <arg line="${gcc-opts}"/>
|
||||
+ <apply failonerror="true" executable="${cc}" dest="${buildDir}" verbose="true">
|
||||
+ <arg line="${cc-opts}"/>
|
||||
<arg value="-Ijni-headers"/>
|
||||
<arg value="-Ijni-headers/${jniPlatform}"/>
|
||||
<arg value="-I."/>
|
||||
@@ -155,7 +155,7 @@
|
||||
<srcfile/>
|
||||
<arg value="-o"/>
|
||||
<targetfile/>
|
||||
- <fileset refid="gcc-files"/>
|
||||
+ <fileset refid="cc-files"/>
|
||||
<compositemapper>
|
||||
<mapper type="glob" from="*.c" to="*.o"/>
|
||||
<mapper type="glob" from="*.m" to="*.o"/>
|
@ -0,0 +1,14 @@
|
||||
hijack Linux codepath
|
||||
|
||||
Index: extensions/gdx-jnigen/src/com/badlogic/gdx/jnigen/JniGenSharedLibraryLoader.java
|
||||
--- extensions/gdx-jnigen/src/com/badlogic/gdx/jnigen/JniGenSharedLibraryLoader.java.orig
|
||||
+++ extensions/gdx-jnigen/src/com/badlogic/gdx/jnigen/JniGenSharedLibraryLoader.java
|
||||
@@ -159,7 +159,7 @@ public class JniGenSharedLibraryLoader {
|
||||
if (loadedLibraries.contains(sharedLibName)) return;
|
||||
|
||||
boolean isWindows = System.getProperty("os.name").contains("Windows");
|
||||
- boolean isLinux = System.getProperty("os.name").contains("Linux");
|
||||
+ boolean isLinux = System.getProperty("os.name").contains("Linux") || System.getProperty("os.name").contains("OpenBSD");
|
||||
boolean isMac = System.getProperty("os.name").contains("Mac");
|
||||
boolean isAndroid = false;
|
||||
boolean is64Bit = System.getProperty("os.arch").equals("amd64") || System.getProperty("os.arch").equals("x86_64");
|
130
games/libgdx/1.9.9/patches/patch-gdx_jni_build-linux64_xml
Normal file
130
games/libgdx/1.9.9/patches/patch-gdx_jni_build-linux64_xml
Normal file
@ -0,0 +1,130 @@
|
||||
abuse build-linux64.xml to build for OpenBSD
|
||||
|
||||
Index: gdx/jni/build-linux64.xml
|
||||
--- gdx/jni/build-linux64.xml.orig
|
||||
+++ gdx/jni/build-linux64.xml
|
||||
@@ -1,12 +1,12 @@
|
||||
-<project name="gdx-Linux-64" basedir="." default="postcompile">
|
||||
+<project name="gdx-OpenBSD" basedir="." default="postcompile">
|
||||
<!-- include the environment -->
|
||||
<property environment="env"/>
|
||||
<!-- output directory for temporary object files -->
|
||||
- <property name="buildDir" value="../target/native/linux64" />
|
||||
+ <property name="buildDir" value="../target/native/openbsd" />
|
||||
<!-- output directory for the shared library -->
|
||||
- <property name="libsDir" value="../libs/linux64" />
|
||||
+ <property name="libsDir" value="../libs/openbsd" />
|
||||
<!-- the name of the shared library -->
|
||||
- <property name="libName" value="libgdx64.so"/>
|
||||
+ <property name="libName" value="libgdx${M_ARCH}.so"/>
|
||||
<!-- the jni header jniPlatform to use -->
|
||||
<property name="jniPlatform" value="linux"/>
|
||||
<!-- the compilerPrefix for the C & C++ compilers -->
|
||||
@@ -15,31 +15,30 @@
|
||||
<property name="compilerSuffix" value="" />
|
||||
|
||||
<!-- define gcc compiler, options and files to compile -->
|
||||
- <property name="gcc" value="${compilerPrefix}gcc${compilerSuffix}"/>
|
||||
- <property name="gcc-opts" value="-c -Wall -O2 -mfpmath=sse -msse -fmessage-length=0 -m64 -fPIC"/>
|
||||
- <fileset id="gcc-files" dir="./">
|
||||
+ <property name="cc" value="${compilerPrefix}cc${compilerSuffix}"/>
|
||||
+ <property name="cc-opts" value="-c -Wall ${CFLAGS} -fPIC"/>
|
||||
+ <fileset id="cc-files" dir="./">
|
||||
<exclude name="target/"/>
|
||||
- <include name="memcpy_wrap.c"/>
|
||||
<include name="**/*.c"/>
|
||||
|
||||
|
||||
</fileset>
|
||||
|
||||
<!-- define g++ compiler, options and files to compile -->
|
||||
- <property name="g++" value="${compilerPrefix}g++${compilerSuffix}"/>
|
||||
- <property name="g++-opts" value="-c -Wall -O2 -mfpmath=sse -msse -fmessage-length=0 -m64 -fPIC"/>
|
||||
- <fileset id="g++-files" dir="./">
|
||||
+ <property name="c++" value="${compilerPrefix}c++${compilerSuffix}"/>
|
||||
+ <property name="c++-opts" value="-c -Wall ${CXXFLAGS} -fPIC"/>
|
||||
+ <fileset id="c++-files" dir="./">
|
||||
<exclude name="target/"/>
|
||||
<include name="**/*.cpp"/>
|
||||
-
|
||||
+ <include name="memcpy_wrap.c"/>
|
||||
<exclude name="android/**"/>
|
||||
<exclude name="iosgl/**"/>
|
||||
|
||||
</fileset>
|
||||
|
||||
<!-- define linker and options -->
|
||||
- <property name="linker" value="${compilerPrefix}g++${compilerSuffix}"/>
|
||||
- <property name="linker-opts" value="-shared -m64 -Wl,-wrap,memcpy"/>
|
||||
+ <property name="linker" value="${compilerPrefix}c++${compilerSuffix}"/>
|
||||
+ <property name="linker-opts" value="-shared"/>
|
||||
<property name="libraries" value=""/>
|
||||
|
||||
<!-- cleans the build directory, removes all object files and shared libs -->
|
||||
@@ -55,13 +54,13 @@
|
||||
<and>
|
||||
<or>
|
||||
<!-- Include both b/c Windows might be either -->
|
||||
- <available file="${g++}" filepath="${env.PATH}"/>
|
||||
- <available file="${g++}" filepath="${env.Path}"/>
|
||||
+ <available file="${c++}" filepath="${env.PATH}"/>
|
||||
+ <available file="${c++}" filepath="${env.Path}"/>
|
||||
</or>
|
||||
<or>
|
||||
<!-- Include both b/c Windows might be either -->
|
||||
- <available file="${gcc}" filepath="${env.PATH}"/>
|
||||
- <available file="${gcc}" filepath="${env.Path}"/>
|
||||
+ <available file="${cc}" filepath="${env.PATH}"/>
|
||||
+ <available file="${cc}" filepath="${env.Path}"/>
|
||||
</or>
|
||||
</and>
|
||||
</condition>
|
||||
@@ -74,8 +73,8 @@
|
||||
<target name="create-build-dir" depends="precompile" if="has-compiler">
|
||||
<!-- FIXME this is pretty nasty :/ -->
|
||||
<copy todir="${buildDir}">
|
||||
- <fileset refid="g++-files"/>
|
||||
- <fileset refid="gcc-files"/>
|
||||
+ <fileset refid="c++-files"/>
|
||||
+ <fileset refid="cc-files"/>
|
||||
</copy>
|
||||
<delete>
|
||||
<fileset dir="${buildDir}">
|
||||
@@ -88,8 +87,8 @@
|
||||
<!-- compiles all C and C++ files to object files in the build directory -->
|
||||
<target name="compile" depends="create-build-dir" if="has-compiler">
|
||||
<mkdir dir="${buildDir}"/>
|
||||
- <apply failonerror="true" executable="${g++}" dest="${buildDir}" verbose="true">
|
||||
- <arg line="${g++-opts}"/>
|
||||
+ <apply failonerror="true" executable="${c++}" dest="${buildDir}" verbose="true">
|
||||
+ <arg line="${c++-opts}"/>
|
||||
<arg value="-Ijni-headers"/>
|
||||
<arg value="-Ijni-headers/${jniPlatform}"/>
|
||||
<arg value="-I."/>
|
||||
@@ -97,14 +96,14 @@
|
||||
<srcfile/>
|
||||
<arg value="-o"/>
|
||||
<targetfile/>
|
||||
- <fileset refid="g++-files"/>
|
||||
+ <fileset refid="c++-files"/>
|
||||
<compositemapper>
|
||||
<mapper type="glob" from="*.cpp" to="*.o"/>
|
||||
<mapper type="glob" from="*.mm" to="*.o"/>
|
||||
</compositemapper>
|
||||
</apply>
|
||||
- <apply failonerror="true" executable="${gcc}" dest="${buildDir}" verbose="true">
|
||||
- <arg line="${gcc-opts}"/>
|
||||
+ <apply failonerror="true" executable="${cc}" dest="${buildDir}" verbose="true">
|
||||
+ <arg line="${cc-opts}"/>
|
||||
<arg value="-Ijni-headers"/>
|
||||
<arg value="-Ijni-headers/${jniPlatform}"/>
|
||||
<arg value="-I."/>
|
||||
@@ -112,7 +111,7 @@
|
||||
<srcfile/>
|
||||
<arg value="-o"/>
|
||||
<targetfile/>
|
||||
- <fileset refid="gcc-files"/>
|
||||
+ <fileset refid="cc-files"/>
|
||||
<compositemapper>
|
||||
<mapper type="glob" from="*.c" to="*.o"/>
|
||||
<mapper type="glob" from="*.m" to="*.o"/>
|
@ -0,0 +1,14 @@
|
||||
hijack Linux codepath
|
||||
|
||||
Index: gdx/src/com/badlogic/gdx/scenes/scene2d/utils/UIUtils.java
|
||||
--- gdx/src/com/badlogic/gdx/scenes/scene2d/utils/UIUtils.java.orig
|
||||
+++ gdx/src/com/badlogic/gdx/scenes/scene2d/utils/UIUtils.java
|
||||
@@ -8,7 +8,7 @@ import com.badlogic.gdx.Input.Keys;
|
||||
public class UIUtils {
|
||||
static public boolean isMac = System.getProperty("os.name").contains("OS X");
|
||||
static public boolean isWindows = System.getProperty("os.name").contains("Windows");
|
||||
- static public boolean isLinux = System.getProperty("os.name").contains("Linux");
|
||||
+ static public boolean isLinux = System.getProperty("os.name").contains("Linux") || System.getProperty("os.name").contains("OpenBSD");
|
||||
|
||||
static public boolean left () {
|
||||
return Gdx.input.isButtonPressed(Buttons.LEFT);
|
@ -0,0 +1,14 @@
|
||||
hijack Linux codepath
|
||||
|
||||
Index: gdx/src/com/badlogic/gdx/utils/SharedLibraryLoader.java
|
||||
--- gdx/src/com/badlogic/gdx/utils/SharedLibraryLoader.java.orig
|
||||
+++ gdx/src/com/badlogic/gdx/utils/SharedLibraryLoader.java
|
||||
@@ -35,7 +35,7 @@ import java.util.zip.ZipFile;
|
||||
* @author Nathan Sweet */
|
||||
public class SharedLibraryLoader {
|
||||
static public boolean isWindows = System.getProperty("os.name").contains("Windows");
|
||||
- static public boolean isLinux = System.getProperty("os.name").contains("Linux");
|
||||
+ static public boolean isLinux = System.getProperty("os.name").contains("Linux") || System.getProperty("os.name").contains("OpenBSD");
|
||||
static public boolean isMac = System.getProperty("os.name").contains("Mac");
|
||||
static public boolean isIos = false;
|
||||
static public boolean isAndroid = false;
|
3
games/libgdx/1.9.9/pkg/DESCR
Normal file
3
games/libgdx/1.9.9/pkg/DESCR
Normal file
@ -0,0 +1,3 @@
|
||||
libGDX is a cross-platform Java game development framework based on OpenGL (ES)
|
||||
that works on Windows, Linux, Mac OS X, Android, your WebGL enabled browser and
|
||||
iOS.
|
1814
games/libgdx/1.9.9/pkg/PLIST
Normal file
1814
games/libgdx/1.9.9/pkg/PLIST
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,128 +1,5 @@
|
||||
COMMENT = java game development framework
|
||||
VERSION = 1.9.11
|
||||
PKGNAME = libgdx-${VERSION}
|
||||
REVISION = 2
|
||||
SUBDIR =
|
||||
SUBDIR += 1.9.9
|
||||
SUBDIR += 1.9.11
|
||||
|
||||
.if ${MACHINE_ARCH} == "i386"
|
||||
M_ARCH =
|
||||
.elif ${MACHINE_ARCH} == "amd64"
|
||||
M_ARCH = 64
|
||||
.endif
|
||||
|
||||
GH_ACCOUNT = libgdx
|
||||
GH_PROJECT = libgdx
|
||||
GH_TAGNAME = gdx-parent-${VERSION}
|
||||
|
||||
CATEGORIES = games
|
||||
HOMEPAGE = https://libgdx.badlogicgames.com
|
||||
MAINTAINER = Thomas Frohwein <thfr@openbsd.org>
|
||||
|
||||
# Apache 2.0. m2repo bundle: Apache 2.0, BSD, LGPL 2.1,
|
||||
# Eclipse Public License (junit)
|
||||
PERMIT_PACKAGE = Yes
|
||||
|
||||
WANTLIB += ${COMPILER_LIBCXX} X11 m
|
||||
|
||||
MASTER_SITES0 = https://thfr.info/distfiles/
|
||||
|
||||
DISTFILES = ${DISTNAME}${EXTRACT_SUFX} \
|
||||
m2repo-libgdx-${VERSION}-tools.tar.gz:0
|
||||
|
||||
DIST_SUBDIR = libgdx
|
||||
|
||||
# C++
|
||||
COMPILER = base-clang ports-gcc base-gcc
|
||||
MODULES = java
|
||||
MODJAVA_VER = 11
|
||||
MODJAVA_BUILD = ant
|
||||
MODJAVA_BUILD_FILE = build-linux64.xml
|
||||
BUILD_DEPENDS = devel/apache-ant \
|
||||
devel/maven
|
||||
|
||||
PATCHORIG = .orig.port
|
||||
|
||||
# mvn command
|
||||
# flags: -o: offline
|
||||
MVN = mvn -o -Dmaven.repo.local=${WRKDIR}/m2repo-libgdx-${VERSION}-tools package
|
||||
|
||||
NO_TEST = Yes
|
||||
|
||||
SUBST_VARS += CFLAGS CXXFLAGS M_ARCH
|
||||
|
||||
FIX_CRLF_FILES = \
|
||||
backends/gdx-backend-lwjgl/src/com/badlogic/gdx/backends/lwjgl/LwjglNativesLoader.java \
|
||||
backends/gdx-backend-lwjgl/src/com/badlogic/gdx/backends/lwjgl/audio/OpenALMusic.java \
|
||||
extensions/gdx-box2d/gdx-box2d/jni/build-linux64.xml \
|
||||
extensions/gdx-controllers/gdx-controllers-desktop/jni/build-linux64.xml \
|
||||
extensions/gdx-freetype/jni/build-linux64.xml \
|
||||
extensions/gdx-jnigen/src/com/badlogic/gdx/jnigen/JniGenSharedLibraryLoader.java \
|
||||
gdx/jni/build-linux64.xml \
|
||||
gdx/src/com/badlogic/gdx/scenes/scene2d/utils/UIUtils.java \
|
||||
gdx/src/com/badlogic/gdx/utils/SharedLibraryLoader.java
|
||||
|
||||
post-extract:
|
||||
mkdir ${WRKDIR}/mvnrepo
|
||||
|
||||
do-gen:
|
||||
${SUBST_CMD} ${WRKSRC}/gdx/jni/build-linux64.xml
|
||||
${SUBST_CMD} ${WRKSRC}/extensions/gdx-box2d/gdx-box2d/jni/build-linux64.xml
|
||||
${SUBST_CMD} ${WRKSRC}/extensions/gdx-freetype/jni/build-linux64.xml
|
||||
${SUBST_CMD} ${WRKSRC}/extensions/gdx-controllers/gdx-controllers-desktop/jni/build-linux64.xml
|
||||
|
||||
# order of ${MVN} commands is important - gdx-jnigen, gdx, etc.
|
||||
do-build:
|
||||
cd ${WRKSRC}/gdx/jni && env -i ${MAKE_ENV} ant -f build-linux64.xml
|
||||
cd ${WRKSRC}/extensions/gdx-box2d/gdx-box2d/jni \
|
||||
&& env -i ${MAKE_ENV} ant -f build-linux64.xml
|
||||
cd ${WRKSRC}/extensions/gdx-freetype/jni \
|
||||
&& env -i ${MAKE_ENV} ant -f build-linux64.xml
|
||||
cd ${WRKSRC}/extensions/gdx-controllers/gdx-controllers-desktop/jni \
|
||||
&& env -i ${MAKE_ENV} ant -f build-linux64.xml
|
||||
cd ${WRKSRC}/extensions/gdx-jnigen \
|
||||
&& env -i ${MAKE_ENV} ${MVN}
|
||||
cd ${WRKSRC}/gdx \
|
||||
&& env -i ${MAKE_ENV} ${MVN}
|
||||
cd ${WRKSRC}/backends/gdx-backend-lwjgl \
|
||||
&& env -i ${MAKE_ENV} ${MVN}
|
||||
cd ${WRKSRC}/backends/gdx-backend-lwjgl3 \
|
||||
&& env -i ${MAKE_ENV} ${MVN}
|
||||
cd ${WRKSRC}/extensions/gdx-freetype \
|
||||
&& env -i ${MAKE_ENV} ${MVN}
|
||||
cd ${WRKSRC}/extensions/gdx-controllers/gdx-controllers \
|
||||
&& env -i ${MAKE_ENV} ${MVN}
|
||||
cd ${WRKSRC}/extensions/gdx-controllers/gdx-controllers-desktop \
|
||||
&& env -i ${MAKE_ENV} ${MVN}
|
||||
cd ${WRKSRC}/extensions/gdx-box2d/gdx-box2d \
|
||||
&& env -i ${MAKE_ENV} ${MVN}
|
||||
cd ${WRKSRC}/extensions/gdx-tools \
|
||||
&& env -i ${MAKE_ENV} ${MVN}
|
||||
|
||||
do-install:
|
||||
${INSTALL_DATA_DIR} ${PREFIX}/share/libgdx
|
||||
${INSTALL_DATA} ${WRKBUILD}/gdx/libs/openbsd/libgdx${M_ARCH}.so \
|
||||
${PREFIX}/share/libgdx/
|
||||
${INSTALL_DATA} \
|
||||
${WRKBUILD}/extensions/gdx-box2d/gdx-box2d/libs/openbsd/libgdx-box2d${M_ARCH}.so \
|
||||
${PREFIX}/share/libgdx/
|
||||
${INSTALL_DATA} \
|
||||
${WRKBUILD}/extensions/gdx-freetype/libs/openbsd/libgdx-freetype${M_ARCH}.so \
|
||||
${PREFIX}/share/libgdx/
|
||||
${INSTALL_DATA} \
|
||||
${WRKBUILD}/extensions/gdx-controllers/gdx-controllers-desktop/libs/openbsd/libgdx-controllers-desktop${M_ARCH}.so \
|
||||
${PREFIX}/share/libgdx/
|
||||
cp -R ${WRKBUILD}/gdx/target/classes/com \
|
||||
${WRKBUILD}/backends/gdx-backend-lwjgl/target/classes/com \
|
||||
${WRKBUILD}/backends/gdx-backend-lwjgl3/target/classes/com \
|
||||
${WRKBUILD}/extensions/gdx-freetype/target/classes/com \
|
||||
${WRKBUILD}/extensions/gdx-controllers/gdx-controllers{,-desktop}/target/classes/com \
|
||||
${WRKBUILD}/extensions/gdx-box2d/gdx-box2d/target/classes/com \
|
||||
${WRKBUILD}/extensions/gdx-tools/target/classes/com \
|
||||
${PREFIX}/share/libgdx/
|
||||
cp -R ${WRKBUILD}/extensions/gdx-jnigen/target/classes/com/badlogic/gdx/jnigen \
|
||||
${PREFIX}/share/libgdx/com/badlogic/gdx/
|
||||
|
||||
post-install:
|
||||
${SUBST_CMD} -c -m 755 ${FILESDIR}/libgdx-setup.sh ${PREFIX}/bin/libgdx-setup
|
||||
${SUBST_CMD} -c -m 755 ${FILESDIR}/libgdx-run.sh ${PREFIX}/bin/libgdx-run
|
||||
|
||||
.include <bsd.port.mk>
|
||||
.include <bsd.port.subdir.mk>
|
||||
|
115
games/libgdx/Makefile.inc
Normal file
115
games/libgdx/Makefile.inc
Normal file
@ -0,0 +1,115 @@
|
||||
COMMENT ?= java game development framework
|
||||
PKGNAME ?= libgdx-${VERSION}
|
||||
|
||||
.if ${MACHINE_ARCH} == "i386"
|
||||
M_ARCH ?= ""
|
||||
.elif ${MACHINE_ARCH} == "amd64"
|
||||
M_ARCH ?= 64
|
||||
.endif
|
||||
|
||||
GH_ACCOUNT ?= libgdx
|
||||
GH_PROJECT ?= libgdx
|
||||
GH_TAGNAME ?= gdx-parent-${VERSION}
|
||||
|
||||
CATEGORIES += games
|
||||
HOMEPAGE ?= https://libgdx.badlogicgames.com
|
||||
MAINTAINER ?= Thomas Frohwein <thfr@openbsd.org>
|
||||
|
||||
# Apache 2.0. m2repo bundle: Apache 2.0, BSD, LGPL 2.1,
|
||||
# Eclipse Public License (junit)
|
||||
PERMIT_PACKAGE ?= Yes
|
||||
|
||||
MASTER_SITES0 ?= https://thfr.info/distfiles/
|
||||
|
||||
DISTFILES ?= ${DISTNAME}${EXTRACT_SUFX} \
|
||||
m2repo-libgdx-${VERSION}-tools.tar.gz:0
|
||||
|
||||
DIST_SUBDIR ?= libgdx
|
||||
|
||||
# C++
|
||||
COMPILER ?= base-clang ports-gcc base-gcc
|
||||
MODULES ?= java
|
||||
MODJAVA_VER ?= 1.8
|
||||
MODJAVA_BUILD ?= ant
|
||||
MODJAVA_BUILD_FILE ?= build-linux64.xml
|
||||
BUILD_DEPENDS ?= devel/apache-ant \
|
||||
devel/maven
|
||||
|
||||
PATCHORIG ?= .orig.port
|
||||
|
||||
# mvn command
|
||||
# -o: offline build
|
||||
MVN ?= mvn -o -Dmaven.repo.local=${WRKDIR}/m2repo-libgdx-${VERSION}-tools package
|
||||
|
||||
NO_TEST ?= Yes
|
||||
|
||||
SUBST_VARS += CFLAGS CXXFLAGS M_ARCH
|
||||
|
||||
FIX_CRLF_FILES = \
|
||||
backends/gdx-backend-lwjgl/src/com/badlogic/gdx/backends/lwjgl/LwjglNativesLoader.java \
|
||||
backends/gdx-backend-lwjgl/src/com/badlogic/gdx/backends/lwjgl/audio/OpenALMusic.java \
|
||||
extensions/gdx-box2d/gdx-box2d/jni/build-linux64.xml \
|
||||
extensions/gdx-controllers/gdx-controllers-desktop/jni/build-linux64.xml \
|
||||
extensions/gdx-freetype/jni/build-linux64.xml \
|
||||
extensions/gdx-jnigen/src/com/badlogic/gdx/jnigen/JniGenSharedLibraryLoader.java \
|
||||
gdx/jni/build-linux64.xml \
|
||||
gdx/src/com/badlogic/gdx/scenes/scene2d/utils/UIUtils.java \
|
||||
gdx/src/com/badlogic/gdx/utils/SharedLibraryLoader.java
|
||||
|
||||
do-gen:
|
||||
${SUBST_CMD} ${WRKSRC}/gdx/jni/build-linux64.xml
|
||||
${SUBST_CMD} ${WRKSRC}/extensions/gdx-box2d/gdx-box2d/jni/build-linux64.xml
|
||||
${SUBST_CMD} ${WRKSRC}/extensions/gdx-freetype/jni/build-linux64.xml
|
||||
${SUBST_CMD} ${WRKSRC}/extensions/gdx-controllers/gdx-controllers-desktop/jni/build-linux64.xml
|
||||
|
||||
# order of ${MVN} commands is important - gdx-jnigen, gdx, etc.
|
||||
do-build:
|
||||
cd ${WRKSRC}/gdx/jni && env -i ${MAKE_ENV} ant -f build-linux64.xml
|
||||
cd ${WRKSRC}/extensions/gdx-box2d/gdx-box2d/jni \
|
||||
&& env -i ${MAKE_ENV} ant -f build-linux64.xml
|
||||
cd ${WRKSRC}/extensions/gdx-freetype/jni \
|
||||
&& env -i ${MAKE_ENV} ant -f build-linux64.xml
|
||||
cd ${WRKSRC}/extensions/gdx-controllers/gdx-controllers-desktop/jni \
|
||||
&& env -i ${MAKE_ENV} ant -f build-linux64.xml
|
||||
cd ${WRKSRC}/extensions/gdx-jnigen \
|
||||
&& env -i ${MAKE_ENV} ${MVN}
|
||||
cd ${WRKSRC}/gdx \
|
||||
&& env -i ${MAKE_ENV} ${MVN}
|
||||
cd ${WRKSRC}/backends/gdx-backend-lwjgl \
|
||||
&& env -i ${MAKE_ENV} ${MVN}
|
||||
cd ${WRKSRC}/backends/gdx-backend-lwjgl3 \
|
||||
&& env -i ${MAKE_ENV} ${MVN}
|
||||
cd ${WRKSRC}/extensions/gdx-freetype \
|
||||
&& env -i ${MAKE_ENV} ${MVN}
|
||||
cd ${WRKSRC}/extensions/gdx-controllers/gdx-controllers \
|
||||
&& env -i ${MAKE_ENV} ${MVN}
|
||||
cd ${WRKSRC}/extensions/gdx-controllers/gdx-controllers-desktop \
|
||||
&& env -i ${MAKE_ENV} ${MVN}
|
||||
cd ${WRKSRC}/extensions/gdx-box2d/gdx-box2d \
|
||||
&& env -i ${MAKE_ENV} ${MVN}
|
||||
cd ${WRKSRC}/extensions/gdx-tools \
|
||||
&& env -i ${MAKE_ENV} ${MVN}
|
||||
|
||||
do-install:
|
||||
mkdir -p ${PREFIX}/share/libgdx/${VERSION}
|
||||
${INSTALL_DATA} ${WRKBUILD}/gdx/libs/openbsd/libgdx${M_ARCH}.so \
|
||||
${PREFIX}/share/libgdx/${VERSION}/
|
||||
${INSTALL_DATA} \
|
||||
${WRKBUILD}/extensions/gdx-box2d/gdx-box2d/libs/openbsd/libgdx-box2d${M_ARCH}.so \
|
||||
${PREFIX}/share/libgdx/${VERSION}/
|
||||
${INSTALL_DATA} \
|
||||
${WRKBUILD}/extensions/gdx-freetype/libs/openbsd/libgdx-freetype${M_ARCH}.so \
|
||||
${PREFIX}/share/libgdx/${VERSION}/
|
||||
${INSTALL_DATA} \
|
||||
${WRKBUILD}/extensions/gdx-controllers/gdx-controllers-desktop/libs/openbsd/libgdx-controllers-desktop${M_ARCH}.so \
|
||||
${PREFIX}/share/libgdx/${VERSION}/
|
||||
cp -R ${WRKBUILD}/gdx/target/classes/com \
|
||||
${WRKBUILD}/backends/gdx-backend-lwjgl/target/classes/com \
|
||||
${WRKBUILD}/backends/gdx-backend-lwjgl3/target/classes/com \
|
||||
${WRKBUILD}/extensions/gdx-freetype/target/classes/com \
|
||||
${WRKBUILD}/extensions/gdx-controllers/gdx-controllers{,-desktop}/target/classes/com \
|
||||
${WRKBUILD}/extensions/gdx-box2d/gdx-box2d/target/classes/com \
|
||||
${WRKBUILD}/extensions/gdx-tools/target/classes/com \
|
||||
${PREFIX}/share/libgdx/${VERSION}/
|
||||
cp -R ${WRKBUILD}/extensions/gdx-jnigen/target/classes/com/badlogic/gdx/jnigen \
|
||||
${PREFIX}/share/libgdx/${VERSION}/com/badlogic/gdx/
|
@ -1,10 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# get mainClass from config.json
|
||||
mainclass=
|
||||
mainclass="$(cat config.json | grep mainClass | cut -d\" -f 4)"
|
||||
|
||||
# TODO: get vmArgs from config.json
|
||||
vmargs="-Xmx2G"
|
||||
|
||||
JAVA_HOME=${TRUEPREFIX}/jdk-11 PATH=$PATH:$JAVA_HOME/bin java $vmargs $mainclass
|
@ -1,30 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
GDXARCH=
|
||||
if [ "$(uname -p)" = "amd64" ] ; then
|
||||
GDXARCH=64
|
||||
fi
|
||||
|
||||
JAVA_HOME=${TRUEPREFIX}/jdk-11
|
||||
PATH=$PATH:$JAVA_HOME/bin
|
||||
|
||||
for i in $(ls *.jar); do
|
||||
jar xvf $i
|
||||
done
|
||||
|
||||
for i in libgdx${GDXARCH}.so libgdx-controllers-desktop${GDXARCH}.so libgdx-freetype${GDXARCH}.so; do
|
||||
if [ -f "$i" ] ; then
|
||||
ln -sf ${TRUEPREFIX}/share/libgdx/$i
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -f "liblwjgl${GDXARCH}.so" ] ; then
|
||||
ln -sf ${TRUEPREFIX}/share/lwjgl/liblwjgl${GDXARCH}.so
|
||||
fi
|
||||
|
||||
if [ -f "libopenal${GDXARCH}.so" ] ; then
|
||||
ln -sf ${TRUEPREFIX}/lib/libopenal.so* libopenal${GDXARCH}.so # will fail if multiple libopenal.so versions exist
|
||||
fi
|
||||
|
||||
rm -rf com/badlogic
|
||||
ln -sf ${TRUEPREFIX}/share/libgdx/com/badlogic com/badlogic
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user