aboutsummaryrefslogtreecommitdiff
path: root/network/luakit/luakit.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'network/luakit/luakit.SlackBuild')
-rw-r--r--network/luakit/luakit.SlackBuild30
1 files changed, 19 insertions, 11 deletions
diff --git a/network/luakit/luakit.SlackBuild b/network/luakit/luakit.SlackBuild
index 8d9eac6c93fc..a3808aa5e94b 100644
--- a/network/luakit/luakit.SlackBuild
+++ b/network/luakit/luakit.SlackBuild
@@ -3,6 +3,7 @@
# Slackware build script for luakit
# Copyright 2013, Andrew Tkalia <anddt@yandex.ru>, Ukraine, Kyiv
+# Update 2018-06-30 by Marek Srejma <sam_web@yahoo.de>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,9 +24,11 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=luakit
-VERSION=${VERSION:-2017.08.10}
+VERSION=${VERSION:-2.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+LUAJIT=${LUAJIT:-0} # 0 or 1
+CC=${CC:-cc} # cc, gcc or clang
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -40,10 +43,8 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i586" ]; then
- SLKCFLAGS="-O2 -march=i586 -mtune=i686"
-elif [ "$ARCH" = "i686" ]; then
- SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+if egrep -qo "^i[2-6]86$" <<<"$ARCH"; then
+ SLKCFLAGS="-O2 -march=$ARCH -mtune=i686"
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
else
@@ -55,9 +56,9 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $PRGNAM-$VERSION
+rm -rf $PRGNAM-debian-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
-cd $PRGNAM-$VERSION
+cd $PRGNAM-debian-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@@ -65,18 +66,25 @@ 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 {} \;
+_CFLAGS=`grep CFLAGS config.mk | sed -e "s/CFLAGS\s*+=//g" | tr "\n" " "`
make \
PREFIX=/usr \
MANPREFIX=/usr/man \
- DOCDIR=/usr/doc/luakit-$VERSION \
- DEVELOPMENT_PATHS=0
+ DOCDIR=/usr/doc/$PRGNAM-$VERSION \
+ DEVELOPMENT_PATHS=0 \
+ CFLAGS="$_CFLAGS $SLKCFLAGS" \
+ LUA_BIN_NAME=lua \
+ LUA_PKG_NAME=lua \
+ USE_LUAJIT=$LUAJIT \
+ CC=$CC
make install \
DESTDIR=$PKG \
PREFIX=/usr \
MANPREFIX=$PKG/usr/man \
- DOCDIR=$PKG/usr/doc/$PRGNAM-$VERSION
-
+ DOCDIR=$PKG/usr/doc/$PRGNAM-$VERSION \
+ LUA_BIN_NAME=lua \
+ LUA_PKG_NAME=lua
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