mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 19:50:05 +02:00
Changed xmoto recipe - now uses autoconf and patchset.
This commit is contained in:
@@ -1,119 +0,0 @@
|
||||
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 21:25:12.893386752 +0000
|
||||
@@ -7565,13 +7565,12 @@
|
||||
|
||||
|
||||
# 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 library containing floor" >&5
|
||||
+$as_echo_n "checking for library containing floor... " >&6; }
|
||||
+if ${ac_cv_search_floor+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
- ac_check_lib_save_LIBS=$LIBS
|
||||
-LIBS="-lm $LIBS"
|
||||
+ ac_func_search_save_LIBS=$LIBS
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
@@ -7590,23 +7589,35 @@
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
-if ac_fn_c_try_link "$LINENO"; then :
|
||||
- ac_cv_lib_m_floor=yes
|
||||
-else
|
||||
- ac_cv_lib_m_floor=no
|
||||
+for ac_lib in '' ; do
|
||||
+ if test -z "$ac_lib"; then
|
||||
+ ac_res="none required"
|
||||
+ else
|
||||
+ ac_res=-l$ac_lib
|
||||
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
|
||||
+ fi
|
||||
+ if ac_fn_c_try_link "$LINENO"; then :
|
||||
+ ac_cv_search_floor=$ac_res
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
- conftest$ac_exeext conftest.$ac_ext
|
||||
-LIBS=$ac_check_lib_save_LIBS
|
||||
+ conftest$ac_exeext
|
||||
+ if ${ac_cv_search_floor+:} false; then :
|
||||
+ break
|
||||
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 :
|
||||
- cat >>confdefs.h <<_ACEOF
|
||||
-#define HAVE_LIBM 1
|
||||
-_ACEOF
|
||||
+done
|
||||
+if ${ac_cv_search_floor+:} false; then :
|
||||
|
||||
- LIBS="-lm $LIBS"
|
||||
+else
|
||||
+ ac_cv_search_floor=no
|
||||
+fi
|
||||
+rm conftest.$ac_ext
|
||||
+LIBS=$ac_func_search_save_LIBS
|
||||
+fi
|
||||
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_floor" >&5
|
||||
+$as_echo "$ac_cv_search_floor" >&6; }
|
||||
+ac_res=$ac_cv_search_floor
|
||||
+if test "$ac_res" != no; then :
|
||||
+ test "$ac_res" = "none required" || LIBS="$ac_res $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 21:40:34.446955520 +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_SEARCH_LIBS(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]);
|
||||
}
|
||||
61
games-sports/xmoto/patches/xmoto_x86-0.5.11.patchset
Normal file
61
games-sports/xmoto/patches/xmoto_x86-0.5.11.patchset
Normal file
@@ -0,0 +1,61 @@
|
||||
From 9b6a37dbbf04cf446c8978ea42f20142ea43d8a8 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Kamil=20Krzy=C5=BCanowski?= <kamnxt@kamnxt.com>
|
||||
Date: Fri, 12 Dec 2014 16:46:15 +0000
|
||||
Subject: Patched the files to make them work on haiku.
|
||||
|
||||
|
||||
diff --git a/configure.in b/configure.in
|
||||
index 452f196..0948bc8 100644
|
||||
--- a/configure.in
|
||||
+++ b/configure.in
|
||||
@@ -155,7 +155,7 @@ fi
|
||||
AM_CONDITIONAL([USE_SDLGFX], test "$USE_SDLGFX" = "1")
|
||||
|
||||
# m
|
||||
-AC_CHECK_LIB(m, floor, , AC_MSG_ERROR(No math library found))
|
||||
+AC_SEARCH_LIBS(floor, m, , 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 --git a/src/GameInit.cpp b/src/GameInit.cpp
|
||||
index 0ae9373..86f23d7 100644
|
||||
--- a/src/GameInit.cpp
|
||||
+++ b/src/GameInit.cpp
|
||||
@@ -269,7 +269,7 @@ void GameApp::run_load(int nNumArgs, char** ppcArgs) {
|
||||
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 --git a/src/VFileIO.cpp b/src/VFileIO.cpp
|
||||
index 7d6c7d9..cd95f58 100644
|
||||
--- a/src/VFileIO.cpp
|
||||
+++ b/src/VFileIO.cpp
|
||||
@@ -106,7 +106,7 @@ std::string getPWDDir(bool i_asUtf8 = false) {
|
||||
#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]);
|
||||
}
|
||||
diff --git a/src/net/extSDL_net.cpp b/src/net/extSDL_net.cpp
|
||||
index 1803710..0d130aa 100644
|
||||
--- a/src/net/extSDL_net.cpp
|
||||
+++ b/src/net/extSDL_net.cpp
|
||||
@@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#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
|
||||
--
|
||||
1.8.3.4
|
||||
|
||||
@@ -11,7 +11,7 @@ REVISION="1"
|
||||
ARCHITECTURES="x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
PATCHES="xmoto-0.5.11.patch"
|
||||
PATCHES="xmoto_x86-0.5.11.patchset"
|
||||
|
||||
PROVIDES="
|
||||
xmoto$secondaryArchSuffix = $portVersion
|
||||
@@ -62,16 +62,18 @@ BUILD_PREREQUIRES="
|
||||
cmd:make
|
||||
cmd:sed
|
||||
cmd:grep
|
||||
cmd:ode_config
|
||||
cmd:ode_config$secondaryArchSuffix
|
||||
cmd:awk
|
||||
cmd:find
|
||||
cmd:gettext$secondaryArchSuffix
|
||||
cmd:automake
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
cmd:autoconf
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
autoconf
|
||||
export CFLAGS="-lGL"
|
||||
export CXXFLAGS="-lGL"
|
||||
runConfigure ./configure --with-internal-xdg=1
|
||||
|
||||
Reference in New Issue
Block a user