diff --git a/games/miscom/README b/games/miscom/README new file mode 100644 index 0000000000..a29c09295c --- /dev/null +++ b/games/miscom/README @@ -0,0 +1,14 @@ +miscom (textmode Missile Command clone) + +In miscom you must defend cities from missile attack. You do this by +launching missiles of your own (in a point-and-blast fashion) to destroy +the enemy missiles before they land. + +Miscom is a curses-based game, so it should work on any terminal. (You'll +need 9600 baud or better for it to be playable.) It supports colour +and sound. + +Miscom is an older game that uses OSS for audio. By default, this script +links with libaoss, which allows the game to make sound without having +OSS modules loaded. If you for some reason want to disable this (e.g. if +you run OSSv4 for audio), export AOSS=no in the script's environment. diff --git a/games/miscom/fixwarnings.diff b/games/miscom/fixwarnings.diff new file mode 100644 index 0000000000..41b00f00cf --- /dev/null +++ b/games/miscom/fixwarnings.diff @@ -0,0 +1,66 @@ +diff -Naur miscom/fire.c miscom.patched/fire.c +--- miscom/fire.c 1997-03-15 15:42:10.000000000 -0500 ++++ miscom.patched/fire.c 2016-10-03 19:58:35.332473407 -0400 +@@ -66,7 +66,7 @@ + } + + if (found==0) +- fprintf(stderr,"can't happen\n"),bombout(); ++ fprintf(stderr,"can't happen\n"),bombout(0); + + fireballs[a].x=x; + fireballs[a].y=y; +diff -Naur miscom/main.c miscom.patched/main.c +--- miscom/main.c 1998-01-22 11:30:32.000000000 -0500 ++++ miscom.patched/main.c 2016-10-03 19:58:24.480472716 -0400 +@@ -451,7 +451,7 @@ + define_colours(); + + if((keyptr=open("/dev/tty",O_RDONLY|O_NONBLOCK))<0) +- fprintf(stderr,"Couldn't open /dev/tty."),bombout(); ++ fprintf(stderr,"Couldn't open /dev/tty."),bombout(0); + + srandom(time(NULL)); + signal(SIGINT,bombout); +diff -Naur miscom/sound.c miscom.patched/sound.c +--- miscom/sound.c 1997-03-15 12:17:45.000000000 -0500 ++++ miscom.patched/sound.c 2016-10-03 19:54:26.923457583 -0400 +@@ -5,6 +5,7 @@ + #include + #include + #include ++#include + #include "sound.h" + + int sound=1; +diff -Naur miscom/unix.c miscom.patched/unix.c +--- miscom/unix.c 1997-03-15 12:00:27.000000000 -0500 ++++ miscom.patched/unix.c 2016-10-03 19:59:02.386475130 -0400 +@@ -4,6 +4,8 @@ + #include + #include + #include ++#include ++#include + + #include "global.h" + #include "draw.h" +@@ -78,7 +80,7 @@ + } + + +-void bombout() ++void bombout(int unused) + { + queuesam(KILL_SNDSERV,0); + use_colour(COLOR_WHITE,A_NORMAL); +diff -Naur miscom/unix.h miscom.patched/unix.h +--- miscom/unix.h 1997-03-14 21:50:59.000000000 -0500 ++++ miscom.patched/unix.h 2016-10-03 19:59:10.686475659 -0400 +@@ -1,5 +1,5 @@ + extern unsigned char getnbkey(void); +-extern void bombout(void); ++extern void bombout(int unused); + extern void key_pause(void); + extern int numalive(void); + extern void centre(char* buffer,int y); diff --git a/games/miscom/miscom.SlackBuild b/games/miscom/miscom.SlackBuild new file mode 100644 index 0000000000..d165820763 --- /dev/null +++ b/games/miscom/miscom.SlackBuild @@ -0,0 +1,84 @@ +#!/bin/sh + +# Slackware build script for miscom + +# Written by B. Watson (yalhcru@gmail.com) + +# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. + +PRGNAM=miscom +VERSION=${VERSION:-1.0} +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="-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 +tar xvf $CWD/$PRGNAM.tar.gz +cd $PRGNAM +chown -R root:root . + +# upstream's permissions are fugly. +chmod 644 * +chmod 755 sounds +chmod 644 sounds/* + +# fix compiler warnings, some of which might actually cause problems. +patch -p1 < $CWD/fixwarnings.diff + +# build with libaoss unless user disables it. +if [ "${AOSS:-yes}" = "yes" ]; then + sed -i '/^LIBS/s,$, -laoss,' Makefile +fi + +# use our flags. +sed -i "s,-O,-Wall $SLKCFLAGS," Makefile + +# default datadir is weird. +make DATADIR=/usr/share/games/$PRGNAM + +# manual install since the permissions are weird. +mkdir -p $PKG/usr/games $PKG/usr/man/man6 $PKG/usr/share/games/$PRGNAM +install -s -m0755 $PRGNAM $PKG/usr/games +gzip -9c < $PRGNAM.6 > $PKG/usr/man/man6/$PRGNAM.6.gz +cp -r sounds/* $PKG/usr/share/games/$PRGNAM + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a COPYING README ChangeLog TODO $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/miscom/miscom.info b/games/miscom/miscom.info new file mode 100644 index 0000000000..f7ddf35ea2 --- /dev/null +++ b/games/miscom/miscom.info @@ -0,0 +1,10 @@ +PRGNAM="miscom" +VERSION="1.0" +HOMEPAGE="https://svnweb.freebsd.org/ports/head/games/miscom/" +DOWNLOAD="http://distcache.FreeBSD.org/ports-distfiles/miscom.tar.gz" +MD5SUM="c09a7b119ea4d742efa08a74d14d8bfb" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="B. Watson" +EMAIL="yalhcru@gmail.com" diff --git a/games/miscom/slack-desc b/games/miscom/slack-desc new file mode 100644 index 0000000000..c7bd6f93b5 --- /dev/null +++ b/games/miscom/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------------------------------------------------------| +miscom: miscom (textmode Missile Command clone) +miscom: +miscom: In miscom you must defend cities from missile attack. You do this +miscom: by launching missiles of your own (in a point-and-blast fashion) +miscom: to destroy the enemy missiles before they land. +miscom: +miscom: Miscom is a curses-based game, so it should work on any +miscom: terminal. (You'll need 9600 baud or better for it to be playable.) It +miscom: supports colour and sound. +miscom: +miscom: