xmoto ver. bump
This commit is contained in:
@@ -4,28 +4,24 @@
|
||||
# Licensed under the GNU General Public License, version 3.
|
||||
# See the file http://www.gnu.org/licenses/gpl.txt
|
||||
|
||||
from pisi.actionsapi import autotools
|
||||
from pisi.actionsapi import pisitools
|
||||
from pisi.actionsapi import shelltools
|
||||
from pisi.actionsapi import cmaketools
|
||||
from pisi.actionsapi import pisitools
|
||||
from pisi.actionsapi import get
|
||||
|
||||
def setup():
|
||||
shelltools.system("./bootstrap")
|
||||
#shelltools.system("rm -r src/ode")
|
||||
shelltools.export("CPPFLAGS", "-D_GLIBCXX_USE_CXX11_ABI=0")
|
||||
autotools.autoreconf("-vfi")
|
||||
autotools.configure("--prefix=/usr \
|
||||
--enable-threads=posix \
|
||||
--disable-sdltest \
|
||||
--with-OpenGL \
|
||||
--with-renderer-sdlGfx=0 \
|
||||
--with-renderer-openGl=1 \
|
||||
--with-internal-xdg=1")
|
||||
shelltools.makedirs("build")
|
||||
shelltools.cd("build")
|
||||
|
||||
cmaketools.configure("-DOpenGL_GL_PREFERENCE=GLVND", sourceDir="..")
|
||||
|
||||
def build():
|
||||
autotools.make()
|
||||
cmaketools.make("-C build")
|
||||
#cmaketools.make("-C build doc")
|
||||
|
||||
def install():
|
||||
autotools.rawInstall('DESTDIR="%s"' % get.installDIR())
|
||||
pisitools.insinto("/usr/share/applications", "extra/xmoto.desktop")
|
||||
pisitools.insinto("/usr/share/pixmaps", "extra/xmoto.xpm")
|
||||
shelltools.cd("build")
|
||||
cmaketools.rawInstall("DESTDIR=%s" % get.installDIR())
|
||||
|
||||
shelltools.cd("..")
|
||||
pisitools.dodoc("COPYING*", "README*")
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -40,8 +40,8 @@
|
||||
endif()
|
||||
find_package(PNG REQUIRED)
|
||||
|
||||
-find_package(Lua)
|
||||
-set(USE_SYSTEM_Lua $<AND:$<BOOL:${PREFER_SYSTEM_Lua}>,$<BOOL:${LUA51_FOUND}>,$<NOT:$<BOOL:${WIN32}>>>)
|
||||
+find_package(Lua ${LUA_VERSION} EXACT REQUIRED)
|
||||
+set(USE_SYSTEM_Lua $<AND:$<BOOL:${PREFER_SYSTEM_Lua}>,$<BOOL:${LUA_FOUND}>,$<NOT:$<BOOL:${WIN32}>>>)
|
||||
if (NOT LUA_VERSION_STRING VERSION_LESS 5.2 AND LUA_VERSION_STRING VERSION_LESS 5.3)
|
||||
add_definitions("-DLUA_COMPAT_ALL")
|
||||
elseif (LUA_VERSION_STRING VERSION_GREATER_EQUAL "5.3")
|
||||
@@ -0,0 +1,79 @@
|
||||
From fb004501a6387bb7ba5182b60ec305e9947dc545 Mon Sep 17 00:00:00 2001
|
||||
From: _yui <imbatman0xff@gmail.com>
|
||||
Date: Tue, 7 Jul 2020 21:44:49 +0300
|
||||
Subject: [PATCH 1/2] Fix building with Lua with deprecated functions removed
|
||||
|
||||
---
|
||||
src/CMakeLists.txt | 5 +++++
|
||||
src/xmoto/LuaLibBase.cpp | 6 ++++++
|
||||
2 files changed, 11 insertions(+)
|
||||
|
||||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||||
index a3f328f9..3618360e 100644
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -461,6 +461,11 @@ check_prototype_definition(mkdir
|
||||
)
|
||||
target_compile_definitions(xmoto PUBLIC MS_MKDIR=$<BOOL:${MS_MKDIR}>)
|
||||
|
||||
+if(USE_SYSTEM_Lua)
|
||||
+ check_symbol_exists(luaL_openlib lauxlib.h HAVE_LUAL_OPENLIB)
|
||||
+ target_compile_definitions(xmoto PUBLIC HAVE_LUAL_OPENLIB=$<BOOL:${HAVE_LUAL_OPENLIB}>)
|
||||
+endif()
|
||||
+
|
||||
target_compile_definitions(xmoto PUBLIC USE_OPENGL=$<BOOL:${USE_OPENGL}>)
|
||||
target_compile_definitions(xmoto PUBLIC USE_SDLGFX=$<BOOL:${USE_SDLGFX}>)
|
||||
target_compile_definitions(xmoto PUBLIC USE_GETTEXT=$<BOOL:${USE_GETTEXT}>)
|
||||
diff --git a/src/xmoto/LuaLibBase.cpp b/src/xmoto/LuaLibBase.cpp
|
||||
index fed3c79e..62b690e1 100644
|
||||
--- a/src/xmoto/LuaLibBase.cpp
|
||||
+++ b/src/xmoto/LuaLibBase.cpp
|
||||
@@ -42,7 +42,13 @@ LuaLibBase::LuaLibBase(const std::string &i_libname, luaL_Reg i_reg[]) {
|
||||
luaL_requiref(m_pL, LUA_TABLIBNAME, luaopen_table, 1);
|
||||
#endif
|
||||
|
||||
+#if HAVE_LUAL_OPENLIB
|
||||
luaL_openlib(m_pL, i_libname.c_str(), i_reg, 0);
|
||||
+#else
|
||||
+ lua_newtable(m_pL);
|
||||
+ luaL_register(m_pL, i_libname.c_str(), i_reg);
|
||||
+ lua_setglobal(m_pL, i_libname.c_str());
|
||||
+#endif
|
||||
}
|
||||
|
||||
LuaLibBase::~LuaLibBase() {
|
||||
|
||||
From 0a92ee4e8d6ffb88f137b74ba3e9a9b688ac50e6 Mon Sep 17 00:00:00 2001
|
||||
From: _yui <imbatman0xff@gmail.com>
|
||||
Date: Tue, 7 Jul 2020 23:01:38 +0300
|
||||
Subject: [PATCH 2/2] Change luaL_register to luaL_setfuncs for lua 5.2 and
|
||||
newer
|
||||
|
||||
---
|
||||
src/xmoto/LuaLibBase.cpp | 10 ++++++++--
|
||||
1 file changed, 8 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/xmoto/LuaLibBase.cpp b/src/xmoto/LuaLibBase.cpp
|
||||
index 62b690e1..911c5698 100644
|
||||
--- a/src/xmoto/LuaLibBase.cpp
|
||||
+++ b/src/xmoto/LuaLibBase.cpp
|
||||
@@ -44,11 +44,17 @@ LuaLibBase::LuaLibBase(const std::string &i_libname, luaL_Reg i_reg[]) {
|
||||
|
||||
#if HAVE_LUAL_OPENLIB
|
||||
luaL_openlib(m_pL, i_libname.c_str(), i_reg, 0);
|
||||
-#else
|
||||
+#else // HAVE_LUAL_OPENLIB
|
||||
lua_newtable(m_pL);
|
||||
+
|
||||
+#if LUA_VERSION_NUM >= 502
|
||||
+ luaL_setfuncs(m_pL, i_reg, 0);
|
||||
+#else // LUA_VERSION_NUM >= 502
|
||||
luaL_register(m_pL, i_libname.c_str(), i_reg);
|
||||
+#endif // LUA_VERSION_NUM >= 502
|
||||
+
|
||||
lua_setglobal(m_pL, i_libname.c_str());
|
||||
-#endif
|
||||
+#endif // HAVE_LUAL_OPENLIB
|
||||
}
|
||||
|
||||
LuaLibBase::~LuaLibBase() {
|
||||
@@ -13,8 +13,9 @@
|
||||
<IsA>app:gui</IsA>
|
||||
<Summary>Motorcross game</Summary>
|
||||
<Description>A motocross game with fancy effects like ghost replay. Requires a 3D accelerated video card.</Description>
|
||||
<Archive sha1sum="a654a7f409918d3c81f4b834837cfc59e79f90d0" type="targz">http://download.tuxfamily.org/xmoto/xmoto/dev/xmoto-0.5.12-src-svn3427.tar.gz</Archive>
|
||||
<Archive sha1sum="3973c5f7eee88653ef3aeabc9d805b8db9e27149" type="targz">https://github.com/xmoto/xmoto/archive/refs/tags/0.6.1.tar.gz</Archive>
|
||||
<BuildDependencies>
|
||||
<Dependency>cmake</Dependency>
|
||||
<Dependency>libxml2-devel</Dependency>
|
||||
<Dependency>curl-devel</Dependency>
|
||||
<Dependency>libsdl-devel</Dependency>
|
||||
@@ -29,13 +30,14 @@
|
||||
<Dependency>ode-devel</Dependency>
|
||||
<Dependency>sqlite-devel</Dependency>
|
||||
<Dependency>mesa-devel</Dependency>
|
||||
<Dependency>libglvnd-devel</Dependency>
|
||||
<Dependency>mesa-glu-devel</Dependency>
|
||||
<Dependency>libxdg-basedir-devel</Dependency>
|
||||
<Dependency>libjpeg-turbo-devel</Dependency>
|
||||
</BuildDependencies>
|
||||
<Patches>
|
||||
<Patch level="1">www-cpp.patch</Patch>
|
||||
<Patch level="1">lua52_compat.patch</Patch>
|
||||
<Patch level="0">genericname_pl-tr.patch</Patch>
|
||||
<Patch level="1">xmoto-0.6.1_cmake_lua_version.patch</Patch>
|
||||
<Patch level="1">xmoto-0.6.1_lua_deprecated.patch</Patch>
|
||||
</Patches>
|
||||
</Source>
|
||||
|
||||
@@ -59,6 +61,7 @@
|
||||
<Dependency>mesa</Dependency>
|
||||
<Dependency>mesa-glu</Dependency>
|
||||
<Dependency>libjpeg-turbo</Dependency>
|
||||
<Dependency>libxdg-basedir</Dependency>
|
||||
</RuntimeDependencies>
|
||||
<Files>
|
||||
<Path fileType="executable">/usr/bin</Path>
|
||||
@@ -67,10 +70,18 @@
|
||||
<Path fileType="man">/usr/share/man</Path>
|
||||
<Path fileType="data">/usr/share/pixmaps</Path>
|
||||
<Path fileType="data">/usr/share/xmoto</Path>
|
||||
<Path fileType="doc">/usr/share/doc</Path>
|
||||
</Files>
|
||||
</Package>
|
||||
|
||||
<History>
|
||||
<Update release="4">
|
||||
<Date>2022-11-04</Date>
|
||||
<Version>0.6.1</Version>
|
||||
<Comment>Version bump.</Comment>
|
||||
<Name>Mustafa Cinasal</Name>
|
||||
<Email>muscnsl@gmail.com</Email>
|
||||
</Update>
|
||||
<Update release="3">
|
||||
<Date>2018-09-14</Date>
|
||||
<Version>0.5.12</Version>
|
||||
|
||||
Reference in New Issue
Block a user