Added recipe for xmoto

This commit is contained in:
Kamil Krzyżanowski
2014-12-11 19:16:23 +00:00
parent 0d5ca0970f
commit bb4b3f855f
2 changed files with 191 additions and 0 deletions

View File

@@ -0,0 +1,100 @@
Only in xmoto-0.5.11-patch/: autom4te.cache
diff -ur xmoto-0.5.11/configure xmoto-0.5.11-patch/configure
--- xmoto-0.5.11/configure 2014-03-29 10:38:54.037748736 +0000
+++ xmoto-0.5.11-patch/configure 2014-12-11 05:23:06.159383552 +0000
@@ -7565,13 +7565,13 @@
# m
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for floor in -lm" >&5
-$as_echo_n "checking for floor in -lm... " >&6; }
-if ${ac_cv_lib_m_floor+:} false; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for floor in -lroot" >&5
+$as_echo_n "checking for floor in -lroot... " >&6; }
+if ${ac_cv_lib_root_floor+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
-LIBS="-lm $LIBS"
+LIBS="-lroot $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -7591,22 +7591,22 @@
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_m_floor=yes
+ ac_cv_lib_root_floor=yes
else
- ac_cv_lib_m_floor=no
+ ac_cv_lib_root_floor=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_floor" >&5
-$as_echo "$ac_cv_lib_m_floor" >&6; }
-if test "x$ac_cv_lib_m_floor" = xyes; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_root_floor" >&5
+$as_echo "$ac_cv_lib_root_floor" >&6; }
+if test "x$ac_cv_lib_root_floor" = xyes; then :
cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBM 1
+#define HAVE_LIBROOT 1
_ACEOF
- LIBS="-lm $LIBS"
+ LIBS="-lroot $LIBS"
else
as_fn_error $? "No math library found" "$LINENO" 5
diff -ur xmoto-0.5.11/configure.in xmoto-0.5.11-patch/configure.in
--- xmoto-0.5.11/configure.in 2014-03-29 10:35:24.036700160 +0000
+++ xmoto-0.5.11-patch/configure.in 2014-12-11 05:18:39.246153216 +0000
@@ -155,7 +155,7 @@
AM_CONDITIONAL([USE_SDLGFX], test "$USE_SDLGFX" = "1")
# m
-AC_CHECK_LIB(m, floor, , AC_MSG_ERROR(No math library found))
+AC_CHECK_LIB(root, floor, , AC_MSG_ERROR(No math library found))
AC_SEARCH_LIBS(lua_pushboolean,lua lua5.1 lua50, [], [AC_MSG_ERROR(liblua5.1, liblua50, or liblua required)])
AC_SEARCH_LIBS(luaopen_math,lualib lualib5.1 lualib50, [], [AC_MSG_ERROR(liblualib5.1, liblualib50, or liblualib required)])
diff -ur xmoto-0.5.11/src/GameInit.cpp xmoto-0.5.11-patch/src/GameInit.cpp
--- xmoto-0.5.11/src/GameInit.cpp 2011-10-11 20:18:35.013369344 +0000
+++ xmoto-0.5.11-patch/src/GameInit.cpp 2014-12-11 05:17:55.756023296 +0000
@@ -269,7 +269,7 @@
struct sigaction v_act;
v_act.sa_handler = xmexit_term;
-#if !defined(__APPLE__) && !defined(__FreeBSD__)
+#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__HAIKU__)
v_act.sa_restorer = NULL;
#endif
sigemptyset(&v_act.sa_mask);
diff -ur xmoto-0.5.11/src/net/extSDL_net.cpp xmoto-0.5.11-patch/src/net/extSDL_net.cpp
--- xmoto-0.5.11/src/net/extSDL_net.cpp 2011-10-11 20:18:28.058720256 +0000
+++ xmoto-0.5.11-patch/src/net/extSDL_net.cpp 2014-12-11 02:57:51.884998144 +0000
@@ -22,7 +22,7 @@
#include <errno.h>
// read the .h to understand why i redefine SDLNet_TCP_Send
-#if !defined(WIN32) && !defined(__APPLE__)
+#if !defined(WIN32) && !defined(__APPLE__) && !defined(__HAIKU__)
#include <sys/socket.h>
#define SOCKET int
diff -ur xmoto-0.5.11/src/VFileIO.cpp xmoto-0.5.11-patch/src/VFileIO.cpp
--- xmoto-0.5.11/src/VFileIO.cpp 2011-10-11 20:18:35.002883584 +0000
+++ xmoto-0.5.11-patch/src/VFileIO.cpp 2014-12-11 05:09:19.959709184 +0000
@@ -106,7 +106,7 @@
#endif
}
-#if !defined(WIN32) && !defined(__MORPHOS__) && !defined(__amigaos4__)
+#if !defined(WIN32) && !defined(__MORPHOS__) && !defined(__amigaos4__) && !defined(__HAIKU__)
void strlwr(char *pc) {
for(unsigned int i=0; i<strlen(pc); i++) pc[i] = tolower(pc[i]);
}

