diff options
Diffstat (limited to 'development/4th')
-rw-r--r-- | development/4th/01-if_for_64bit.patch | 19 | ||||
-rw-r--r-- | development/4th/02-directories.patch | 32 | ||||
-rw-r--r-- | development/4th/4th.SlackBuild | 85 | ||||
-rw-r--r-- | development/4th/4th.info | 10 | ||||
-rw-r--r-- | development/4th/README | 7 | ||||
-rw-r--r-- | development/4th/slack-desc | 19 |
6 files changed, 172 insertions, 0 deletions
diff --git a/development/4th/01-if_for_64bit.patch b/development/4th/01-if_for_64bit.patch new file mode 100644 index 0000000000000..51aa0d8a1178a --- /dev/null +++ b/development/4th/01-if_for_64bit.patch @@ -0,0 +1,19 @@ +diff -Nur 4th-3.61.2-unix/sources/4th.h 4th-3.61.2-unix.new/sources/4th.h +--- 4th-3.61.2-unix/sources/4th.h 2009-11-20 23:52:02.000000000 +0000 ++++ 4th-3.61.2-unix.new/sources/4th.h 2011-08-15 19:55:51.674547949 +0000 +@@ -60,11 +60,11 @@ + #define M4DUPNAM 26 + #define M4CABORT 27 + +-#define CELL_MIN LONG_MIN +-#define CELL_MAX LONG_MAX +-#define strtocell(a,b,c) strtol((a),(b),(c)) ++#define CELL_MIN INT_MIN ++#define CELL_MAX INT_MAX ++#define strtocell(a,b,c) (int)strtol((a),(b),(c)) + +-typedef long cell; ++typedef int cell; + typedef unsigned char unit; + + typedef struct { diff --git a/development/4th/02-directories.patch b/development/4th/02-directories.patch new file mode 100644 index 0000000000000..a16070aff1ce1 --- /dev/null +++ b/development/4th/02-directories.patch @@ -0,0 +1,32 @@ +diff -Nur 4th-3.61.2-unix/sources/Makefile 4th-3.61.2-unix.new/sources/Makefile +--- 4th-3.61.2-unix/sources/Makefile 2011-08-18 20:34:47.000000000 +0000 ++++ 4th-3.61.2-unix.new/sources/Makefile 2011-08-20 01:10:29.653081410 +0000 +@@ -16,13 +16,13 @@ + + # The following variables may need to be changed + +-LIBRARIES=/usr/lib +-INCLUDES=/usr/include +-BINARIES=/usr/local/bin +-MANDIR=/usr/share/man +-DOCDIR=/usr/share/doc ++LIBRARIES=$(DESTDIR)/usr/lib$(LIBSUFFIX) ++INCLUDES=$(DESTDIR)/usr/include ++BINARIES=$(DESTDIR)/usr/bin ++MANDIR=$(DESTDIR)/usr/man ++DOCDIR=$(DESTDIR)/usr/doc + SOURCES=../4th +-CFLAGS= -DUNIX -fsigned-char -Wall -O3 -s ++CFLAGS=$(CXXFLAGS) -DUNIX -fsigned-char -Wall -s + + # Cross compilation variables + LD=$(CROSS)ld +@@ -125,7 +125,7 @@ + + install: mostlyinstall + install -Dm644 ../documentation/4th.1 $(MANDIR)/man1/4th.1 +- install -Dm644 ../documentation/4tHmanual.txt $(DOCDIR)/4th/ ++ install -Dm644 ../documentation/4tHmanual.txt $(DOCDIR)/4th-3.61.2/ + + uninstall: + -rm -f $(LIBRARIES)/lib4th.{a,so*} diff --git a/development/4th/4th.SlackBuild b/development/4th/4th.SlackBuild new file mode 100644 index 0000000000000..0fe35855a42a7 --- /dev/null +++ b/development/4th/4th.SlackBuild @@ -0,0 +1,85 @@ +#!/bin/sh + +# Slackware build script for 4th + +# Written by Zbigniew Baniewski, zb@ispid.com.pl + +PRGNAM=4th +VERSION=3.61.2 +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i486 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -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-unix +tar xvf $CWD/$PRGNAM-$VERSION-unix.tar.gz +cat $CWD/02-directories.patch | patch -p0 || exit +cd $PRGNAM-$VERSION-unix/sources +chown -R root:root . +find . \ + \( -perm 777 -o -perm 775 -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 {} \; + +if [ "$ARCH" = "x86_64" ]; then + cat $CWD/01-if_for_64bit.patch | patch -p2 || exit + cp include/* . +fi + +mkdir -p $PKG/usr/lib$LIBDIRSUFFIX +mkdir -p $PKG/usr/man/man1 +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/examples +mkdir -p $PKG/usr/bin +CXXFLAGS="$SLKCFLAGS" make +make install DESTDIR="$PKG" LIBSUFFIX="$LIBDIRSUFFIX" + +cp $TMP/$PRGNAM-$VERSION-unix/documentation/4th.1 $PKG/usr/man/man1 +cp $TMP/$PRGNAM-$VERSION-unix/documentation/*.txt $PKG/usr/doc/$PRGNAM-$VERSION +cp $TMP/$PRGNAM-$VERSION-unix/4th/.directory $PKG/usr/doc/$PRGNAM-$VERSION +cp $TMP/$PRGNAM-$VERSION-unix/COPYING $PKG/usr/doc/$PRGNAM-$VERSION +cp $TMP/$PRGNAM-$VERSION-unix/README $PKG/usr/doc/$PRGNAM-$VERSION +cp -r $TMP/$PRGNAM-$VERSION-unix/4th/* $PKG/usr/doc/$PRGNAM-$VERSION/examples +find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +find $PKG/usr/man -type f -exec gzip -9 {} \; +for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done + +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:-tgz} diff --git a/development/4th/4th.info b/development/4th/4th.info new file mode 100644 index 0000000000000..59403c57cd2f3 --- /dev/null +++ b/development/4th/4th.info @@ -0,0 +1,10 @@ +PRGNAM="4th" +VERSION="3.61.2" +HOMEPAGE="http://thebeez.home.xs4all.nl/4tH/" +DOWNLOAD="http://4th.googlecode.com/files/4th-3.61.2-unix.tar.gz" +MD5SUM="b2730f7b68c91510e1b3762ab08d641b" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +MAINTAINER="Zbigniew Baniewski" +EMAIL="zb@ispid.com.pl" +APPROVED="" diff --git a/development/4th/README b/development/4th/README new file mode 100644 index 0000000000000..dfdcb3236d96a --- /dev/null +++ b/development/4th/README @@ -0,0 +1,7 @@ +4tH is basic framework for creating application specific scripting +languages. It is a library of functions centered around a virtual +machine, which guarantees high performance, ease of use and low overhead. + +But in the meanwhile 4tH has acquired a reputation as an educational +tool. Its simplicity makes it perfectly suited to learn Forth, from which +it has been derived. diff --git a/development/4th/slack-desc b/development/4th/slack-desc new file mode 100644 index 0000000000000..a30d98944dfac --- /dev/null +++ b/development/4th/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 ':'. + + |-----handy-ruler------------------------------------------------------| +4th: 4th (The friendly Forth compiler/interpreter) +4th: +4th: It detects virtually every error and reports what and where +4th: they occur, but is still fast and compact. +4th: +4th: http://www.gnu.org/software/4th/ +4th: +4th: Licence: GNU LGPL V3 +4th: +4th: +4th: |