diff options
author | Juan M. Lasca <juanmlasca@gmail.com> | 2023-10-27 21:29:15 +0900 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2023-10-28 13:11:55 +0700 |
commit | d69da63aefda24a62132d26b431cd3864220d8af (patch) | |
tree | 3e6ecae82ad579c8c7dd426b917c73c743a18a24 /development | |
parent | b908c72e71bf331097861c334f366cbd35951ac4 (diff) |
development/eisl: Added (ISLisp interpreter).
Signed-off-by: Andrew Clemons <andrew.clemons@gmail.com>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'development')
-rw-r--r-- | development/eisl/README | 16 | ||||
-rw-r--r-- | development/eisl/eisl.SlackBuild | 92 | ||||
-rw-r--r-- | development/eisl/eisl.info | 10 | ||||
-rw-r--r-- | development/eisl/patches/01-tcltk.patch | 12 | ||||
-rw-r--r-- | development/eisl/patches/02-ndbm.patch | 52 | ||||
-rw-r--r-- | development/eisl/slack-desc | 19 |
6 files changed, 201 insertions, 0 deletions
diff --git a/development/eisl/README b/development/eisl/README new file mode 100644 index 000000000000..74f74916cd35 --- /dev/null +++ b/development/eisl/README @@ -0,0 +1,16 @@ +Easy-ISLisp (EISL) is an interpreter and compiler compatible with the +ISLisp standard. EISL was written by Kenichi Sasagawa and is available +under a BSD license, featuring: +* Full support of the ISLisp standard plus a number of extensions. +* Readline support and syntax highlighting. +* A compiler with generates C code, comparable in performance as + equivalent code generated by SBCL. +* tail-call optimization. +* type inference. +* C interop, +* libraries for CSV handling, OpenGL, statistics, parallel execution, + linear algebra, combinatorics, GNU Plot interop, lazy evaluation + (delay / force, l*), Tcl/Tk interop, TCP sockets, Unicode support, + prolog interpreter, etc. + + diff --git a/development/eisl/eisl.SlackBuild b/development/eisl/eisl.SlackBuild new file mode 100644 index 000000000000..00c65cdf2b7d --- /dev/null +++ b/development/eisl/eisl.SlackBuild @@ -0,0 +1,92 @@ +#!/bin/bash + +# Slackware build script for eisl + +# Copyright 2023 Juan M. Lasca <juanmlasca@gmail.com> +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# 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=eisl +VERSION=${VERSION:-3.50} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +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} + +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 {} \; + +# patch to correct tcl.h location: +cat $CWD/patches/01-tcltk.patch | patch -p1 || exit; + +# patch to use gdbm instead of unavailable ndbm: +cat $CWD/patches/02-ndbm.patch | patch -p1 || exit; + +CFLAGS="$SLKCFLAGS" make DESTDIR=$PKG PREFIX="/usr" install + +find $PKG/usr/share -name "*.lsp" -exec chmod -x {} \; + +# minor correction of example file: +sed -i '1s|/Users/dbane|/usr|' example/script-test.lsp + +# correct file permissions +find {example,verify,bench} -type f -exec chmod -x {} \; + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a \ + README.md license.txt \ + documents example verify bench \ + $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +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 diff --git a/development/eisl/eisl.info b/development/eisl/eisl.info new file mode 100644 index 000000000000..335eef8fd213 --- /dev/null +++ b/development/eisl/eisl.info @@ -0,0 +1,10 @@ +PRGNAM="eisl" +VERSION="3.50" +HOMEPAGE="https://github.com/sasagawa888/eisl" +DOWNLOAD="https://github.com/sasagawa888/eisl/archive/v3.50/eisl-3.50.tar.gz" +MD5SUM="457bdf4227081b2aba303020108f032d" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="Juan M. Lasca" +EMAIL="juanmlasca@gmail.com" diff --git a/development/eisl/patches/01-tcltk.patch b/development/eisl/patches/01-tcltk.patch new file mode 100644 index 000000000000..3b573ed30903 --- /dev/null +++ b/development/eisl/patches/01-tcltk.patch @@ -0,0 +1,12 @@ +--- eisl-3.50/library/tcltk.lsp 2023-09-10 01:16:45.000000000 -0300 ++++ eisl-3.50-mod/library/tcltk.lsp 2023-10-26 21:45:06.916251188 -0300 +@@ -1,8 +1,4 @@ +-(c-lang "#ifdef __linux__ +- #include <tcl/tcl.h> +- #else +- #include <tcl.h> +- #endif") ++(c-lang "#include <tcl.h>") + (c-option "-ltcl -ltk" linux) + (c-option "-I/opt/homebrew/opt/tcl-tk/include -L/opt/homebrew/opt/tcl-tk/lib -ltk8.6 -ltkstub8.6 -ltcl8.6 -ltclstub8.6" macos) + (c-define "BUFFSIZE" "1024") diff --git a/development/eisl/patches/02-ndbm.patch b/development/eisl/patches/02-ndbm.patch new file mode 100644 index 000000000000..4b1aede9db4b --- /dev/null +++ b/development/eisl/patches/02-ndbm.patch @@ -0,0 +1,52 @@ +--- eisl-3.50/library/ndbm.lsp 2023-09-10 01:16:45.000000000 -0300 ++++ eisl-3.50-mod/library/ndbm.lsp 2023-10-26 21:57:30.208196711 -0300 +@@ -8,9 +8,9 @@ + ;;; + ;;; See persist.lsp for a higher-level way to do things. + +-(c-include "<ndbm.h>") ++(c-include "<gdbm.h>") + (c-include "<fcntl.h>") +-(c-option "-lgdbm_compat -lgdbm" linux) ++(c-option "-lgdbm" linux) + + ;; This is the best way I could see to export C #define contants? + (defun ndbm-rdonly () +@@ -30,9 +30,9 @@ + (c-lang "res = Fmakefaststrlong(res_str);")) + + (defun ndbm-insert () +- (c-lang "res = DBM_INSERT | INT_FLAG;")) ++ (c-lang "res = GDBM_INSERT | INT_FLAG;")) + (defun ndbm-replace () +- (c-lang "res = DBM_REPLACE | INT_FLAG;")) ++ (c-lang "res = GDBM_REPLACE | INT_FLAG;")) + + (defun ndbm-store (db key content store-mode) + ;; Store a record to the file +@@ -40,14 +40,14 @@ + (c-lang "datum key, content;"); + (c-lang "key.dptr = Fgetname(KEY); key.dsize = strlen(key.dptr) + 1;") + (c-lang "content.dptr = Fgetname(CONTENT); content.dsize = strlen(content.dptr) + 1;") +- (c-lang "res = dbm_store(Fgetlong(DB), key, content, STORE_MODE & INT_MASK) | INT_FLAG;")) ++ (c-lang "res = gdbm_store(Fgetlong(DB), key, content, STORE_MODE & INT_MASK) | INT_FLAG;")) + + (defun ndbm-fetch (db key) + ;; Fetch a record from the file + (the <longnum> db)(the <string> key) + (c-lang "datum key, content;") + (c-lang "key.dptr = Fgetname(KEY); key.dsize = strlen(key.dptr) + 1;") +- (c-lang "content = dbm_fetch(Fgetlong(DB), key);") ++ (c-lang "content = gdbm_fetch(Fgetlong(DB), key);") + (c-lang "res = (content.dptr == NULL) ? NIL : Fmakestr(content.dptr);")) + + (defun ndbm-delete (db key) +@@ -55,7 +55,7 @@ + (the <longnum> db)(the <string> key) + (c-lang "datum key;") + (c-lang "key.dptr = Fgetname(KEY); key.dsize = strlen(key.dptr) + 1;") +- (c-lang "res = dbm_delete(Fgetlong(DB), key) | INT_FLAG;")) ++ (c-lang "res = gdbm_delete(Fgetlong(DB), key) | INT_FLAG;")) + + (defun ndbm-close (db) + ;; Close an open dbm file diff --git a/development/eisl/slack-desc b/development/eisl/slack-desc new file mode 100644 index 000000000000..97e610e2a0d3 --- /dev/null +++ b/development/eisl/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +eisl: eisl (ISO ISLISP interpreter) +eisl: +eisl: Easy-ISLisp (EISL) is an interpreter and compiler compatible with the +eisl: ISLisp standard. EISL was written by Kenichi Sasagawa and is +eisl: available under a BSD license. +eisl: +eisl: +eisl: +eisl: +eisl: For more information, see: https://github.com/sasagawa888/eisl +eisl: |