summaryrefslogtreecommitdiffstats
path: root/development/inform/inform.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'development/inform/inform.SlackBuild')
-rw-r--r--development/inform/inform.SlackBuild64
1 files changed, 45 insertions, 19 deletions
diff --git a/development/inform/inform.SlackBuild b/development/inform/inform.SlackBuild
index f7aff75bca..0e5e1a7083 100644
--- a/development/inform/inform.SlackBuild
+++ b/development/inform/inform.SlackBuild
@@ -2,10 +2,20 @@
# Slackware build script for inform
-# Written by B. Watson (yalhcru@gmail.com)
+# Written by B. Watson (urchlay@slackware.uk)
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+# 20230118 bkw: updated for v6.41_r2.
+# - add the Inform 6 Addendum to the package.
+# - destdir.diff had to change, can't build previous version any more.
+# - symlink library demos and tutorial to doc dir.
+
+# 20210831 bkw:
+# - updated for v6.35_r2 (upstream changed their version numbering
+# scheme again). script had to change a lot, so can't build old
+# versions any more.
+
# 20201104 bkw: updated for 6.34_6.12.4. In case anyone's wondering
# why I use a self-hosted URL for the source, it's because upstream
# moves the old source immediately when a new release is made. Also
@@ -24,7 +34,7 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=inform
-VERSION=${VERSION:-6.34_6.12.4_1}
+VERSION=${VERSION:-6.41_r2}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -37,9 +47,6 @@ if [ -z "$ARCH" ]; then
esac
fi
-# 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
@@ -82,19 +89,20 @@ find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
\! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
# 20201104 bkw: Since inform is for game purposes, install the binary
-# to /usr/games, and its man page to section 6.
-sed '1s/"1"/"6"/' $PRGNAM.1 > $PRGNAM.6
+# to /usr/games, and its man page to section 6. Also change the
+# "see also" to a man page that actually might exist.
+sed -e '1s/"1"/"6"/' -e "s,zcode-interpreter,frotz," $PRGNAM.1 > $PRGNAM.6
-# 20201105 bkw: Minor fixes to Makefile so parallel builds work.
-patch -p1 < $CWD/parallel_make.diff
+# 20201104 bkw: upstream now supports DESTDIR again.
+# 20210831 bkw: upstream *broke* DESTDIR again. Sigh.
+patch -p1 < $CWD/destdir.diff
-# 20201104 bkw: Don't write to real $PREFIX! Just disable the CASETEST
-# stuff, since we're including our own set of symlinks.
-sed -i '/touch.*PREFIX/,+2d' Makefile
+# 20210831 bkw: install-strip failed with "text file busy" on -current,
+# use -Wl,-s to build the binary stripped in the first place.
-# 20201104 bkw: upstream now supports DESTDIR again.
-make install-strip \
+make install \
OPTS="$SLKCFLAGS" \
+ LDFLAGS="-Wl,-s" \
BINDIR=/usr/games \
MANDIR=/usr/man/man6 \
MANPAGE=$PRGNAM.6 \
@@ -116,12 +124,12 @@ ln -s ../games/$PRGNAM $PKG/usr/bin/$PRGNAM
# Makefile can create a few symlinks to support this, but let's
# be more all-inclusive. We got 8 .h files, and end up with 70+
# symlinks. There's no kill like overkill!
-( cd $PKG/usr/share/$PRGNAM/lib
+( cd $PKG/usr/share/$PRGNAM/std/lib
for file in *.h; do
name=${file%%.*}
# Name.h NAME.h
for link in ${name^}.h ${name^^}.h; do
- ln -s $file $link
+ ln -sf $file $link
done
done
@@ -133,7 +141,7 @@ ln -s ../games/$PRGNAM $PKG/usr/bin/$PRGNAM
InfGlk InfGLK infGlk infGLK \
LinkLpa LinkLPA linkLpa linkLPA
do
- ln -s ${link,,}.h $link.h
+ ln -sf ${link,,}.h $link.h
done
# Any of the above might appear with .H. Use readlink so all the
@@ -141,7 +149,9 @@ ln -s ../games/$PRGNAM $PKG/usr/bin/$PRGNAM
# This might be overcautious: the example code all just says
# e.g. 'Include "Parser"', without the .h.
for file in *.h; do
- ln -s $( readlink $file ) ${file%%.*}.H
+ dest="${file%%.*}.H"
+ [ -L "$file" ] && file="$( readlink $file )"
+ ln -sf $file $dest
done
)
@@ -157,10 +167,26 @@ mkdir -p $PKGDOC/manual
# Inform Beginners' Guide, required reading.
cat $CWD/IBG.pdf > $PKGDOC/inform_beginners_guide.pdf
+ln -s inform_beginners_guide.pdf $PKGDOC/IBG.pdf
+# Also the addendum to the manual, because the manual's a bit dated.
+cat $CWD/I6-Addendum.html > $PKGDOC/inform_6_addendum.html
+ln -s inform_6_addendum.html $PKGDOC/I6-Addendum.html
+
+# Library documentation should be visibile in /usr/doc.
mkdir -p $PKGDOC/lib
for i in ChangeLog README.txt voices_and_tenses.txt; do
- ln -s ../../../share/$PRGNAM/lib/$i $PKGDOC/lib
+ ln -s ../../../share/$PRGNAM/std/lib/$i $PKGDOC/lib
+done
+
+# 20230118 bkw: Demos and tutorial will be easier to find if they're
+# visible from the doc dir.
+ln -s ../../share/inform/std/{demos,tutor} $PKGDOC
+
+# Same for punyinform docs.
+mkdir -p $PKGDOC/punyinform
+for i in README.md LICENSE documentation; do
+ ln -s ../../../share/$PRGNAM/punyinform/$i $PKGDOC/punyinform
done
# ARTISTIC and COPYING are redundant: src/licence.txt includes the