Hi Leonard,

yesterday the new luakit version 2.1 was published and here I'm sending you a patch file attached which made the package build fine on my machines with Slackware 14.2 and Slackware64 14.2.

I made luajit an optional dependency, since it's not needed to build the packages. With the option "LUAJIT=1" it can be enabled and with "CC=clang" the compiler can be changed to clang.

Cheers!
diff -rupN a/luakit.SlackBuild b/luakit.SlackBuild
--- a/luakit.SlackBuild	2018-06-27 21:20:57.563250854 +0200
+++ b/luakit.SlackBuild	2018-06-28 10:33:31.268179188 +0200
@@ -23,9 +23,11 @@
 #  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 PRGNAM=luakit
-VERSION=${VERSION:-2017.08.10}
+VERSION=${VERSION:-2.1}
 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 +42,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 +55,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 +65,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
diff -rupN a/luakit.info b/luakit.info
--- a/luakit.info	2018-06-27 21:20:57.563250854 +0200
+++ b/luakit.info	2018-06-28 10:35:45.054506629 +0200
@@ -1,10 +1,10 @@
 PRGNAM="luakit"
-VERSION="2017.08.10"
+VERSION="2.1"
 HOMEPAGE="https://github.com/luakit/luakit";
-DOWNLOAD="https://github.com/luakit/luakit/archive/2017.08.10/luakit-2017.08.10.tar.gz";
-MD5SUM="77065e5acf7a941954d6c61a28df98d1"
+DOWNLOAD="https://github.com/luakit/luakit/archive/debian/2.1/luakit-2.1.tar.gz";
+MD5SUM="f92ee07eec0178fa2632402f9aecdf7c"
 DOWNLOAD_x86_64=""
 MD5SUM_x86_64=""
-REQUIRES="luajit webkit2gtk lua-filesystem"
+REQUIRES="webkit2gtk lua-filesystem"
 MAINTAINER="Leonard Schmidt"
 EMAIL="[email protected]"
_______________________________________________
SlackBuilds-users mailing list
[email protected]
https://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users
Archives - https://lists.slackbuilds.org/pipermail/slackbuilds-users/
FAQ - https://slackbuilds.org/faq/

Reply via email to