From 0b176174550a22664aa1da4de63d5e68f79372cc Mon Sep 17 00:00:00 2001 From: Ruben Schuller Date: Wed, 23 Oct 2024 12:02:34 +0700 Subject: libraries/lua-mpack: Fix for newer lua. Signed-off-by: Willy Sudiarto Raharjo --- libraries/lua-mpack/README | 8 ++++++-- libraries/lua-mpack/lua-mpack.SlackBuild | 16 ++++++++++++---- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/libraries/lua-mpack/README b/libraries/lua-mpack/README index 0259311b027e..82b6c50b30ad 100644 --- a/libraries/lua-mpack/README +++ b/libraries/lua-mpack/README @@ -1,2 +1,6 @@ -lua-mpack is a small binary serialization/RPC library that implements -both the msgpack and msgpack-rpc specifications for lua. +lua-mpack is a small binary serialization/RPC library that +implements both the msgpack and msgpack-rpc specifications for +lua. + +This build picks up lua51 if it is present and builds the lua51 +extension in addition to the default 5.4 one. diff --git a/libraries/lua-mpack/lua-mpack.SlackBuild b/libraries/lua-mpack/lua-mpack.SlackBuild index 4a8db6cd36e4..c9b71853ff0d 100644 --- a/libraries/lua-mpack/lua-mpack.SlackBuild +++ b/libraries/lua-mpack/lua-mpack.SlackBuild @@ -23,12 +23,15 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# 20241022 lwf: Modified by SlackBuilds.org, BUILD=2: +# - support lua5.1 and lua 5.4 for 15.0 and 15.1 + cd $(dirname $0) ; CWD=$(pwd) PRGNAM=lua-mpack SRCNAM=libmpack-lua VERSION=${VERSION:-1.0.8} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -81,9 +84,14 @@ 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 {} \; -gcc -O2 -fPIC -c lmpack.c -o lmpack.o -gcc -shared -o mpack.so lmpack.o -install -D -m 0755 mpack.so $PKG/$(pkg-config --variable INSTALL_CMOD lua)/mpack.so +runmake() ( + gcc $(pkg-config --cflags $1) $SLKCFLAGS -c lmpack.c -o lmpack.o + gcc $(pkg-config --libs $1) -shared -o mpack.so lmpack.o + install -D -m 0755 mpack.so $PKG/$(pkg-config --variable INSTALL_CMOD $1)/mpack.so +) + +runmake lua +pkg-config --exists lua51 && runmake lua51 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 -- cgit v1.2.3