summaryrefslogtreecommitdiffstats
path: root/libraries/lua-lpeg
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/lua-lpeg')
-rw-r--r--libraries/lua-lpeg/README22
-rw-r--r--libraries/lua-lpeg/lua-lpeg.SlackBuild20
-rw-r--r--libraries/lua-lpeg/lua-lpeg.info10
3 files changed, 29 insertions, 23 deletions
diff --git a/libraries/lua-lpeg/README b/libraries/lua-lpeg/README
index 1ef11d574e..2953c759c3 100644
--- a/libraries/lua-lpeg/README
+++ b/libraries/lua-lpeg/README
@@ -1,11 +1,13 @@
-LPeg is a new pattern-matching library for Lua, based on Parsing Expression
-Grammars (PEGs).
+LPeg is a new pattern-matching library for Lua, based on Parsing
+Expression Grammars (PEGs).
-The library offers several functions to create and compose patterns. With the
-use of metamethods, several of these functions are provided as infix or prefix
-operators. On the one hand, the result is usually much more verbose than the
-typical encoding of patterns using the so called regular expressions (which
-typically are not regular expressions in the formal sense). On the other hand,
-first-class patterns allow much better documentation (as it is easy to comment
-the code, to break complex definitions in smaller parts, etc.) and are
-extensible, as we can define new functions to create and compose patterns.
+The library offers several functions to create and compose
+patterns. With the use of metamethods, several of these functions are
+provided as infix or prefix operators. On the one hand, the result is
+usually much more verbose than the typical encoding of patterns using
+the so called regular expressions (which typically are not regular
+expressions in the formal sense). On the other hand, first-class
+patterns allow much better documentation (as it is easy to comment
+the code, to break complex definitions in smaller parts, etc.) and
+are extensible, as we can define new functions to create and compose
+patterns.
diff --git a/libraries/lua-lpeg/lua-lpeg.SlackBuild b/libraries/lua-lpeg/lua-lpeg.SlackBuild
index f6bb9030e0..b6771369df 100644
--- a/libraries/lua-lpeg/lua-lpeg.SlackBuild
+++ b/libraries/lua-lpeg/lua-lpeg.SlackBuild
@@ -2,6 +2,7 @@
# SlackBuild script for lua-lpeg
+# Copyright 2024 Alexander Verbovetsky, Moscow, Russia
# Copyright 2021 Ruben Schuller <sb@rbn.im>
# Copyright 2014-2019 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
# All rights reserved.
@@ -27,7 +28,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=lua-lpeg
SRCNAM=lpeg
-VERSION=${VERSION:-1.0.2}
+VERSION=${VERSION:-1.1.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -40,9 +41,6 @@ if [ -z "$ARCH" ]; then
esac
fi
-# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
-# the name of the created package would be, and then exit. This information
-# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
@@ -77,15 +75,21 @@ 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 {} \;
-make
-install -m 0755 -D lpeg.so $PKG/$(pkg-config --variable INSTALL_CMOD lua)/lpeg.so
-install -m 0644 -D re.lua $PKG/$(pkg-config --variable INSTALL_LMOD lua)/re.lua
+for v in "" "5.2" "5.3"; do
+ _pkgconfigv=$(echo $v | tr --delete .)
+ if pkg-config --exists lua$_pkgconfigv; then
+ make LUADIR=/usr/include/lua${v}/
+ install -m 0755 -D lpeg.so $PKG/$(pkg-config --variable INSTALL_CMOD lua$_pkgconfigv)/lpeg.so
+ install -m 0644 -D re.lua $PKG/$(pkg-config --variable INSTALL_LMOD lua$_pkgconfigv)/re.lua
+ make clean
+ 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
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a HISTORY $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a HISTORY README.* $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
diff --git a/libraries/lua-lpeg/lua-lpeg.info b/libraries/lua-lpeg/lua-lpeg.info
index a78a796df7..62c752efd6 100644
--- a/libraries/lua-lpeg/lua-lpeg.info
+++ b/libraries/lua-lpeg/lua-lpeg.info
@@ -1,10 +1,10 @@
PRGNAM="lua-lpeg"
-VERSION="1.0.2"
+VERSION="1.1.0"
HOMEPAGE="http://www.inf.puc-rio.br/~roberto/lpeg/"
-DOWNLOAD="http://www.inf.puc-rio.br/~roberto/lpeg/lpeg-1.0.2.tar.gz"
-MD5SUM="d342571886f1abcb7afe6a83d024d583"
+DOWNLOAD="https://www.inf.puc-rio.br/~roberto/lpeg/lpeg-1.1.0.tar.gz"
+MD5SUM="842a538b403b5639510c9b6fffd2c75b"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="lua"
-MAINTAINER="Ruben Schuller"
-EMAIL="sb@rbn.im""
+MAINTAINER="Alexander Verbovetsky"
+EMAIL="alik@ejik.org"