aboutsummaryrefslogtreecommitdiff
path: root/development/kForth-32
diff options
context:
space:
mode:
authorAntonio Leal <antonio.leal@yahoo.com>2023-03-24 04:25:04 +0000
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2023-03-25 10:01:53 +0700
commit6b30722894830be365c29bf99d5e0263f50d2b04 (patch)
treef458f340cea26578225f765434353f3f6d121d8c /development/kForth-32
parent8cc6577b6de3693cd6f127927ba7eeed401e3dee (diff)
development/kForth-32: Added (32-bit Forth System for x86-GNU/Linux)
Signed-off-by: bedlam <dave@slackbuilds.org> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'development/kForth-32')
-rw-r--r--development/kForth-32/README30
-rw-r--r--development/kForth-32/doinst.sh13
-rw-r--r--development/kForth-32/kForth-32.SlackBuild111
-rw-r--r--development/kForth-32/kForth-32.desktop9
-rw-r--r--development/kForth-32/kForth-32.info10
-rw-r--r--development/kForth-32/kForth-32.sh2
-rw-r--r--development/kForth-32/slack-desc19
7 files changed, 194 insertions, 0 deletions
diff --git a/development/kForth-32/README b/development/kForth-32/README
new file mode 100644
index 000000000000..1025501bc2ac
--- /dev/null
+++ b/development/kForth-32/README
@@ -0,0 +1,30 @@
+kForth is an implementation of the Forth programming language
+and environment. The user may write Forth programs with an editor,
+load these program files from kForth, and run them.
+kForth, like other implementations of Forth, provides an interactive
+environment, allowing the user to examine or define variables and
+define and execute individual words. Interactive use is one of the
+main advantages in using a Forth environment for writing and testing
+computer programs.
+kForth provides a large subset of the Forth-2012 specification for
+the Forth language. It also provides some extensions and non-standard
+features which its authors have found to be useful.
+Experienced Forth users should consult the Technical Information
+section of the User’s Guide for specific information on the
+differences between kForth and Forth-2012.
+
+You may specify a specific directory in which kforth will search
+for .4th files not found in the current directory. The environment
+variable KFORTH_DIR must be set to this directory.
+For example, add the following lines to your .bash_profile file:
+
+ KFORTH_DIR=~/kforth/kForth-32-x.y.z/forth-src
+ export KFORTH_DIR
+
+if you want to override the default location on
+KFORTH_DIR=/usr/share/kForth-32
+
+kForth-32 is designed to be installed on a 32-bit linux operating
+system.
+It will not install on 64-bit Slackware unless multilib support is
+installed.
diff --git a/development/kForth-32/doinst.sh b/development/kForth-32/doinst.sh
new file mode 100644
index 000000000000..aea0f894eb32
--- /dev/null
+++ b/development/kForth-32/doinst.sh
@@ -0,0 +1,13 @@
+if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
+fi
+
+if [ -x /usr/bin/update-mime-database ]; then
+ /usr/bin/update-mime-database usr/share/mime >/dev/null 2>&1
+fi
+
+if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
+ if [ -x /usr/bin/gtk-update-icon-cache ]; then
+ /usr/bin/gtk-update-icon-cache -f usr/share/icons/hicolor >/dev/null 2>&1
+ fi
+fi
diff --git a/development/kForth-32/kForth-32.SlackBuild b/development/kForth-32/kForth-32.SlackBuild
new file mode 100644
index 000000000000..8f1f2248267a
--- /dev/null
+++ b/development/kForth-32/kForth-32.SlackBuild
@@ -0,0 +1,111 @@
+#!/bin/bash
+
+# Slackware build script for kForth-32
+
+# Copyright 2023 Antonio Leal, Porto Salvo, Oeiras, Portugal
+# 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=kForth-32
+VERSION=${VERSION:-2.3.0}
+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}
+
+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 $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.?z
+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 {} \+
+
+cd src
+make
+
+rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la
+
+mkdir -p $PKG/usr/bin
+install -Dsv -m 0755 kforth32 $PKG/usr/bin/kforth32
+install -Dsv -m 0755 kforth32-fast $PKG/usr/bin/kforth32-fast
+
+mkdir -p $PKG/usr/share/kForth-32
+cd ../forth-src
+cp -avxu * $PKG/usr/share/kForth-32
+
+cd ../doc
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp *.* $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/etc/profile.d
+cp $CWD/kForth-32.sh $PKG/etc/profile.d
+
+mkdir -p $PKG/usr/share/pixmaps
+cp $TMP/$PRGNAM-$VERSION/kforth.xpm $PKG/usr/share/pixmaps
+
+mkdir -p $PKG/usr/share/applications
+cp $CWD/kForth-32.desktop $PKG/usr/share/applications
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/development/kForth-32/kForth-32.desktop b/development/kForth-32/kForth-32.desktop
new file mode 100644
index 000000000000..0301931e7639
--- /dev/null
+++ b/development/kForth-32/kForth-32.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Name=kForth-32
+Comment=kForth-32 a 32-bit Forth System for x86
+Exec=/usr/bin/kforth32
+Icon=/usr/share/pixmaps/kforth.xpm
+Terminal=true
+Type=Application
+Categories=System;Development;
+
diff --git a/development/kForth-32/kForth-32.info b/development/kForth-32/kForth-32.info
new file mode 100644
index 000000000000..d15e9bf2bcc4
--- /dev/null
+++ b/development/kForth-32/kForth-32.info
@@ -0,0 +1,10 @@
+PRGNAM="kForth-32"
+VERSION="2.3.0"
+HOMEPAGE="https://github.com/mynenik/kForth-32"
+DOWNLOAD="https://github.com/mynenik/kForth-32/archive/refs/tags/v2.3.0/kForth-32-2.3.0.tar.gz"
+MD5SUM="57145019e12252630f0f2d2deec16ad3"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="patchutils"
+MAINTAINER="Antonio Leal"
+EMAIL="antonio.leal@yahoo.com"
diff --git a/development/kForth-32/kForth-32.sh b/development/kForth-32/kForth-32.sh
new file mode 100644
index 000000000000..30ccb0b5900f
--- /dev/null
+++ b/development/kForth-32/kForth-32.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+export KFORTH_DIR=/usr/share/kForth-32
diff --git a/development/kForth-32/slack-desc b/development/kForth-32/slack-desc
new file mode 100644
index 000000000000..7bf59676ab3a
--- /dev/null
+++ b/development/kForth-32/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------------------------------------------------------|
+kForth-32: kForth-32 (32-bit Forth System for x86-GNU/Linux)
+kForth-32:
+kForth-32: kForth-32 is an implementation of the Forth programming language
+kForth-32: and environment. Like other implementations of Forth, provides an
+kForth-32: interactive environment, allowing the user to examine or
+kForth-32: define variables and define and execute individual words.
+kForth-32: kForth-32 provides a large subset of the Forth-2012 specification
+kForth-32: and includes some useful extensions.
+kForth-32:
+kForth-32: https://github.com/mynenik/kForth-32
+kForth-32: