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>
This commit is contained in:
B. Watson 2024-10-23 16:33:37 -04:00 committed by Willy Sudiarto Raharjo
parent c7ad2d4f32
commit 43e92ab3fb
No known key found for this signature in database
GPG key ID: 3F617144D7238786
3 changed files with 33 additions and 32 deletions

View file

@ -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.

View file

@ -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 {} \;
find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \
\! -perm /111 -a \! -perm 644 -a -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"
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 )
# Installing:
make install \
INSTALL_DIR_BIN=/usr/lib${LIBDIRSUFFIX}/lua/5.1 \
DESTDIR=$PKG
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
}
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
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 \

View file

@ -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"