aboutsummaryrefslogtreecommitdiff
path: root/libraries
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2024-03-07 10:29:07 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2024-03-09 06:18:06 +0700
commit22202a79c98b89afc9d977ec0e80850dc93246ae (patch)
treed7932d16c630c56a00e1376438d1b0a80dfcfbe9 /libraries
parent1500b39f3c2d3d53ae94cd150732cfd311b68c73 (diff)
libraries/cheapglk: Added (Cheapass Implementation of the Glk API).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'libraries')
-rw-r--r--libraries/cheapglk/README10
-rw-r--r--libraries/cheapglk/cheapglk.SlackBuild74
-rw-r--r--libraries/cheapglk/cheapglk.info10
-rw-r--r--libraries/cheapglk/slack-desc19
4 files changed, 113 insertions, 0 deletions
diff --git a/libraries/cheapglk/README b/libraries/cheapglk/README
new file mode 100644
index 000000000000..f5c0e95d03b7
--- /dev/null
+++ b/libraries/cheapglk/README
@@ -0,0 +1,10 @@
+cheapglk (cheapass implementation of the Glk API)
+
+This is the simplest possible implementation of the Glk API. It uses
+stdio.h calls (fopen, putc, getc), but not any of the curses.h calls
+(which handle cursor movement and unbuffered keyboard input.) So
+there's no way it can support multiple windows, or a status bar. In
+fact, this library only allows you to create *one* window at a time,
+and that must be a TextBuffer. Fortunately -- well, deliberately --
+TextBuffer windows are very simple; all the library has to be able to
+do is printf() straight to stdout.
diff --git a/libraries/cheapglk/cheapglk.SlackBuild b/libraries/cheapglk/cheapglk.SlackBuild
new file mode 100644
index 000000000000..d4390e08e2c0
--- /dev/null
+++ b/libraries/cheapglk/cheapglk.SlackBuild
@@ -0,0 +1,74 @@
+#!/bin/bash
+
+# Slackware build script for cheapglk
+
+# Written by B. Watson (urchlay@slackware.uk)
+
+# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=cheapglk
+VERSION=${VERSION:-1.0.6}
+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-$PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$PRGNAM-$VERSION
+chown -R root:root .
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} +
+
+make OPTIONS="$SLKCFLAGS"
+mkdir -p $PKG/usr/include/$PRGNAM $PKG/usr/lib$LIBDIRSUFFIX
+cp -a *.h Make.cheapglk $PKG/usr/include/$PRGNAM
+cp -a libcheapglk.a $PKG/usr/lib$LIBDIRSUFFIX
+
+PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
+mkdir -p $PKGDOC
+cp -a LICENSE* README* $PKGDOC
+cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$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
diff --git a/libraries/cheapglk/cheapglk.info b/libraries/cheapglk/cheapglk.info
new file mode 100644
index 000000000000..2eec3c091a2b
--- /dev/null
+++ b/libraries/cheapglk/cheapglk.info
@@ -0,0 +1,10 @@
+PRGNAM="cheapglk"
+VERSION="1.0.6"
+HOMEPAGE="https://github.com/erkyrath/cheapglk"
+DOWNLOAD="https://github.com/erkyrath/cheapglk/archive/cheapglk-1.0.6/cheapglk-cheapglk-1.0.6.tar.gz"
+MD5SUM="a6d56a025a362bb3e10d290527c9fb61"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="B. Watson"
+EMAIL="urchlay@slackware.uk"
diff --git a/libraries/cheapglk/slack-desc b/libraries/cheapglk/slack-desc
new file mode 100644
index 000000000000..f6fa0eb938db
--- /dev/null
+++ b/libraries/cheapglk/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------------------------------------------------------|
+cheapglk: cheapglk (cheapass implementation of the Glk API)
+cheapglk:
+cheapglk: This is the simplest possible implementation of the Glk API. It uses
+cheapglk: stdio.h calls (fopen, putc, getc), but not any of the curses.h calls
+cheapglk: (which handle cursor movement and unbuffered keyboard input.) So
+cheapglk: there's no way it can support multiple windows, or a status bar. In
+cheapglk: fact, this library only allows you to create *one* window at a time,
+cheapglk: and that must be a TextBuffer. Fortunately -- well, deliberately --
+cheapglk: TextBuffer windows are very simple; all the library has to be able to
+cheapglk: do is printf() straight to stdout.
+cheapglk: