diff --git a/games-sports/xmoto/patches/xmoto-0.5.11.patchset b/games-sports/xmoto/patches/xmoto-0.5.11.patchset new file mode 100644 index 000000000..8f496938f --- /dev/null +++ b/games-sports/xmoto/patches/xmoto-0.5.11.patchset @@ -0,0 +1,131 @@ +From c612bc7c0b5e4fe8ff2c8d5d3cfc8751c743f6c8 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Kamil=20Krzy=C5=BCanowski?= +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 + + // read the .h to understand why i redefine SDLNet_TCP_Send +-#if !defined(WIN32) && !defined(__APPLE__) ++#if !defined(WIN32) && !defined(__APPLE__) && !defined(__HAIKU__) + #include + + #define SOCKET int +-- +2.21.0 + + +From f45479caa1d47c8adcd8413383933794131a0405 Mon Sep 17 00:00:00 2001 +From: begasus +Date: Sat, 1 Jun 2019 13:41:31 +0200 +Subject: Fix build for error false vs (boolean)false + + +diff --git a/src/WWW.cpp b/src/WWW.cpp +index a61e753..40bcba0 100644 +--- a/src/WWW.cpp ++++ b/src/WWW.cpp +@@ -24,6 +24,10 @@ + #include "md5sum/md5file.h" + #include + ++#ifdef __HAIKU__ ++typedef int boolean; ++#endif ++ + #define DEFAULT_WWW_MSGFILE(A) "wwwMsg" A ".xml" + + bool WebRoom::downloadReplayExists(const std::string& i_url) { +@@ -206,7 +210,7 @@ void FSWeb::downloadFile(const std::string &p_local_file, + std::string v_www_agent = WWW_AGENT; + + /* open the file */ +- if( (v_destinationFile = fopen(v_local_file_tmp.c_str(), "wb")) == false) { ++ if( (v_destinationFile = fopen(v_local_file_tmp.c_str(), "wb")) == (boolean)false) { + throw Exception("error : unable to open output file " + + v_local_file_tmp); + } +@@ -320,7 +324,7 @@ void FSWeb::uploadReplay(const std::string& p_replayFilename, + LogInfo(std::string("Uploading replay " + p_replayFilename).c_str()); + + /* open the file */ +- if( (v_destinationFile = fopen(v_local_file.c_str(), "wb")) == false) { ++ if( (v_destinationFile = fopen(v_local_file.c_str(), "wb")) == (boolean)false) { + throw Exception("error : unable to open output file " DEFAULT_WWW_MSGFILE("UR")); + } + +@@ -478,7 +482,7 @@ void FSWeb::sendVote(const std::string& p_id_level, + LogInfo("Sending vote"); + + /* open the file */ +- if( (v_destinationFile = fopen(v_local_file.c_str(), "wb")) == false) { ++ if( (v_destinationFile = fopen(v_local_file.c_str(), "wb")) == (boolean)false) { + throw Exception("error : unable to open output file " DEFAULT_WWW_MSGFILE("SV")); + } + +@@ -562,7 +566,7 @@ void FSWeb::sendReport(const std::string& p_reportauthor, + LogInfo("Sending report"); + + /* open the file */ +- if( (v_destinationFile = fopen(v_local_file.c_str(), "wb")) == false) { ++ if( (v_destinationFile = fopen(v_local_file.c_str(), "wb")) == (boolean)false) { + throw Exception("error : unable to open output file " DEFAULT_WWW_MSGFILE("SR")); + } + +@@ -677,7 +681,7 @@ void FSWeb::uploadDbSync(const std::string& p_dbSyncFilename, + LogInfo(std::string("Uploading dbsync " + p_dbSyncFilename + " to " + p_url_to_transfert).c_str()); + + /* open the file */ +- if( (v_destinationFile = fopen(p_answerFile.c_str(), "wb")) == false) { ++ if( (v_destinationFile = fopen(p_answerFile.c_str(), "wb")) == (boolean)false) { + throw Exception("error : unable to open output file " + p_answerFile); + } + +-- +2.21.0 + diff --git a/games-sports/xmoto/patches/xmoto_x86-0.5.11.patchset b/games-sports/xmoto/patches/xmoto_x86-0.5.11.patchset deleted file mode 100644 index 50a28d027..000000000 --- a/games-sports/xmoto/patches/xmoto_x86-0.5.11.patchset +++ /dev/null @@ -1,61 +0,0 @@ -From 9b6a37dbbf04cf446c8978ea42f20142ea43d8a8 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Kamil=20Krzy=C5=BCanowski?= -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 - - // read the .h to understand why i redefine SDLNet_TCP_Send --#if !defined(WIN32) && !defined(__APPLE__) -+#if !defined(WIN32) && !defined(__APPLE__) && !defined(__HAIKU__) - #include - - #define SOCKET int --- -1.8.3.4 - diff --git a/games-sports/xmoto/xmoto-0.5.11.recipe b/games-sports/xmoto/xmoto-0.5.11.recipe index f806f6ddb..9a784aa16 100644 --- a/games-sports/xmoto/xmoto-0.5.11.recipe +++ b/games-sports/xmoto/xmoto-0.5.11.recipe @@ -12,10 +12,10 @@ LICENSE="GNU GPL v2" REVISION="2" SOURCE_URI="https://download.tuxfamily.org/xmoto/xmoto/0.5.11/xmoto-0.5.11-src.tar.gz" CHECKSUM_SHA256="a584a6f9292b184686b72c78f16de4b82d5c5b72ad89e41912ff50d03eca26b2" -PATCHES="xmoto_x86-0.5.11.patchset" +PATCHES="xmoto-$portVersion.patchset" -ARCHITECTURES="x86_gcc2" -SECONDARY_ARCHITECTURES="x86" +ARCHITECTURES="!x86_gcc2 ?x86 ?x86_64" +SECONDARY_ARCHITECTURES="?x86" PROVIDES=" xmoto$secondaryArchSuffix = $portVersion @@ -26,58 +26,61 @@ REQUIRES=" mesa_swrast lib:libbz2$secondaryArchSuffix lib:libcurl$secondaryArchSuffix - lib:libgl$secondaryArchSuffix - lib:libglu$secondaryArchSuffix + lib:libGL$secondaryArchSuffix + lib:libGLU$secondaryArchSuffix + lib:libiconv$secondaryArchSuffix lib:libintl$secondaryArchSuffix lib:libjpeg$secondaryArchSuffix lib:liblua$secondaryArchSuffix lib:libode$secondaryArchSuffix - lib:libpng$secondaryArchSuffix - lib:libsdl$secondaryArchSuffix - lib:libsdl_mixer$secondaryArchSuffix - lib:libsdl_net$secondaryArchSuffix - lib:libsdl_ttf$secondaryArchSuffix + lib:libpng16$secondaryArchSuffix + lib:libSDL_1.2$secondaryArchSuffix + lib:libSDL_mixer_1.2$secondaryArchSuffix + lib:libSDL_net_1.2$secondaryArchSuffix + lib:libSDL_ttf_2.0$secondaryArchSuffix lib:libsqlite3$secondaryArchSuffix lib:libxml2$secondaryArchSuffix lib:libz$secondaryArchSuffix " BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel devel:libbz2$secondaryArchSuffix devel:libcurl$secondaryArchSuffix - devel:libgl$secondaryArchSuffix - devel:libglu$secondaryArchSuffix + devel:libGL$secondaryArchSuffix + devel:libGLU$secondaryArchSuffix + devel:libiconv$secondaryArchSuffix + devel:libintl$secondaryArchSuffix devel:libjpeg$secondaryArchSuffix - devel:liblua devel:liblua$secondaryArchSuffix devel:libode$secondaryArchSuffix - devel:libpng$secondaryArchSuffix - devel:libsdl$secondaryArchSuffix - devel:libsdl_mixer$secondaryArchSuffix - devel:libsdl_net$secondaryArchSuffix - devel:libsdl_ttf$secondaryArchSuffix + devel:libpng16$secondaryArchSuffix + devel:libSDL$secondaryArchSuffix + devel:libSDL_mixer$secondaryArchSuffix + devel:libSDL_net$secondaryArchSuffix + devel:libSDL_ttf$secondaryArchSuffix devel:libsqlite3$secondaryArchSuffix devel:libxml2$secondaryArchSuffix devel:libz$secondaryArchSuffix " BUILD_PREREQUIRES=" - haiku${secondaryArchSuffix}_devel - cmd:autoconf + cmd:aclocal + cmd:autoreconf cmd:automake cmd:awk + cmd:bison cmd:find cmd:gcc$secondaryArchSuffix - cmd:gettext$secondaryArchSuffix + cmd:ld$secondaryArchSuffix cmd:grep cmd:make - cmd:ode_config$secondaryArchSuffix cmd:pkg_config$secondaryArchSuffix cmd:sed " BUILD() { - autoconf + autoreconf -vfi export CFLAGS="-lGL" export CXXFLAGS="-lGL" runConfigure ./configure --with-internal-xdg=1