xmoto: fix linking against lua52

This commit is contained in:
Jürgen Buchmüller 2015-10-02 11:46:52 +02:00
parent e52823ef15
commit 8dd4bdb7d0
3 changed files with 55 additions and 2 deletions

View file

@ -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

View file

@ -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 <lua5.2/lua.h>
+ #include <lua5.2/lauxlib.h>
+ #include <lua5.2/lualib.h>
+ #elif defined(HAVE_LUA52_LUA_H)
+ #include <lua52/lua.h>
+ #include <lua52/lauxlib.h>
+ #include <lua52/lualib.h>
+ #elif defined(HAVE_LUA5_1_LUA_H)
#include <lua5.1/lua.h>
#include <lua5.1/lauxlib.h>
#include <lua5.1/lualib.h>

View file

@ -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 <gottox@voidlinux.eu>"
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