diff --git a/srcpkgs/xmoto/patches/fix-configure_lua52.patch b/srcpkgs/xmoto/patches/fix-configure_lua52.patch new file mode 100644 index 0000000000..ed3ae0b6c9 --- /dev/null +++ b/srcpkgs/xmoto/patches/fix-configure_lua52.patch @@ -0,0 +1,32 @@ +--- configure 2015-10-02 11:37:59.277559809 +0200 ++++ configure 2015-10-02 11:41:32.042543210 +0200 +@@ -7637,7 +7637,7 @@ + return 0; + } + _ACEOF +-for ac_lib in '' lua lua5.1 lua50; do ++for ac_lib in '' lua lua5.2 lua5.1 lua50; do + if test -z "$ac_lib"; then + ac_res="none required" + else +@@ -7767,6 +7767,20 @@ + fi + + ++ac_fn_c_check_header_mongrel "$LINENO" "lua52/lua.h" "ac_cv_header_lua52_lua_h" "$ac_includes_default" ++if test "x$ac_cv_header_lua52_lua_h" = xyes; then : ++ $as_echo "#define HAVE_LUA52_LUA_H 1" >>confdefs.h ++ USE_LUA_VERSION="5.2" ++fi ++ ++ ++ac_fn_c_check_header_mongrel "$LINENO" "lua5.2/lua.h" "ac_cv_header_lua5_2_lua_h" "$ac_includes_default" ++if test "x$ac_cv_header_lua5_2_lua_h" = xyes; then : ++ $as_echo "#define HAVE_LUA5_2_LUA_H 1" >>confdefs.h ++USE_LUA_VERSION="5.2" ++fi ++ ++ + $as_echo "#define LUA_COMPAT_MODULE 1" >>confdefs.h + + diff --git a/srcpkgs/xmoto/patches/fix-xm_lua_lua52.patch b/srcpkgs/xmoto/patches/fix-xm_lua_lua52.patch new file mode 100644 index 0000000000..2332e092b2 --- /dev/null +++ b/srcpkgs/xmoto/patches/fix-xm_lua_lua52.patch @@ -0,0 +1,19 @@ +--- src/include/xm_lua.h 2011-10-11 22:18:17.000000000 +0200 ++++ src/include/xm_lua.h 2015-10-02 11:44:15.981530419 +0200 +@@ -4,7 +4,15 @@ + #include "lauxlib.h" + #include "lualib.h" + #else +- #if defined(HAVE_LUA5_1_LUA_H) ++ #if defined(HAVE_LUA5_2_LUA_H) ++ #include ++ #include ++ #include ++ #elif defined(HAVE_LUA52_LUA_H) ++ #include ++ #include ++ #include ++ #elif defined(HAVE_LUA5_1_LUA_H) + #include + #include + #include diff --git a/srcpkgs/xmoto/template b/srcpkgs/xmoto/template index 3e6806fb5a..234907fc51 100644 --- a/srcpkgs/xmoto/template +++ b/srcpkgs/xmoto/template @@ -1,14 +1,14 @@ # Template build file for 'xmoto' pkgname=xmoto version=0.5.11 -revision=4 +revision=5 build_style=gnu-configure short_desc="2D motocross platform game" maintainer="Enno Boland " license="GPL-2" makedepends="sqlite-devel zlib-devel libjpeg-turbo-devel libpng-devel libxml2-devel libxdg-basedir-devel glu-devel SDL-devel SDL_mixer-devel - SDL_net-devel SDL_ttf-devel lua51-devel libcurl-devel libode-devel + SDL_net-devel SDL_ttf-devel lua52-devel libcurl-devel libode-devel bzip2-devel" hostmakedepends="libxml2-devel SDL-devel desktop-file-utils" homepage="http://xmoto.tuxfamily.org/" @@ -16,6 +16,8 @@ distfiles="http://download.tuxfamily.org/xmoto/xmoto/$version/$pkgname-$version- checksum=a584a6f9292b184686b72c78f16de4b82d5c5b72ad89e41912ff50d03eca26b2 configure_args="--disable-sdltest CPPFLAGS=-DdDOUBLE" +CXXFLAGS="-I${XBPS_CROSS_BASE}/usr/include/lua5.2" + pre_configure() { # remove old ode version rm -r src/ode