diff options
Diffstat (limited to 'development/Fennel')
-rw-r--r-- | development/Fennel/Fennel.SlackBuild | 86 | ||||
-rw-r--r-- | development/Fennel/Fennel.info | 6 | ||||
-rw-r--r-- | development/Fennel/README | 33 |
3 files changed, 66 insertions, 59 deletions
diff --git a/development/Fennel/Fennel.SlackBuild b/development/Fennel/Fennel.SlackBuild index 2054c2b8cb..cdba0da44f 100644 --- a/development/Fennel/Fennel.SlackBuild +++ b/development/Fennel/Fennel.SlackBuild @@ -1,7 +1,7 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for Fennel -# Copyright 2020 abooksigun <abooksigun09@gmail.com> +# Copyright 2022 abooksigun <abooksigun09@gmail.com> # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -21,26 +21,37 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +cd $(dirname $0) ; CWD=$(pwd) + PRGNAM=Fennel -VERSION=${VERSION:-0.3.2} +SRCNAM=${PRGNAM,} +VERSION=${VERSION:-1.0.0} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) ARCH=i486 ;; + i?86) ARCH=i586 ;; arm*) ARCH=arm ;; *) ARCH=$( uname -m ) ;; esac fi -CWD=$(pwd) +# 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 +fi + TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" @@ -58,9 +69,9 @@ 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 +rm -rf $SRCNAM-$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 \) \ @@ -68,47 +79,32 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; -install -D -m 0755 -t $PKG/usr/bin/ fennel fennel-watch.sh - -install -D -m 0644 -t $PKG/usr/share/lua/5.1 fennel.lua fennelview.fnl generate.fnl -install -D -m 0644 fennelview.fnl.lua $PKG/usr/share/lua/5.1/fennelview.lua - -# lua 5.2 support. -if $(lua5.2 -v &> /dev/null); then - sed -i '1s|lua.*|lua5.2|' fennel - - install -D -m 0755 fennel $PKG/usr/bin/fennel5.2 - - install -D -m 0644 -t $PKG/usr/share/lua/5.2 fennel.lua fennelview.fnl generate.fnl - install -D -m 0644 fennelview.fnl.lua $PKG/usr/share/lua/5.2/fennelview.lua -fi - -# lua 5.3 support. -if $(lua5.3 -v &> /dev/null); then - sed -i '1s|lua.*|lua5.3|' fennel - - install -D -m 0755 fennel $PKG/usr/bin/fennel5.3 - - install -D -m 0644 -t $PKG/usr/share/lua/5.3 fennel.lua fennelview.fnl generate.fnl - install -D -m 0644 fennelview.fnl.lua $PKG/usr/share/lua/5.3/fennelview.lua -fi - -# luajit support. -if $(luajit -v &> /dev/null); then - sed -i '1s|lua.*|luajit|' fennel - - install -D -m 0755 fennel $PKG/usr/bin/fenneljit -fi +LUAVER=${LUAVER:-"5.1 5.2 5.3 5.4 jit"} + +for i in $LUAVER +do + if [ $i != 5.1 ]; then ver=$i; fi + if $(lua$ver -v &> /dev/null) + then + make LUA=lua$ver + install -D -m 0755 $SRCNAM $PKG/usr/bin/$SRCNAM$ver + if [ $i != jit ] + then + install -D -m 0644 $SRCNAM.lua $PKG/usr/share/lua/$i/$SRCNAM.lua + fi + rm $SRCNAM $SRCNAM.lua + 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 fennel.1 -cp fennel.1.gz $PKG/usr/man/man1 +gzip -9 $SRCNAM.1 +cp $SRCNAM.1.gz $PKG/usr/man/man1 mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -t $PKG/usr/doc/$PRGNAM-$VERSION api.md changelog.md CONTRIBUTING.md LICENSE lua-primer.md README.md reference.md tutorial.md +cp -a LICENSE *.md $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild @@ -116,4 +112,4 @@ mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE diff --git a/development/Fennel/Fennel.info b/development/Fennel/Fennel.info index 8aaa7c8e75..5bde0e670a 100644 --- a/development/Fennel/Fennel.info +++ b/development/Fennel/Fennel.info @@ -1,8 +1,8 @@ PRGNAM="Fennel" -VERSION="0.3.2" +VERSION="1.0.0" HOMEPAGE="https://fennel-lang.org/" -DOWNLOAD="https://github.com/bakpakin/Fennel/archive/0.3.2/Fennel-0.3.2.tar.gz" -MD5SUM="db324e9f6a1312c08de736b6d7cb42d3" +DOWNLOAD="https://git.sr.ht/~technomancy/fennel/archive/1.0.0.tar.gz" +MD5SUM="a42c841b00eecbe4a49402a1ab318a51" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="lua" diff --git a/development/Fennel/README b/development/Fennel/README index 06336bb959..fe1e9d1282 100644 --- a/development/Fennel/README +++ b/development/Fennel/README @@ -1,19 +1,30 @@ -Fennel is a programming language that brings together the speed, simplicity, -and reach of Lua with the flexibility of a lisp syntax and macro system. +Fennel is a programming language that brings together the speed, +simplicity, and reach of Lua with the flexibility of a lisp syntax and +macro system. -* Full Lua compatibilty: Easily call any Lua function or library from Fennel and vice-versa. -* Zero overhead: Compiled code should be just as or more efficient than hand-written Lua. -* Compile-time macros: Ship compiled code with no runtime dependency on Fennel. -* Embeddable: Fennel is a one-file library as well as an executable. Embed it in other - programs to support runtime extensibility and interactive development. +* Full Lua compatibilty: Easily call any Lua function or library from + Fennel and vice-versa. +* Zero overhead: Compiled code should be just as or more efficient + than hand-written Lua. +* Compile-time macros: Ship compiled code with no runtime dependency + on Fennel. +* Embeddable: Fennel is a one-file library as well as an executable. + Embed it in other programs to support runtime extensibility + and interactive development. Anywhere you can run Lua code, you can run Fennel code. -Optional Dependency: -* lua52, lua53, luajit +This require one version of Lua installed (lua, lua52, lua53, luajit): Default support for all versions of Lua installed before build. -After installation there is "fennel5.2", "fennel5.3" and "fenneljit" executable files for the -equivalent versions of Lua installed. +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. + +After installation there are one or more fennel executable files for the +equivalent versions of Lua. + +Optional dependency: * lua-readline For history completion |