diff options
author | David O'Shaughnessy <dev@osh.id.au> | 2024-10-23 12:00:24 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2024-10-23 13:09:48 +0700 |
commit | 45c79b81fd3401da8ae537ff6e96211953851d2f (patch) | |
tree | 6391063be9a3b6a07f7ab84f0782da4c6d1593d4 /libraries | |
parent | 5b3233a96e3d2cede0e4857ebb3513c3baec8447 (diff) |
libraries/lua-cjson: Fix for newer lua.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'libraries')
-rw-r--r-- | libraries/lua-cjson/README | 3 | ||||
-rw-r--r-- | libraries/lua-cjson/lua-cjson.SlackBuild | 32 | ||||
-rw-r--r-- | libraries/lua-cjson/lua-cjson.info | 6 |
3 files changed, 28 insertions, 13 deletions
diff --git a/libraries/lua-cjson/README b/libraries/lua-cjson/README index 747f25adafe2..03ce6a8aee75 100644 --- a/libraries/lua-cjson/README +++ b/libraries/lua-cjson/README @@ -12,3 +12,6 @@ Features: Caveats: * UTF-16 and UTF-32 are not supported + +This build will also build a lua51 module, if lua51 is installed, +but the default lua is lua 5.4. diff --git a/libraries/lua-cjson/lua-cjson.SlackBuild b/libraries/lua-cjson/lua-cjson.SlackBuild index 8423875be849..c73489a96348 100644 --- a/libraries/lua-cjson/lua-cjson.SlackBuild +++ b/libraries/lua-cjson/lua-cjson.SlackBuild @@ -26,11 +26,15 @@ # - strip shared library. # - actually use SLKCFLAGS. +# 20241022 lwf: Modified by SlackBuilds.org, BUILD=3: +# - support lua5.1 and lua 5.4 for 15.0 and 15.1 + + cd $(dirname $0) ; CWD=$(pwd) PRGNAM=lua-cjson VERSION=${VERSION:-2.1.0} -BUILD=${BUILD:-2} +BUILD=${BUILD:-3} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -70,26 +74,34 @@ set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP + rm -rf $PRGNAM-$VERSION tar xvf $CWD/$PRGNAM-$VERSION.tar.gz 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 640 -o -perm 600 -o -perm 444 \ - -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \+ + \( -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 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \+ + +runmake() ( + make clean + make LUA_VERSION=$(pkg-config --variable=V "$1") LUA_INCLUDE_DIR="$(pkg-config --variable INSTALL_INC "$1")" PREFIX="/usr" LUA_CMODULE_DIR="$(pkg-config --variable INSTALL_CMOD "$1")" CFLAGS="$(pkg-config --cflags "$1") $SLKCFLAGS" + make install DESTDIR=$PKG LUA_VERSION=$(pkg-config --variable=V "$1") LUA_INCLUDE_DIR="$(pkg-config --variable INSTALL_INC "$1")" PREFIX="/usr" LUA_CMODULE_DIR="$(pkg-config --variable INSTALL_CMOD "$1")" CFLAGS="$(pkg-config --cflags "$1") $SLKCFLAGS" + +) -sed -i "/^CFLAGS/s,-O3,$SLKCFLAGS," Makefile +runmake lua +pkg-config --exists lua51 && runmake lua51 -make +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/lib${LIBDIRSUFFIX}/lua/5.1 -install -s -m0755 cjson.so $PKG/usr/lib${LIBDIRSUFFIX}/lua/5.1 mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a \ - LICENSE NEWS THANKS manual.txt manual.html performance.txt performance.html \ + LICENSE NEWS THANKS rfc4627.txt manual.txt performance.txt \ $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild diff --git a/libraries/lua-cjson/lua-cjson.info b/libraries/lua-cjson/lua-cjson.info index fe51a1855e39..bf0237f90772 100644 --- a/libraries/lua-cjson/lua-cjson.info +++ b/libraries/lua-cjson/lua-cjson.info @@ -1,8 +1,8 @@ PRGNAM="lua-cjson" VERSION="2.1.0" -HOMEPAGE="https://www.kyne.com.au/~mark/software/lua-cjson.php" -DOWNLOAD="https://www.kyne.com.au/~mark/software/download/lua-cjson-2.1.0.tar.gz" -MD5SUM="24f270663e9f6ca8ba2a02cef19f7963" +HOMEPAGE="https://github.com/mpx/lua-cjson/" +DOWNLOAD="https://github.com/mpx/lua-cjson/archive/2.1.0/lua-cjson-2.1.0.tar.gz" +MD5SUM="fa5ee22e8a5adbc5c5b6eab6152f154e" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="lua" |