diff options
author | Judah Milgram <milgram cgpp com> | 2024-06-15 07:11:13 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2024-06-15 07:37:53 +0700 |
commit | 784b0586ba35309f091ace5df94aae1516015cb1 (patch) | |
tree | ee7d450bb2cdddcba9c094b0ba821838d86ab1f8 /games | |
parent | 84a8a2ee5254a3ab4862a300fba0a68b63ce3821 (diff) |
games/xconq: Added (The School for Strategy).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games')
-rw-r--r-- | games/xconq/README | 15 | ||||
-rw-r--r-- | games/xconq/doinst.sh | 13 | ||||
-rw-r--r-- | games/xconq/slack-desc | 19 | ||||
-rw-r--r-- | games/xconq/xconq.SlackBuild | 124 | ||||
-rw-r--r-- | games/xconq/xconq.info | 10 | ||||
-rw-r--r-- | games/xconq/xconq.patch | 152 |
6 files changed, 333 insertions, 0 deletions
diff --git a/games/xconq/README b/games/xconq/README new file mode 100644 index 000000000000..3cec4cadc907 --- /dev/null +++ b/games/xconq/README @@ -0,0 +1,15 @@ + +xconq, a classic X-based strategic wargame. + +Save the world from the evil empires attempting to take +over. Multi-player over a network or single-player against the +machine. This is xconq v. 5.5.1a, the last stable version of xconq +version 5, from July of 1992. (Later versions through v. 7.5 are +available with revamped interface.) + +Options are available to set numbers and kinds of players, as well +as the map used. In addition, xconq has extensive and elaborate +facilities for building maps, scenarios, and historical periods, +resulting in a wide variety of games. This SlackBuild builds only +the "standard" period, corresponding roughly to the mid-to late +20th century. diff --git a/games/xconq/doinst.sh b/games/xconq/doinst.sh new file mode 100644 index 000000000000..2989e06f3178 --- /dev/null +++ b/games/xconq/doinst.sh @@ -0,0 +1,13 @@ +# Update mkfontscale and mkfontdir: +if [ -x /usr/bin/mkfontdir ]; then + ( cd /usr/share/fonts/misc + mkfontscale . + mkfontdir . + ) +fi + +xset fp rehash + +# sbopkglint complains if we don't mention fc-cache. +# There. Happy now? + diff --git a/games/xconq/slack-desc b/games/xconq/slack-desc new file mode 100644 index 000000000000..f29f427b4a62 --- /dev/null +++ b/games/xconq/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------------------------------------------------------| +xconq: xconq (X-based strategic wargame) +xconq: +xconq: Multi-player or single-player against the machine. Save the world +xconq: from the evil empires attempting to take over. Extensive and +xconq: elaborate facilities for building maps, scenarios, and historical +xconq: periods, resulting in a wide variety of games. +xconq: +xconq: Home page: https://sourceware.org/xconq/ +xconq: +xconq: +xconq: diff --git a/games/xconq/xconq.SlackBuild b/games/xconq/xconq.SlackBuild new file mode 100644 index 000000000000..677ec3979fe6 --- /dev/null +++ b/games/xconq/xconq.SlackBuild @@ -0,0 +1,124 @@ +#!/bin/bash + +# Slackware build script for xconq + +# Copyright 2024 Judah Milgram, Washington DC +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +cd $(dirname $0) ; CWD=$(pwd) + +PRGNAM=xconq +VERSION=${VERSION:-5.5.1a} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} + +# Fix tarball name: +ln -s xc${VERSION}.tar.gz ${PRGNAM}-${VERSION}.tar.gz + +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" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" +elif [ "$ARCH" = "aarch64" ]; then + SLKCFLAGS="-O2 -fPIC" +else + SLKCFLAGS="-O2" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-${VERSION}.tar.gz +mv xc5.5.1 $PRGNAM-$VERSION +cd $PRGNAM-$VERSION + +chown -R root:root . + +# Patch +patch < $CWD/xconq.patch + +find -L . \ + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + +CCOPTIONS="${SLKCFLAGS} -w -fcompare-debug-second" +xmkmf +make CCOPTIONS="${CCOPTIONS}" per2c +make CCOPTIONS="${CCOPTIONS}" standard.c +make depend +make CCOPTIONS="${CCOPTIONS}" all +make install DESTDIR=$PKG +install XConq.ad $PKG/etc/X11/app-defaults +make install.man DESTDIR=$PKG +make docs + +# let doinst.sh make fonts.dir and fonts.scale +for f in fonts.dir fonts.scale; do + rm $PKG/usr/share/fonts/misc/$f +done + +# Strip +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 + +# Compress +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 + +# Docs +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a \ + CHANGES README TODO custom.pdf period.pdf xconq.pdf xconq2.pdf lib/xconq.doc lib/custom.doc \ + $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +# slack-desc and doinst.sh +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh + +# Make the package +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE diff --git a/games/xconq/xconq.info b/games/xconq/xconq.info new file mode 100644 index 000000000000..3fcf182bcc6e --- /dev/null +++ b/games/xconq/xconq.info @@ -0,0 +1,10 @@ +PRGNAM="xconq" +VERSION="5.5.1a" +HOMEPAGE="https://xconq.sourceforge.net/" +DOWNLOAD="https://sourceforge.net/projects/xconq/files/xconq-unsupported/archeological-findings/xc5.5.1a.tar.gz" +MD5SUM="7d3f884eb36a31c183c6b7cb5e2a0368" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="Judah Milgram" +EMAIL="milgram cgpp com" diff --git a/games/xconq/xconq.patch b/games/xconq/xconq.patch new file mode 100644 index 000000000000..5065bb0dd5d2 --- /dev/null +++ b/games/xconq/xconq.patch @@ -0,0 +1,152 @@ +--- xc5.5.1/Imakefile 1992-07-18 19:57:53.000000000 -0400 ++++ patch/Imakefile 2024-06-14 07:26:46.131400787 -0400 +@@ -31,7 +31,7 @@ + ## The {n,t,g,sq}roff command you use to generate ASCII docs + ## from manuscript (ms) format. + +-NROFF=nroff -ms ++NROFF=groff -T pdf -ms + + + ## If you want to change any of the names, do so here +@@ -44,7 +44,7 @@ + ## XCONQLIB is where the period/map/scenario files will be installed. + ## The default is amongst other X applications libraries. + +-XCONQLIB=/tmp/judd/xconq/xconq/lib ++XCONQLIB=/usr/lib/xconq + + + ## XAPPLRESDIR is where the application resource defaults are installed. +@@ -66,12 +66,12 @@ + ## Normally this is (should be) the standard X bin directory. Modify + ## if necessary. + +-XCONQBIN=/usr/local/games/ ++XCONQBIN=/usr/bin + + + ## If your system uses different curses libs, change them here + +-CURSESLIB=-lcurses -ltermlib ++CURSESLIB=-lcurses + + + ## If your system needs strcasecmp, uncomment the definitions below. +@@ -116,7 +116,7 @@ + $(XFONTDIR) $(CRMODE) $(BCOPY) $(SELECT) $(IS_UNIX) $(USESNF) + + ## Additional make suffixes supported by this file +-.SUFFIXES: $(SUFFIXES) .ms .doc .per ++.SUFFIXES: $(SUFFIXES) .ms .pdf .per + + + ## ******* THE MAIN PROGRAM *********************** +@@ -152,13 +152,13 @@ + ## ******* DOCS *********************** + + +-.ms.doc: ++.ms.pdf: + $(NROFF) $< > $@ + +-docs: xconq.doc xconq2.doc custom.doc period.doc ++docs: xconq.pdf xconq2.pdf custom.pdf period.pdf + + clean:: +- $(RM) *.doc ++ $(RM) *.pdf + + + ## ******* PERIODS *********************** +@@ -169,7 +169,7 @@ + + .per.c: + $(RM) $@ +- per2c < $< > $@ ++ ./per2c < $< > $@ + + standard.c: per2c lib/$(PERIOD).c + $(RM) $@ +@@ -182,9 +182,9 @@ + ## ******* THE LIBRARY *********************** + + install:: ./lib +- MakeDir($(XCONQLIB)) +- for i in `ls lib`; do (set -x; \ +- $(INSTALL) -c $(INSTDATFLAGS) ./lib/$$i $(XCONQLIB)); done ++ MakeDir($(DESTDIR)$(XCONQLIB)) ++ for i in `ls lib`; do (set -x; \ ++ $(INSTALL) -c $(INSTDATFLAGS) ./lib/$$i $(DESTDIR)$(XCONQLIB)); done + + + ## ******* FONTS *********************** +@@ -205,13 +205,13 @@ + ##ifdef SnfFonts + OBJS=xconq.snf standard.snf + ##else +-OBJS=xconq.pcf standard.pcf ++OBJS=xconq.pcf.gz standard.pcf.gz + ##endif + + FontTarget(xconq) + FontTarget(standard) + MakeFonts() +-InstallFonts($(FONTDIR)/misc/xconq) ++InstallFonts($(FONTDIR)/misc) + + + ## ******** MISCELLANEOUS *********************** +--- xc5.5.1/X11.c 1992-08-15 01:15:13.000000000 -0400 ++++ patch/X11.c 2024-05-31 00:22:27.258096071 -0400 +@@ -4,6 +4,8 @@ + /* This program may be used, copied, modified, and redistributed freely */ + /* for noncommercial purposes, so long as this notice remains intact. */ + ++#include <stdlib.h> ++ + /* Interface implementations for the X11 version of xconq. */ + + #include "config.h" +@@ -310,7 +312,7 @@ + already_been_here = TRUE; + write_savefile("emergency.save.xconq"); + if (sig != 2) +- abort(1); ++ abort(); + else exit(1); + } + } +--- xc5.5.1/curses.c 1992-07-18 19:57:59.000000000 -0400 ++++ patch/curses.c 2024-06-02 00:21:45.142002331 -0400 +@@ -500,8 +500,7 @@ + + /* Beep the beeper! */ + +-beep(side) +-Side *side; ++beep(void) + { + putchar('\007'); + } +--- xc5.5.1/misc.h 1992-07-26 22:17:48.000000000 -0400 ++++ patch/misc.h 2024-06-04 00:20:00.690228027 -0400 +@@ -56,7 +56,6 @@ + #endif + void recenter(); + #ifdef UNIX +-extern char *malloc(); + extern char *getenv(); + #endif UNIX + extern int unwrap(); +--- xc5.5.1/util.c 1992-07-26 22:17:25.000000000 -0400 ++++ patch/util.c 2024-06-04 00:20:52.225579207 -0400 +@@ -10,7 +10,7 @@ + #include "map.h" + + #ifndef DEBUG +-char *procedure_executing[PROCSTACKSIZE], *routine_executing; ++char *procedure_executing[PROCSTACKSIZE]; + int procedure_stack_ptr = -1; + #endif + |