From 04333e71d6b43dde21b09100017e291159ec76c7 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Fri, 30 Sep 2016 19:46:29 +0000 Subject: [PATCH] working on a new tolua build step that supports 5.1 --- .gitmodules | 3 --- s/build | 5 ----- s/cmake-init | 13 ++++++++++++- src/kernel/config.c | 2 ++ tolua | 1 - 5 files changed, 14 insertions(+), 10 deletions(-) delete mode 160000 tolua diff --git a/.gitmodules b/.gitmodules index 81c45896e..2242a8068 100644 --- a/.gitmodules +++ b/.gitmodules @@ -26,6 +26,3 @@ path = storage url = https://github.com/ennorehling/storage.git branch = master -[submodule "tolua"] - path = tolua - url = https://github.com/ennorehling/tolua.git diff --git a/s/build b/s/build index 178fa4f43..b59804626 100755 --- a/s/build +++ b/s/build @@ -35,11 +35,6 @@ fi git submodule update -if [ -z `which tolua` ]; then -echo "build tolua" -cd $ROOT/tolua ; make -fi - echo "build eressea" cd $ROOT/$BUILD VERSION=$(git describe --match 'v*.*.*' --tags | sed 's/^v//') diff --git a/s/cmake-init b/s/cmake-init index 35378d6a5..481bfee80 100755 --- a/s/cmake-init +++ b/s/cmake-init @@ -44,7 +44,18 @@ ARGS=" -DCMAKE_MODULE_PATH=$ROOT/cmake/Modules \ path="$(which tolua)" if [ "$HAVE_TOLUA" = "0" ] || [ -z $path ] ; then echo "tolua is not installed, building from source" - cd $ROOT/tolua ; make + cd $ROOT + if [ ! -d tolua ]; then + LUA_VERSION="5.2" + if [ ! -d /usr/include/lua5.2 ] ; then + LUA_VERSION="5.1" + fi + echo "fetching tolua ${LUA_VERSION} from github..." + git clone https://github.com/ennorehling/tolua-${LUA_VERSION}.git tolua + fi + echo "building tolua..." + cd tolua + make ARGS="$ARGS -DPC_TOLUA_DIR=$ROOT/tolua" else echo "tolua is $path" diff --git a/src/kernel/config.c b/src/kernel/config.c index 5921535c7..f7eb0e303 100644 --- a/src/kernel/config.c +++ b/src/kernel/config.c @@ -740,7 +740,9 @@ void kernel_done(void) /* calling this function releases memory assigned to static variables, etc. * calling it is optional, e.g. a release server will most likely not do it. */ +#ifdef USE_LIBXML2 xml_done(); +#endif attrib_done(); item_done(); message_done(); diff --git a/tolua b/tolua deleted file mode 160000 index 32cc6a3e7..000000000 --- a/tolua +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 32cc6a3e78238278bc5b1fb8566526558e5afdda