development/ciforth: Added (forth builder).

Signed-off-by: Andrew Clemons <andrew.clemons@gmail.com>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Zbigniew Baniewski 2023-09-15 22:22:34 +09:00 committed by Willy Sudiarto Raharjo
parent 15838786dd
commit 67e9c6aaf8
No known key found for this signature in database
GPG key ID: 3F617144D7238786
4 changed files with 164 additions and 0 deletions

View file

@ -0,0 +1,17 @@
lina is the Linux native (= c-less) version of ciforth (common Intel
Forth), an interpret environment and compiler for Forth. It is
(large and by) compliant with the ISO Forth standard; the CORE
wordset is fully implemented. The small, classic, indirect threaded
kernel contains the essential, i.a. file access and exceptions. Its
power is multiplied by an extensive source library, that add i.a.
a decompiler and integrated 386 assembler. It is fully self
contained; if you want to understand a compiler in all details,
this is your best, if not only, choice. ciforth sports the highest
documentation to binary proportion in the EDP industry, barring
m4 on Coherent.
For nicer command-line experience (electives loaded instantly,
history, cursor keys etc.) you may want to add the following line
to your ~/.bashrc file:
alias lina='rlwrap lina -e'

View file

@ -0,0 +1,118 @@
#!/bin/bash
# Slackware build script for ciforth
# Written by Zbigniew Baniewski <Zbigniew [dot] Baniewski [at] gmail [dot] com>
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=ciforth
VERSION=${VERSION:-5.4.1}
BUILD=${BUILD:-0}
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
if [ "$LIBDIRSUFFIX" = "64" ]; then
ARCHIVENAME="ci86.lina64"
else
ARCHIVENAME="ci86.lina32"
fi
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $ARCHIVENAME-$VERSION
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$ARCHIVENAME-$VERSION.tar.gz
#cat $CWD/01-patch | patch -p0 || exit
mv $ARCHIVENAME-$VERSION $PRGNAM-$VERSION
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 {} \+
mkdir -p $PKG/usr/share/$PRGNAM
mkdir -p $PKG/usr/man/man1
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
mkdir -p $PKG/usr/bin
cp $TMP/$PRGNAM-$VERSION/lina.1 $PKG/usr/man/man1
cp $TMP/$PRGNAM-$VERSION/ci86.* $PKG/usr/doc/$PRGNAM-$VERSION
cp $TMP/$PRGNAM-$VERSION/forth.lab $PKG/usr/share/$PRGNAM
cp $TMP/$PRGNAM-$VERSION/COPYING $PKG/usr/doc/$PRGNAM-$VERSION
cp $TMP/$PRGNAM-$VERSION/READMElina.txt $PKG/usr/doc/$PRGNAM-$VERSION
cp $TMP/$PRGNAM-$VERSION/hellow.frt $PKG/usr/doc/$PRGNAM-$VERSION
cp $TMP/$PRGNAM-$VERSION/wc.script $PKG/usr/doc/$PRGNAM-$VERSION
cp $TMP/$PRGNAM-$VERSION/mywc $PKG/usr/doc/$PRGNAM-$VERSION
if [ "$LIBDIRSUFFIX" = "64" ]; then
$TMP/$PRGNAM-$VERSION/lina64 -g 90 lina64+
rm $TMP/$PRGNAM-$VERSION/lina64
mkdir -p /usr/share/$PRGNAM
cp $TMP/$PRGNAM-$VERSION/forth.lab /usr/share/$PRGNAM/forth.lab
$TMP/$PRGNAM-$VERSION/lina64+ -i $PKG/usr/bin/lina64 /usr/share/$PRGNAM/forth.lab
chmod 755 $PKG/usr/bin/lina64
ln -s lina64 $PKG/usr/bin/lina
else
$TMP/$PRGNAM-$VERSION/lina32 -g 60 lina32+
rm $TMP/$PRGNAM-$VERSION/lina32
mkdir -p /usr/share/$PRGNAM
cp $TMP/$PRGNAM-$VERSION/forth.lab /usr/share/$PRGNAM/forth.lab
$TMP/$PRGNAM-$VERSION/lina32+ -i $PKG/usr/bin/lina32 /usr/share/$PRGNAM/forth.lab
chmod 755 $PKG/usr/bin/lina32
ln -s lina32 $PKG/usr/bin/lina
fi
rm -rf /usr/share/$PRGNAM
gzip -9 $PKG/usr/man/man*/*
#strip $PKG/usr/bin/*
find $PKG/usr/doc/$PRGNAM-$VERSION -type f -exec chmod 0644 {} \+
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
chmod 644 $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

View file

@ -0,0 +1,10 @@
PRGNAM="ciforth"
VERSION="5.4.1"
HOMEPAGE="https://home.hccnet.nl/a.w.m.van.der.horst/ciforth.html"
DOWNLOAD="https://github.com/albertvanderhorst/ciforth/releases/download/CVS_REL-5-4-0/ci86.lina32-5.4.1.tar.gz"
MD5SUM="32643858b274e4c926ecd9ef9876b5a4"
DOWNLOAD_x86_64="https://github.com/albertvanderhorst/ciforth/releases/download/CVS_REL-5-4-0/ci86.lina64-5.4.1.tar.gz"
MD5SUM_x86_64="b9dd59452487c73cac1a40d79d75b699"
REQUIRES=""
MAINTAINER="Zbigniew Baniewski"
EMAIL="Zbigniew [dot] Baniewski [at] gmail [dot] com"

View file

@ -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------------------------------------------------------|
ciforth: ciforth (common Intel Forth)
ciforth: The package contains lina -- linux native customization of ciforth
ciforth:
ciforth: An interpret environment and compiler for Forth. It is (large and
ciforth: by) compliant with the ISO Forth standard; the CORE wordset is fully
ciforth: implemented. The small, classic, indirect threaded kernel contains
ciforth: the essential, i.a. file access and exceptions. Its power is
ciforth: multiplied by an extensive source library.
ciforth:
ciforth: https://home.hccnet.nl/a.w.m.van.der.horst/ciforth.html
ciforth: Licence: GNU LGPL V2