summaryrefslogtreecommitdiff
path: root/libraries
diff options
context:
space:
mode:
Diffstat (limited to 'libraries')
-rw-r--r--libraries/glktermw/README9
-rw-r--r--libraries/glktermw/glktermw.SlackBuild106
-rw-r--r--libraries/glktermw/glktermw.info10
-rw-r--r--libraries/glktermw/slack-desc19
4 files changed, 144 insertions, 0 deletions
diff --git a/libraries/glktermw/README b/libraries/glktermw/README
new file mode 100644
index 0000000000..62a513284e
--- /dev/null
+++ b/libraries/glktermw/README
@@ -0,0 +1,9 @@
+glktermw (library for textmode interactive fiction)
+
+Glk defines a portable API (programming interface) for applications with
+text UIs (user interfaces.) It was primarily designed for interactive
+fiction, but it should be suitable for many interactive text utilities,
+particularly those based on a command line.
+
+glktermw is a curses (ncurses) implementation of the Glk API, with wide
+character (aka Unicode) support.
diff --git a/libraries/glktermw/glktermw.SlackBuild b/libraries/glktermw/glktermw.SlackBuild
new file mode 100644
index 0000000000..852a4ac82b
--- /dev/null
+++ b/libraries/glktermw/glktermw.SlackBuild
@@ -0,0 +1,106 @@
+#!/bin/sh
+
+# Slackware build script for glktermw
+
+# Written by B. Watson (yalhcru@gmail.com)
+
+# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+
+# Notes:
+
+# Upstream doesn't support shared libraries. I could patch the Makefile
+# and do a shared lib, but I'd be inventing my own shared-lib versioning
+# scheme (see office/mupdf/README_shared.txt for my reasons not to want
+# to do this).
+
+# Using -Os rather than -O2 in SLKCFLAGS. This makes the static library
+# 15% smaller with no noticeable difference in speed, since a text game
+# spends most of its time waiting for the user to type something. Please,
+# SBo admins, don't change this unless you have evidence that the
+# optimization is causing an actual problem with running software that
+# links to the library. Currently only one thing links with it (fizmo)
+# and I've tested it pretty thoroughly.
+
+# The includes get installed in /usr/include/glktermw instead of directly
+# in /usr/include as upstream recommends. This is because remglk (another
+# glk implementation) wants to install slightly different headers in
+# the same place... so both get subdirectories.
+
+PRGNAM=glktermw
+VERSION=${VERSION:-1.0.4}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-Os -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-Os -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-Os -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-Os"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+# tarball inner dir name, *not* the same as PRGNAM. Grr.
+DIRNAM=glkterm
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $DIRNAM
+tar xvf $CWD/$PRGNAM-${VERSION//./}.tar.gz
+cd $DIRNAM
+
+# no subdirs, no scripts, no need for the huge find|chown template stuff.
+chown -R root:root .
+chmod 644 *
+
+# The readme.txt says to edit gtoption.h if needed; we don't need to.
+# The -Wno-endif-labels quiets some pointless warnings (about comments,
+# not labels, despite the warning's name).
+make OPTIONS="$SLKCFLAGS -Wno-endif-labels"
+
+# Careful, warrior! strip strips too much from a static lib by default.
+strip --strip-unneeded lib$PRGNAM.a
+
+# No install target, Makefile comments explain how to install it.
+# Make.glktermw really shouldn't go in /usr/include, it's *not* a C
+# include (it's a Makefile include), but that's where upstream wants it,
+# and where stuff that builds with glktermw looks for it (?)
+# The Makefile says we only need to install glk.h and glkstart.h,
+# but fizmo wants to include gi_blorb.h. Also gi_dispa.h looks like
+# public API stuff.
+mkdir -p $PKG/usr/lib$LIBDIRSUFFIX $PKG/usr/include/$PRGNAM
+cat lib$PRGNAM.a > $PKG/usr/lib$LIBDIRSUFFIX/lib$PRGNAM.a
+for i in glk.h glkstart.h Make.$PRGNAM gi_*.h; do
+ cat $i > $PKG/usr/include/$PRGNAM/$i
+done
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a *.txt $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:-tgz}
diff --git a/libraries/glktermw/glktermw.info b/libraries/glktermw/glktermw.info
new file mode 100644
index 0000000000..855a5e8c0b
--- /dev/null
+++ b/libraries/glktermw/glktermw.info
@@ -0,0 +1,10 @@
+PRGNAM="glktermw"
+VERSION="1.0.4"
+HOMEPAGE="http://www.ifarchive.org/if-archive/programming/glk/glk-spec.txt"
+DOWNLOAD="http://www.ifarchive.org/if-archive/programming/glk/implementations/glktermw-104.tar.gz"
+MD5SUM="050aeb964140f7e11f555e06a23ccb1d"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="B. Watson"
+EMAIL="yalhcru@gmail.com"
diff --git a/libraries/glktermw/slack-desc b/libraries/glktermw/slack-desc
new file mode 100644
index 0000000000..39d8e3b028
--- /dev/null
+++ b/libraries/glktermw/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------------------------------------------------------|
+glktermw: glktermw (library for textmode interactive fiction)
+glktermw:
+glktermw: Glk defines a portable API (programming interface) for applications
+glktermw: with text UIs (user interfaces.) It was primarily designed for
+glktermw: interactive fiction, but it should be suitable for many interactive
+glktermw: text utilities, particularly those based on a command line.
+glktermw:
+glktermw: glktermw is a curses (ncurses) implementation of the Glk API, with
+glktermw: wide character (aka Unicode) support.
+glktermw:
+glktermw: