aboutsummaryrefslogtreecommitdiff
path: root/development
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2024-10-21 16:36:40 -0400
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2024-11-02 19:28:37 +0700
commitdd70ac1a65cca9015def0ebd587443ff6d3a65d1 (patch)
treeed435e5988f47e4a4af359ba0a1673d022e69c61 /development
parent71aa7458bcffd2b2a41d891765d698b7a05d2dac (diff)
development/Fennel: Support for lua 5.4, lua51.
Signed-off-by: B. Watson <urchlay@slackware.uk> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'development')
-rw-r--r--development/Fennel/Fennel.SlackBuild65
-rw-r--r--development/Fennel/README11
2 files changed, 29 insertions, 47 deletions
diff --git a/development/Fennel/Fennel.SlackBuild b/development/Fennel/Fennel.SlackBuild
index cdba0da44f07..fa4318ff28b9 100644
--- a/development/Fennel/Fennel.SlackBuild
+++ b/development/Fennel/Fennel.SlackBuild
@@ -21,26 +21,24 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20241021 bkw: Modified by SlackBuilds.org, BUILD=2:
+# - support new lua 5.4 and lua51.
+# - ARCH=noarch.
+# - handle alternate tarball filename, if content-disposition not used.
+# this isn't a github URL, don't see a way to 'canonize' the link.
+# - symlinked man pages to match the extra commands (fennel5.1, fenneljit).
+# - grammar/punctuation fixes in README.
+
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=Fennel
SRCNAM=${PRGNAM,}
VERSION=${VERSION:-1.0.0}
-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,42 +48,34 @@ 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
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $SRCNAM-$VERSION
-tar xvf $CWD/$SRCNAM-$VERSION.tar.gz
+tar xvf $CWD/$SRCNAM-$VERSION.tar.gz || tar xvf $CWD/$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 {} \;
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} +
-LUAVER=${LUAVER:-"5.1 5.2 5.3 5.4 jit"}
+LUAVER=${LUAVER:-"5.1 5.4 jit"}
+
+mkdir -p $PKG/usr/man/man1
+gzip -9 < $SRCNAM.1 > $PKG/usr/man/man1/$SRCNAM.1.gz
for i in $LUAVER
do
- if [ $i != 5.1 ]; then ver=$i; fi
+ if [ $i != 5.4 ]; then
+ ver=$i
+ ln -s $SRCNAM.1.gz $PKG/usr/man/man1/$SRCNAM$ver.1.gz
+ else
+ ver=""
+ fi
if $(lua$ver -v &> /dev/null)
then
+ make clean
make LUA=lua$ver
install -D -m 0755 $SRCNAM $PKG/usr/bin/$SRCNAM$ver
if [ $i != jit ]
@@ -96,13 +86,6 @@ do
fi
done
-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/man/man1
-gzip -9 $SRCNAM.1
-cp $SRCNAM.1.gz $PKG/usr/man/man1
-
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a LICENSE *.md $PKG/usr/doc/$PRGNAM-$VERSION
diff --git a/development/Fennel/README b/development/Fennel/README
index fe1e9d12827c..1457a524ac0c 100644
--- a/development/Fennel/README
+++ b/development/Fennel/README
@@ -14,16 +14,15 @@ macro system.
Anywhere you can run Lua code, you can run Fennel code.
-This require one version of Lua installed (lua, lua52, lua53, luajit):
-Default support for all versions of Lua installed before build.
+This requires one or more versions of Lua installed: lua, lua51, luajit.
+Default: support for all versions of Lua installed at build time.
To specify which Lua versions:
export LUAVER="vers"
-"vers" must be one or more of "5.1 5.2 5.3 jit" in the right order
-separated with space.
+"vers" must be one or more of "5.1 5.4 jit", separated with spaces.
-After installation there are one or more fennel executable files for the
-equivalent versions of Lua.
+After installation, there are one or more fennel executable files for
+the equivalent versions of Lua.
Optional dependency:
* lua-readline