diff options
Diffstat (limited to 'user/xmoto')
-rw-r--r-- | user/xmoto/APKBUILD | 58 | ||||
-rw-r--r-- | user/xmoto/stupid-lua.patch | 41 | ||||
-rw-r--r-- | user/xmoto/utf8.patch | 13 |
3 files changed, 112 insertions, 0 deletions
diff --git a/user/xmoto/APKBUILD b/user/xmoto/APKBUILD new file mode 100644 index 000000000..7efa7a9c6 --- /dev/null +++ b/user/xmoto/APKBUILD @@ -0,0 +1,58 @@ +# Contributor: A. Wilcox <awilfox@adelielinux.org> +# Maintainer: A. Wilcox <awilfox@adelielinux.org> +pkgname=xmoto +pkgver=0.5.11 +pkgrel=0 +pkgdesc="Challenging 2D motocross platform game" +url="https://xmoto.tuxfamily.org/" +arch="all" +license="GPL-2.0+" +depends="" +makedepends="bzip2-dev curl-dev glu-dev libjpeg-turbo-dev libpng-dev + libxdg-basedir-dev libxml2-dev lua5.3-dev mesa-dev ode-dev sdl-dev + sdl_mixer-dev sdl_net-dev sdl_ttf-dev sqlite-dev zlib-dev" +subpackages="$pkgname-doc $pkgname-lang" +source="http://download.tuxfamily.org/xmoto/xmoto/0.5.11/xmoto-$pkgver-src.tar.gz + stupid-lua.patch + utf8.patch + " + +prepare() { + cd "$builddir" + default_prepare + update_config_sub + rm -r src/ode +} + +build() { + cd "$builddir" + ./bootstrap + CPPFLAGS="$CPPFLAGS -D_GLIBCXX_USE_CXX11_ABI=0" \ + LDFLAGS="$LDFLAGS $(pkg-config --libs lua)" \ + ./configure \ + --build=$CBUILD \ + --host=$CHOST \ + --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --localstatedir=/var + make +} + +check() { + cd "$builddir" + make check +} + +package() { + cd "$builddir" + make DESTDIR="$pkgdir" install + install -D -m644 "$builddir"/extra/xmoto.desktop \ + "$pkgdir"/usr/share/applications/xmoto.desktop + install -D -m644 "$builddir"/extra/xmoto.xpm \ + "$pkgdir"/usr/share/icons/hicolor/48x48/apps/xmoto.xpm +} + +sha512sums="7046745e8f7a045fa2ce1deb3fd75b73b233dc1092f5ecd6dd4e42938f70269a93a3a623a39a1f0520c90643a42dc1ce93c43ad07bf225ff6c50741cc02511f6 xmoto-0.5.11-src.tar.gz +34dc4d83df72d0323d2995b35faacd6c097f1f381805a724c6a8a1edbf59c894e3db68057ef68b65f659d73e9d0976263bc5229b0502281d7c748519de86c55b stupid-lua.patch +a43cafba12864bc2efd978fcef69ac5256b625dd581f02a93bafae7c4edaad9ebcadbd597fe31db77c85747400405c9fb6b55e494b9d6ded893e5d48f37e57ec utf8.patch" diff --git a/user/xmoto/stupid-lua.patch b/user/xmoto/stupid-lua.patch new file mode 100644 index 000000000..d99a1ed4a --- /dev/null +++ b/user/xmoto/stupid-lua.patch @@ -0,0 +1,41 @@ +--- xmoto-0.5.11/configure.in.old 2014-03-29 10:35:24.000000000 +0000 ++++ xmoto-0.5.11/configure.in 2018-09-29 03:51:05.210000000 +0000 +@@ -174,6 +174,7 @@ + AC_CHECK_HEADER(lua50/lua.h, AC_DEFINE(HAVE_LUA50_LUA_H) [USE_LUA_VERSION="5.0"]) + AC_CHECK_HEADER(lua51/lua.h, AC_DEFINE(HAVE_LUA51_LUA_H) [USE_LUA_VERSION="5.1"]) + AC_CHECK_HEADER(lua5.1/lua.h, AC_DEFINE(HAVE_LUA5_1_LUA_H)[USE_LUA_VERSION="5.1"]) ++AC_CHECK_HEADER(lua5.3/lua.h, AC_DEFINE(HAVE_LUA5_3_LUA_H)[USE_LUA_VERSION="5.3"]) + AC_DEFINE(LUA_COMPAT_MODULE, 1) + + AC_LANG_PUSH([C++]) +--- xmoto-0.5.11/src/include/xm_lua.h.old 2011-10-11 20:18:17.000000000 +0000 ++++ xmoto-0.5.11/src/include/xm_lua.h 2018-09-29 03:51:49.230000000 +0000 +@@ -4,7 +4,11 @@ + #include "lauxlib.h" + #include "lualib.h" + #else +- #if defined(HAVE_LUA5_1_LUA_H) ++ #if defined(HAVE_LUA5_3_LUA_H) ++ #include <lua5.3/lua.h> ++ #include <lua5.3/lauxlib.h> ++ #include <lua5.3/lualib.h> ++ #elif defined(HAVE_LUA5_1_LUA_H) + #include <lua5.1/lua.h> + #include <lua5.1/lauxlib.h> + #include <lua5.1/lualib.h> +--- xmoto-0.5.11/src/LuaLibBase.cpp.old 2014-03-29 09:46:24.000000000 +0000 ++++ xmoto-0.5.11/src/LuaLibBase.cpp 2018-09-30 23:34:51.800000000 +0000 +@@ -42,7 +42,13 @@ + luaL_requiref(m_pL, LUA_TABLIBNAME, luaopen_table, 1); + #endif + ++#if LUA_VERSION_NUM < 503 + luaL_openlib(m_pL, i_libname.c_str(), i_reg, 0); ++#else ++ lua_newtable(m_pL); ++ luaL_setfuncs(m_pL, i_reg, 0); ++ lua_setglobal(m_pL, i_libname.c_str()); ++#endif + } + + LuaLibBase::~LuaLibBase() { diff --git a/user/xmoto/utf8.patch b/user/xmoto/utf8.patch new file mode 100644 index 000000000..535bb515e --- /dev/null +++ b/user/xmoto/utf8.patch @@ -0,0 +1,13 @@ +--- xmoto-0.5.11/src/helpers/utf8.h.old 2011-10-11 20:18:14.000000000 +0000 ++++ xmoto-0.5.11/src/helpers/utf8.h 2018-09-30 23:29:10.310000000 +0000 +@@ -18,8 +18,8 @@ + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + =============================================================================*/ + +-#ifndef __UTF8_H__ +-#define __UTF8_H__ ++#ifndef __HELPER_UTF8_H__ ++#define __HELPER_UTF8_H__ + + #include <vector> + #include <string> |