View File

@@ -0,0 +1,91 @@
SUMMARY="2D motocross platform game"
HOMEPAGE="http://xmoto.tuxfamily.org"
COPYRIGHT="2006-2014 Nicolas Adenis-Lamarre
2007-2011 Emmanuel Gorse
2009-2010 Jens Erler
2005-2006 Rasmus Neckelmann"
LICENSE="GNU GPL v2"
SRC_URI="http://download.tuxfamily.org/xmoto/xmoto/0.5.11/xmoto-0.5.11-src.tar.gz"
CHECKSUM_SHA256="a584a6f9292b184686b72c78f16de4b82d5c5b72ad89e41912ff50d03eca26b2"
REVISION="1"
ARCHITECTURES="x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
PATCHES="xmoto-0.5.11.patch"
PROVIDES="
xmoto$secondaryArchSuffix = $portVersion
cmd:xmoto$secondaryArchSuffix = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix >= $haikuVersion
lib:libgl$secondaryArchSuffix
lib:libsdl$secondaryArchSuffix
lib:libintl$secondaryArchSuffix
lib:libcurl$secondaryArchSuffix
lib:libode$secondaryArchSuffix
lib:liblua$secondaryArchSuffix
lib:libsdl_ttf$secondaryArchSuffix
lib:libsdl_net$secondaryArchSuffix
lib:libsdl_mixer$secondaryArchSuffix
lib:libglu$secondaryArchSuffix
lib:libbz2$secondaryArchSuffix
lib:libpng$secondaryArchSuffix
lib:libjpeg$secondaryArchSuffix
lib:libz$secondaryArchSuffix
lib:libsqlite3$secondaryArchSuffix
lib:libxml2$secondaryArchSuffix
lib:libstdc++$secondaryArchSuffix
lib:libgcc_s$secondaryArchSuffix
"
BUILD_REQUIRES="
devel:libsqlite3$secondaryArchSuffix
devel:libz$secondaryArchSuffix
devel:libjpeg$secondaryArchSuffix
devel:libpng$secondaryArchSuffix
devel:libxml2$secondaryArchSuffix
devel:libbz2$secondaryArchSuffix
devel:libglu$secondaryArchSuffix
devel:libsdl$secondaryArchSuffix
devel:sdl_mixer$secondaryArchSuffix
devel:sdl_net$secondaryArchSuffix
devel:sdl_ttf$secondaryArchSuffix
devel:liblua$secondaryArchSuffix
devel:liblua
devel:libode$secondaryArchSuffix
devel:libcurl$secondaryArchSuffix
devel:libgl$secondaryArchSuffix
"
BUILD_PREREQUIRES="
haiku${secondaryArchSuffix}_devel >= $haikuVersion
cmd:gcc$secondaryArchSuffix
cmd:make
cmd:sed
cmd:grep
cmd:ode_config
cmd:awk
cmd:find
cmd:gettext$secondaryArchSuffix
cmd:automake
cmd:pkg_config$secondaryArchSuffix
"
BUILD()
{
export CFLAGS="-lGL"
export CXXFLAGS="-lGL"
runConfigure ./configure --with-internal-xdg=1
make $jobArgs
}
INSTALL()
{
make install
}
DESCRIPTION="
X-Moto is a challenging 2D motocross platform game, where physics play \
an all important role in the gameplay. You need to control your bike to \
its limit, if you want to have a chance finishing the more difficult of \
the challenges.
"