From 04333e71d6b43dde21b09100017e291159ec76c7 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Fri, 30 Sep 2016 19:46:29 +0000 Subject: [PATCH 1/3] 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 From 95872aabb8dd7e3f21eb92b3d3d8335c05c6ba29 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Fri, 30 Sep 2016 20:00:48 +0000 Subject: [PATCH 2/3] try to install libtolua-dev on travis builders --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 003fb67ad..df0e62c84 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,6 +12,7 @@ addons: - libsqlite3-dev - libxml2-dev - valgrind + - libtolua-dev os: - linux notifications: From 4fc4e8a5884bd94c4f029c606c44072bb7599e37 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Fri, 30 Sep 2016 22:21:26 +0200 Subject: [PATCH 3/3] change how lua version is determined to work with my mac --- s/cmake-init | 6 +++--- s/travis-build | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/s/cmake-init b/s/cmake-init index 481bfee80..2cd5b4834 100755 --- a/s/cmake-init +++ b/s/cmake-init @@ -46,9 +46,9 @@ if [ "$HAVE_TOLUA" = "0" ] || [ -z $path ] ; then echo "tolua is not installed, building from source" cd $ROOT if [ ! -d tolua ]; then - LUA_VERSION="5.2" - if [ ! -d /usr/include/lua5.2 ] ; then - LUA_VERSION="5.1" + LUA_VERSION="5.1" + if [ -d /usr/include/lua5.2 ] || [ -d /usr/local/include/lua5.2 ]; then + LUA_VERSION="5.2" fi echo "fetching tolua ${LUA_VERSION} from github..." git clone https://github.com/ennorehling/tolua-${LUA_VERSION}.git tolua diff --git a/s/travis-build b/s/travis-build index 45db05c60..011e9e7de 100755 --- a/s/travis-build +++ b/s/travis-build @@ -18,7 +18,6 @@ cd tests set -e [ -z $BUILD ] && BUILD=Debug ; export BUILD -cmake --version s/cmake-init s/build cd $ROOT