diff options
Diffstat (limited to 'libraries/tolua++/tolua++.SlackBuild')
-rw-r--r-- | libraries/tolua++/tolua++.SlackBuild | 37 |
1 files changed, 21 insertions, 16 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 <larryhaja[at]gmail[dot]com> -# Copyright 2011-2016 Matteo Bernardini <ponce@slackbuilds.org>, Pisa, Italy +# Copyright 2011-2019 Matteo Bernardini <ponce@slackbuilds.org>, 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 |