diff options
Diffstat (limited to 'games/hnefatafl')
-rw-r--r-- | games/hnefatafl/README | 16 | ||||
-rw-r--r-- | games/hnefatafl/hnefatafl.SlackBuild | 95 | ||||
-rw-r--r-- | games/hnefatafl/hnefatafl.info | 10 | ||||
-rw-r--r-- | games/hnefatafl/no-link-xlib.diff | 20 | ||||
-rw-r--r-- | games/hnefatafl/slack-desc | 19 |
5 files changed, 160 insertions, 0 deletions
diff --git a/games/hnefatafl/README b/games/hnefatafl/README new file mode 100644 index 0000000000000..b1c9b2c00bc15 --- /dev/null +++ b/games/hnefatafl/README @@ -0,0 +1,16 @@ +Hnefatafl is the Norse board game. It has been played in Scandinavia +since at least 400 AD. + +Hnefatafl (with any board setup) and tablut are fully supported using +rulesets. Other regional variants are partly supported. + +The program has CLI and XLib interfaces. You can play hotseat or versus +a computer player, but network play is not supported. + +To compile the program without XLib, invoke the script with +LINK_XLIB=no in the environment, e.g. + LINK_XLIB=no ./hnefatafl.SlackBuild + +Nearly all settings are compile-time options that can be changed in +`config.mk`, including language and the amount of memory that the +computer player may use for hashing. diff --git a/games/hnefatafl/hnefatafl.SlackBuild b/games/hnefatafl/hnefatafl.SlackBuild new file mode 100644 index 0000000000000..f480eff456d10 --- /dev/null +++ b/games/hnefatafl/hnefatafl.SlackBuild @@ -0,0 +1,95 @@ +#!/bin/sh + +# Slackware 14.0 build script for HNEFATAFL + +# Copyright 2013 Alexander Söderlund, Sweden. Revised 2013-07-09. +# +# Script license: CC0, see: +# http://creativecommons.org/publicdomain/zero/1.0/ +# http://creativecommons.org/publicdomain/zero/1.0/legalcode + +PRGNAM=hnefatafl +VERSION=${VERSION:-130527} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +# Automatically determine the architecture we're building on: +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 +tar xvf $CWD/$PRGNAM$VERSION.tar.bz2 +cd $PRGNAM$VERSION +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 [ ! "${LINK_XLIB:-YES}" = "YES" ]; then + patch -p1 < $CWD/no-link-xlib.diff +fi + +# See config.mk for available LANGUAGE ISO 639-2 codes. +# CFLAGS_WARN, which are optional anyway, cause warnings to be treated as +# errors, which make the no-x11 build error out +# CFLAGS_OPT_LVL defaults to -Ofast, but we want the -O2 from SLKCFLAGS +# to be used +make \ + CFLAGS_WARN="" \ + CFLAGS_OPT_LVL="" \ + CFLAGS_OPT_ARC="$SLKCFLAGS" \ + LANGUAGE="${LANGUAGE:-eng}" \ + PREFIX="/usr" \ + PREFIX_X11_LIB="/usr/lib${LIBDIRSUFFIX}" + +make install \ + LANGUAGE="${LANGUAGE:-eng}" \ + PREFIX="${PKG}/usr" \ + PREFIX_DATA_RULES_CONF="/usr/share/games/${PRGNAM}/rules" + +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +# "make install" processes, installs, and compresses the man page. Don't +# attempt to do it manually since we'd miss out on the processing part. + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a CHANGES gpl.txt fdl.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/games/hnefatafl/hnefatafl.info b/games/hnefatafl/hnefatafl.info new file mode 100644 index 0000000000000..9f8aafd9bae9f --- /dev/null +++ b/games/hnefatafl/hnefatafl.info @@ -0,0 +1,10 @@ +PRGNAM="hnefatafl" +VERSION="130527" +HOMEPAGE="http://www.oktv.se/hemsida/alexander.soderlund/prog/c/hnefatafl/hnefatafl.html" +DOWNLOAD="http://www.oktv.se/hemsida/alexander.soderlund/prog/c/hnefatafl/src/hnefatafl130527.tar.bz2" +MD5SUM="c3abe314eac2fcfcf0627ffbafe88f9b" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="Alexander Söderlund" +EMAIL="alexandersoderlund@lavabit.com" diff --git a/games/hnefatafl/no-link-xlib.diff b/games/hnefatafl/no-link-xlib.diff new file mode 100644 index 0000000000000..555dad61f17d1 --- /dev/null +++ b/games/hnefatafl/no-link-xlib.diff @@ -0,0 +1,20 @@ +--- hnefatafl130527.orig/config.mk 2013-05-31 16:39:25.000000000 -0500 ++++ hnefatafl130527/config.mk 2013-07-12 01:45:58.685050150 -0500 +@@ -93,7 +93,7 @@ + MACRO_AIM_HASH_MEM_TAB= -DHT_AI_MINIMAX_HASH_MEM_TAB=32000000 + MACRO_AIM_HASH_MEM_COL= -DHT_AI_MINIMAX_HASH_MEM_COL=48000000 + MACRO_UI_CLI= -DHT_UI_CLI +-MACRO_UI_XLIB= -DHT_UI_XLIB ++#MACRO_UI_XLIB= -DHT_UI_XLIB + MACROS= -DHT_VERSION=$(VERSION)\ + -DHT_FILE_RC_DEF=\"$(FILE_RC)\"\ + -DHT_FILE_RULE_DEF=\"$(PREFIX_DATA_RULES_CONF)/$(FILE_RULE_DEF)\"\ +@@ -119,7 +119,7 @@ + # interface). + ######################################################################## + LIB_C= -lm +-LIB_XLIB= -L$(PREFIX_X11_LIB) -lX11 -lXpm ++#LIB_XLIB= -L$(PREFIX_X11_LIB) -lX11 -lXpm + LIBS= $(LIB_C) $(LIB_XLIB) + + ######################################################################## diff --git a/games/hnefatafl/slack-desc b/games/hnefatafl/slack-desc new file mode 100644 index 0000000000000..7d107ffa97172 --- /dev/null +++ b/games/hnefatafl/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------------------------------------------------------| +hnefatafl: hnefatafl (Norse board game) +hnefatafl: +hnefatafl: Hnefatafl has been played in Scandinavia since at least 400 AD. +hnefatafl: Hnefatafl (with any board setup) and tablut are fully supported +hnefatafl: using rulesets. Other regional variants are partly supported. +hnefatafl: +hnefatafl: The program has CLI and XLib interfaces. You can play hotseat or +hnefatafl: versus a computer player, but network play is not supported. +hnefatafl: +hnefatafl: +hnefatafl: |