aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--network/luakit/README14
-rw-r--r--network/luakit/luakit.SlackBuild67
-rw-r--r--network/luakit/luakit.info2
-rw-r--r--network/luakit/slack-desc12
4 files changed, 60 insertions, 35 deletions
diff --git a/network/luakit/README b/network/luakit/README
index 86798e4dea..d506acbc28 100644
--- a/network/luakit/README
+++ b/network/luakit/README
@@ -1,3 +1,5 @@
+luakit (micro-browser framework)
+
luakit is a fast, light and simple to use micro-browser framework
exensible by Lua using the WebKit web content engine and the GTK+
toolkit.
@@ -8,10 +10,14 @@ Just copy the files you wish to change (and the rc.lua) into
$XDG_CONFIG_HOME/luakit (defaults to ~/.config/luakit) and
luakit will use those files when you next launch it.
-The luajit package is an optional dependency.
+Note: lua-filesystem is required, and it must be built with
+lua51 support (meaning, build/install lua51 before building
+lua51). If you install the dependencies in the order listed
+in the .info file, you'll be fine.
-To enable building luakit with luajit support, use
- LUAJIT=1
+Optional dependency: luajit. To enable building luakit with luajit
+support, export LUAJIT=yes in the script's environment. If you do
+this, lua51 is *not* required, regardless of what the .info file says.
-To enable clang instead of gcc as the compiler, use
+To enable clang instead of gcc as the compiler, use:
CC=clang
diff --git a/network/luakit/luakit.SlackBuild b/network/luakit/luakit.SlackBuild
index b24bc4c5ab..48e3f05b2d 100644
--- a/network/luakit/luakit.SlackBuild
+++ b/network/luakit/luakit.SlackBuild
@@ -23,15 +23,22 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20241024 bkw: Modified by SlackBuilds.org, BUILD=2:
+# - build with lua51.
+# - make the LUAJIT option actually work (and change to yes/no, not 0/1).
+# - remove special case code for CC in environment, not needed (CC=clang
+# works fine just because of how make works).
+# - make the slack-desc say which lua (lua51 or luajit) was used to
+# build the package. also removed some of the long README content
+# from the slack-desc (same info is in README and the doc dir already).
+
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=luakit
VERSION=${VERSION:-2.3.6}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
-LUAJIT=${LUAJIT:-0} # 0 or 1
-CC=${CC:-cc} # cc, gcc or clang
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -70,44 +77,56 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-find -L . \
- \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
- -o -perm 511 \) -exec chmod 755 {} \; -o \
- \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} +
sed -e 's#(PREFIX)/lib/luakit#(LIBDIR)#g' -i Makefile
sed -e "/^Exec=/ s/lua/env Malloc=1 lua/" -i extras/luakit.desktop
patch -p1 < $CWD/gtk.patch
-_CFLAGS=$( grep CFLAGS config.mk | sed -e "s/CFLAGS\s*+=//g" | tr "\n" " " )
+# 20241024 bkw: in the previous version of this script, LUAJIT=1 just
+# didn't work, because LUA_BIN_NAME and LUA_PKG_NAME were explicitly
+# set to "lua", below. This fixes it. Also, make it use "yes" rather
+# than "1", for consistency with other scripts.
+if [ "${LUAJIT:-no}" = "yes" ]; then
+ LUA=luajit
+else
+ LUA=lua51
+fi
+
+# 20241024 bkw: disable -Werror and force our flags, all at once.
+sed -i.bak "/^CFLAGS/s,-Werror.*,$SLKCFLAGS," config.mk
+
+# 20241024 bkw: install the .so library executable.
+sed -i.bak '/install.*luakit\.so/s,-m644,-m755,' Makefile
+
make install \
- CFLAGS="$_CFLAGS $SLKCFLAGS" \
PREFIX=/usr \
LIBDIR=/usr/lib$LIBDIRSUFFIX/$PRGNAM \
MANPREFIX=/usr/man \
DOCDIR=/usr/doc/$PRGNAM-$VERSION \
DEVELOPMENT_PATHS=0 \
- LUA_BIN_NAME=lua \
- LUA_PKG_NAME=lua \
- USE_LUAJIT=$LUAJIT \
- CC=$CC \
+ LUA_BIN_NAME=$LUA \
+ LUA_PKG_NAME=$LUA \
VERSION=$VERSION \
DESTDIR=$PKG
-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
+strip $PKG/usr/bin/$PRGNAM $PKG/usr/lib*/$PRGNAM/*.so
+gzip -9 $PKG/usr/man/man*/*
-find $PKG/usr/man -type f -exec gzip -9 {} \;
-for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
-
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a AUTHORS CHANGELOG.md CONTRIBUTING.md COPYING.GPLv3 README.md MIGRATE.md \
- $PKG/usr/doc/$PRGNAM-$VERSION
-cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
+mkdir -p $PKGDOC
+cp -a AUTHORS* *.md COPYING* $PKGDOC
+cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild
mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
+
+# 20241024 bkw: slack-desc tells which lua was used. I needed this
+# for my testing, please don't remove it.
+sed -e "s,@LUA@,$LUA," \
+ -e "s,@LUAVER@,$( pkg-config --modversion $LUA )," \
+ < $CWD/slack-desc \
+ > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
diff --git a/network/luakit/luakit.info b/network/luakit/luakit.info
index 8624e731de..1f2e9fc4b5 100644
--- a/network/luakit/luakit.info
+++ b/network/luakit/luakit.info
@@ -5,6 +5,6 @@ DOWNLOAD="https://github.com/luakit/luakit/releases/download/2.3.6/luakit-2.3.6.
MD5SUM="f9e623c23ce560fdfd14d9ccb9ef71e6"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES="webkit2gtk4.1 lua-filesystem"
+REQUIRES="webkit2gtk4.1 lua51 lua-filesystem"
MAINTAINER="Marek Šrejma"
EMAIL="marek@modweb.de"
diff --git a/network/luakit/slack-desc b/network/luakit/slack-desc
index a69c6d53ef..9e2a4c34d4 100644
--- a/network/luakit/slack-desc
+++ b/network/luakit/slack-desc
@@ -10,10 +10,10 @@ luakit: luakit (micro-browser framework)
luakit:
luakit: luakit is a fast, light and simple to use micro-browser framework
luakit: exensible by Lua using the WebKit web content engine and the GTK+
-luakit: toolkit.
-luakit: The configuration options are endless, the entire browser is
-luakit: constructed by the config files present in /etc/xdg/luakit
-luakit: Just copy the files you wish to change (and the rc.lua) into
-luakit: $XDG_CONFIG_HOME/luakit (defaults to ~/.config/luakit) and
-luakit: luakit will use those files when you next launch it.
+luakit: toolkit. The configuration options are endless; the entire browser is
+luakit: constructed by the config files present in /etc/xdg/luakit.
+luakit:
+luakit: This package was built for @LUA@ @LUAVER@.
+luakit:
+luakit:
luakit: