libraries/lua-readline: Updated for version 2.8.

Signed-off-by: Dave Woodfall <dave@slackbuilds.org>
This commit is contained in:
abooksigun 2021-01-15 21:56:58 +00:00 committed by Dave Woodfall
parent d95c5d3248
commit 2c5ec6b27f
2 changed files with 18 additions and 27 deletions

View file

@ -1,7 +1,7 @@
#!/bin/sh
# Slackware build script for lua-readline
# Copyright 2020 abooksigun <abooksigun09@gmail.com>
# Copyright 2021 abooksigun <abooksigun09@gmail.com>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@ -23,7 +23,7 @@
PRGNAM=lua-readline
SRCNAM=readline
VERSION=${VERSION:-2.6}
VERSION=${VERSION:-2.8}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@ -69,29 +69,20 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
gcc $SLKCFLAGS -I /usr/include -c C-readline.c -o C-readline.o
gcc $SLKCFLAGS -shared -o C-readline.so C-readline.o
LUAVERS="5.1 5.2 5.3 5.4"
install -D -m 0755 C-readline.so $PKG/usr/lib$LIBDIRSUFFIX/lua/5.1/C-readline.so
install -D -m 0644 readline.lua $PKG/usr/share/lua/5.1/readline.lua
# lua 5.2 support.
if $(lua5.2 -v &> /dev/null); then
gcc $SLKCFLAGS -I /usr/include/lua5.2 -c C-readline.c -o C-readline.o
gcc $SLKCFLAGS -shared -o C-readline.so.5.2 C-readline.o
install -D -m 0755 C-readline.so.5.2 $PKG/usr/lib$LIBDIRSUFFIX/lua/5.2/C-readline.so
install -D -m 0644 readline.lua $PKG/usr/share/lua/5.2/readline.lua
fi
# lua 5.3 support
if $(lua5.3 -v &> /dev/null); then
gcc $SLKCFLAGS -I /usr/include/lua5.3 -c C-readline.c -o C-readline.o
gcc $SLKCFLAGS -shared -o C-readline.so.5.3 C-readline.o
install -D -m 0755 C-readline.so.5.3 $PKG/usr/lib$LIBDIRSUFFIX/lua/5.3/C-readline.so
install -D -m 0644 readline.lua $PKG/usr/share/lua/5.3/readline.lua
fi
for luaver in $LUAVERS
do
if [ $luaver != 5.1 ]; then version=$luaver dir=lua$version; fi
if $(lua$version -v &> /dev/null)
then
gcc $SLKCFLAGS -I /usr/include/$dir -c C-readline.c -o C-readline.o
gcc $SLKCFLAGS -shared -o C-readline.so.$luaver C-readline.o
install -D -m 0755 C-readline.so.$luaver $PKG/usr/lib$LIBDIRSUFFIX/lua/$luaver/C-readline.so
install -D -m 0644 readline.lua $PKG/usr/share/lua/$luaver/readline.lua
fi
done
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

View file

@ -1,8 +1,8 @@
PRGNAM="lua-readline"
VERSION="2.6"
VERSION="2.8"
HOMEPAGE="http://www.pjb.com.au/comp/lua/readline.html"
DOWNLOAD="http://www.pjb.com.au/comp/lua/readline-2.6.tar.gz"
MD5SUM="46222ce5904c3f2f4f1f9073fc5697ce"
DOWNLOAD="http://www.pjb.com.au/comp/lua/readline-2.8.tar.gz"
MD5SUM="fecb33ef12e0e67062146703ef3b78b7"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="lua-posix"