aboutsummaryrefslogtreecommitdiff
path: root/libraries/luaevent
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2024-10-23 16:33:37 -0400
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2024-11-02 19:28:39 +0700
commit43e92ab3fb95158bb680f992980d7db9779f29f8 (patch)
tree303b68c8b93e9887f56bb7f36e722359ae4b0958 /libraries/luaevent
parentc7ad2d4f32dc19768c015631c3fcb49f433a2e0d (diff)
libraries/luaevent: Updated for version 0.4.6, lua 5.4, lua51.
Signed-off-by: B. Watson <urchlay@slackware.uk> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'libraries/luaevent')
-rw-r--r--libraries/luaevent/README3
-rw-r--r--libraries/luaevent/luaevent.SlackBuild62
-rw-r--r--libraries/luaevent/luaevent.info6
3 files changed, 36 insertions, 35 deletions
diff --git a/libraries/luaevent/README b/libraries/luaevent/README
index 373c62d57c441..a24057309a62d 100644
--- a/libraries/luaevent/README
+++ b/libraries/luaevent/README
@@ -1,3 +1,6 @@
This is a binding of libevent to Lua. It will serve as a drop-in
replacement for copas, and eventually support more features (async
DNS, HTTP, RPC...).
+
+Optional dependency: lua51. If lua51 is installed at build time, this
+package will contain a module for Lua 5.1.
diff --git a/libraries/luaevent/luaevent.SlackBuild b/libraries/luaevent/luaevent.SlackBuild
index 0ab26f174fe47..4fdb97cfe019d 100644
--- a/libraries/luaevent/luaevent.SlackBuild
+++ b/libraries/luaevent/luaevent.SlackBuild
@@ -22,10 +22,14 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20241023 bkw: Modified by SlackBuilds.org:
+# - update for v0.4.6 (0.4.3 didn't support lua 5.4).
+# - build for lua 5.4 and lua51.
+
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=luaevent
-VERSION=${VERSION:-0.4.3}
+VERSION=${VERSION:-0.4.6}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -38,9 +42,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
@@ -50,18 +51,11 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
+SLKCFLAGS="-O2 -fPIC" # on all platforms we need PIC
if [ "$ARCH" = "i586" ]; then
- SLKCFLAGS="-O2 -march=i586 -mtune=i686"
- LIBDIRSUFFIX=""
+ SLKCFLAGS+=" -O2 -march=i586 -mtune=i686"
elif [ "$ARCH" = "i686" ]; then
- SLKCFLAGS="-O2 -march=i686 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
-else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
+ SLKCFLAGS+=" -O2 -march=i686 -mtune=i686"
fi
set -e
@@ -78,24 +72,28 @@ else
fi
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 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
- -exec chmod 644 {} \;
-
-# Getting default cflags from config then append slkcflags to them and passing to make
-_CFLAGS=$( cat Makefile |grep ^CFLAGS |sed "s,CFLAGS\ \=,,g" )" "${SLKCFLAGS}
-make \
- CFLAGS="$_CFLAGS"
-
-# Installing:
-make install \
- INSTALL_DIR_BIN=/usr/lib${LIBDIRSUFFIX}/lua/5.1 \
- 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
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} +
+
+runmake() {
+ local cmod=$( pkg-config $1 --variable INSTALL_CMOD )
+ local lmod=$( pkg-config $1 --variable INSTALL_LMOD )
+ local incs=$( pkg-config $1 --variable INSTALL_INC )
+
+ make clean
+ make -j1 \
+ LUA_INC_DIR=$incs \
+ INSTALL_DIR_LUA=$lmod \
+ INSTALL_DIR_BIN=$cmod \
+ DESTDIR=$PKG \
+ INSTALL_PROGRAM="install -s -m0755" \
+ all install
+}
+
+sed -i "s/-Wall/$SLKCFLAGS -DLUA_COMPAT_5_3/" Makefile
+
+runmake lua
+[ -x /usr/bin/lua51 ] && runmake lua51
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
diff --git a/libraries/luaevent/luaevent.info b/libraries/luaevent/luaevent.info
index 092d887b88477..fc689dc87ed1f 100644
--- a/libraries/luaevent/luaevent.info
+++ b/libraries/luaevent/luaevent.info
@@ -1,8 +1,8 @@
PRGNAM="luaevent"
-VERSION="0.4.3"
+VERSION="0.4.6"
HOMEPAGE="https://github.com/harningt/luaevent"
-DOWNLOAD="https://github.com/harningt/luaevent/archive/v0.4.3/luaevent-0.4.3.tar.gz"
-MD5SUM="3d0efc3d3751fddecedba0c25e0652df"
+DOWNLOAD="https://github.com/harningt/luaevent/archive/v0.4.6/luaevent-0.4.6.tar.gz"
+MD5SUM="1e01021aa689b1cf6c1c1a96bb3621e1"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="lua"