diff options
author | B. Watson <urchlay@slackware.uk> | 2024-10-22 21:29:34 -0400 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2024-11-02 19:28:38 +0700 |
commit | 326ce31bac8a4316adf85522209b8c99d37fee82 (patch) | |
tree | 8994ea97ae7ffd7bf0c0cc1eb79eda017094fedc | |
parent | f2e0c36ef2e89dae80b457765d0a3f3657b33968 (diff) |
libraries/lua-std._debug: Support for lua 5.4, lua51.
Signed-off-by: B. Watson <urchlay@slackware.uk>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r-- | libraries/lua-std._debug/README | 4 | ||||
-rw-r--r-- | libraries/lua-std._debug/lua-std._debug.SlackBuild | 62 |
2 files changed, 18 insertions, 48 deletions
diff --git a/libraries/lua-std._debug/README b/libraries/lua-std._debug/README index b9ef206b9c..e821b9187e 100644 --- a/libraries/lua-std._debug/README +++ b/libraries/lua-std._debug/README @@ -1,4 +1,4 @@ Manage an overall debug state, and associated hint substates. -Optional Dependency: lua52, lua53. -Default support for all versions of Lua installed before build. +Optional dependency: lua51. If lua51 is installed at build time, this +package will contain a module for Lua 5.1. diff --git a/libraries/lua-std._debug/lua-std._debug.SlackBuild b/libraries/lua-std._debug/lua-std._debug.SlackBuild index 9a93738e1a..2653e27eb5 100644 --- a/libraries/lua-std._debug/lua-std._debug.SlackBuild +++ b/libraries/lua-std._debug/lua-std._debug.SlackBuild @@ -21,26 +21,20 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# 20241022 bkw: Modified by SlackBuilds.org, BUILD=2: +# - make noarch. +# - support new lua (5.4) and lua51. + cd $(dirname $0) ; CWD=$(pwd) PRGNAM=lua-std._debug SRCNAM=_debug VERSION=${VERSION:-1.0.1} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} +ARCH=noarch -if [ -z "$ARCH" ]; then - case "$( uname -m )" in - i?86) ARCH=i586 ;; - arm*) ARCH=arm ;; - *) ARCH=$( uname -m ) ;; - 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,20 +44,6 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -if [ "$ARCH" = "i586" ]; then - SLKCFLAGS="-O2 -march=i586 -mtune=i686" - LIBDIRSUFFIX="" -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="" -fi - set -e rm -rf $PKG @@ -73,26 +53,16 @@ rm -rf $PRGNAM-$VERSION tar xvf $CWD/$SRCNAM-$VERSION.tar.gz cd $SRCNAM-$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 {} \; - -install -D -m 0644 -t $PKG/usr/share/lua/5.1/std/$SRCNAM lib/std/$SRCNAM/*.lua - -# lua 5.2 support. -if $(lua5.2 -v &> /dev/null); then - install -D -m 0644 -t $PKG/usr/share/lua/5.2/std/$SRCNAM lib/std/$SRCNAM/*.lua -fi - -# lua 5.3 support -if $(lua5.3 -v &> /dev/null); then - install -D -m 0644 -t $PKG/usr/share/lua/5.3/std/$SRCNAM lib/std/$SRCNAM/*.lua -fi - -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 {} + + +for i in lua lua51; do + if pkg-config --exists $i; then + install -D -m 0644 \ + -t $PKG/$( pkg-config $i --variable INSTALL_LMOD )/std/$SRCNAM \ + lib/std/$SRCNAM/*.lua + fi +done mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -t $PKG/usr/doc/$PRGNAM-$VERSION doc/* AUTHORS.md LICENSE.md NEWS.md README.md |