From c8b5c9cdec0935fc86cadbc14e2af625ce6a8b7a Mon Sep 17 00:00:00 2001 From: Matteo Bernardini Date: Thu, 17 Jan 2019 19:48:10 +0100 Subject: libraries/tolua++: Switch to the sources on github, use cmake. Signed-off-by: Matteo Bernardini --- libraries/tolua++/tolua++.SlackBuild | 37 ++++++++++++++++++++---------------- libraries/tolua++/tolua++.info | 4 ++-- 2 files changed, 23 insertions(+), 18 deletions(-) diff --git a/libraries/tolua++/tolua++.SlackBuild b/libraries/tolua++/tolua++.SlackBuild index 5a77a5fbeb..7db0ed754a 100644 --- a/libraries/tolua++/tolua++.SlackBuild +++ b/libraries/tolua++/tolua++.SlackBuild @@ -3,7 +3,7 @@ # Slackware build script for tolua++ # Written by Larry Hajali -# Copyright 2011-2016 Matteo Bernardini , Pisa, Italy +# Copyright 2011-2019 Matteo Bernardini , Pisa, Italy # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -24,6 +24,7 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=tolua++ +SRCNAM=toluapp VERSION=${VERSION:-1.0.93} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -60,9 +61,9 @@ set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2 -cd $PRGNAM-$VERSION +rm -rf $SRCNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.?z* +cd $SRCNAM-$VERSION chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ @@ -70,20 +71,24 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -# Fix lib64 install directory and fix version info. -sed -i "s|'/lib'|'/lib${LIBDIRSUFFIX}'|g" SConstruct -sed -i "s|\"${PRGNAM}-1.0.92\"|\"${PRGNAM}-${VERSION}\"|" include/tolua++.h +# Fix library directory, library and executable name, version info. +sed -i "s|INSTALL_LIB\ lib|INSTALL_LIB lib${LIBDIRSUFFIX}|" cmake/dist.cmake || exit 1 +sed -i "s|\ toluapp\ | tolua++ |" CMakeLists.txt || exit 1 +sed -i "s|\"${PRGNAM}-1.0.92\"|\"${PRGNAM}-${VERSION}\"|" include/tolua++.h || exit 1 -# Custom build parameters. -cat >> custom.py << EOF -LIBS = ['lua', 'dl', 'm'] -LIBPATH = ['/lib${LIBDIRSUFFIX}', '/usr/lib${LIBDIRSUFFIX}'] -EOF +mkdir -p build +cd build + cmake \ + -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DMAN_INSTALL_DIR=/usr/man \ + -DCMAKE_BUILD_TYPE=Release .. + make + make install DESTDIR=$PKG +cd .. -scons install \ - CCFLAGS="-I/usr/include $SLKCFLAGS -ansi -Wall" \ - prefix="$PKG/usr" \ - shared="TRUE" +rm -fR $PKG/usr/share find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true diff --git a/libraries/tolua++/tolua++.info b/libraries/tolua++/tolua++.info index 7e92701fd3..ebf8d5f6cc 100644 --- a/libraries/tolua++/tolua++.info +++ b/libraries/tolua++/tolua++.info @@ -1,8 +1,8 @@ PRGNAM="tolua++" VERSION="1.0.93" HOMEPAGE="https://github.com/LuaDist/toluapp" -DOWNLOAD="http://ponce.cc/slackware/sources/repo/tolua++-1.0.93.tar.bz2" -MD5SUM="100aa6907b8108582080b37d79c0afd7" +DOWNLOAD="https://github.com/LuaDist/toluapp/archive/1.0.93/tolua++-1.0.93.tar.gz" +MD5SUM="689d952034e55d4333fa240f7516e68a" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="lua" -- cgit v1.2.3