aboutsummaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2014-05-03 03:12:23 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2014-05-03 03:12:23 +0700
commit74a6b3a65e09e3face6db5b6fbfb493579b8222e (patch)
tree01a75d1be6de6cd08302d627da47fe2eca89717d /games
parent3c518f602bc09900a39f17c4bfacebe1694d3dd0 (diff)
games/koules: Use ALSA instead of OSS.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games')
-rw-r--r--games/koules/README4
-rw-r--r--games/koules/koules.SlackBuild13
-rw-r--r--games/koules/patches/aoss.diff30
3 files changed, 44 insertions, 3 deletions
diff --git a/games/koules/README b/games/koules/README
index 11a9c025c107d..0141c9cf7a3d9 100644
--- a/games/koules/README
+++ b/games/koules/README
@@ -11,6 +11,10 @@ quite a bit of patching to work well on a modern system...
If you're building this for use on a slow system, try setting MITSHM=yes
in the environment; it may speed things up (or not).
+The build patches koules to use ALSA for audio. If you want to disable
+the patch and use OSS, set ALSA=no in the environment (probably only
+useful if you use OSSv4).
+
If you have Tcl/Tk installed, and you're running KDE, you'll get a nice
GUI launcher dialog when you run Koules from the K menu. If you're not
running KDE, try running "koules-launcher".
diff --git a/games/koules/koules.SlackBuild b/games/koules/koules.SlackBuild
index a4326fecc3b2c..eb654a596071f 100644
--- a/games/koules/koules.SlackBuild
+++ b/games/koules/koules.SlackBuild
@@ -12,7 +12,7 @@
PRGNAM=koules
VERSION=${VERSION:-1.4}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -63,6 +63,10 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+# 20140502 bkw: modern Slackware has OSS modules disabled by default,
+# so wrap the sound server in aoss.
+[ "${ALSA:-yes}" = "yes" ] && patch -p1 < $CWD/patches/aoss.diff
+
# sound server in /usr/libexec, game data in /usr/share/koules
# also, enable sound and joystick support.
patch -p1 < $CWD/patches/slackware.diff
@@ -92,7 +96,10 @@ find . -name Makefile | \
xargs sed -i -e "s/-O2.*/$SLKCFLAGS/"
touch xkoules.man
-make
+# 20140502 bkw:
+# parallel builds sometimes (usually) work, but not always. This is
+# small enough that nobody should get too impatient even with -j1.
+make -j1
# Don't trust 'make install', it doesn't fully support DESTDIR, and
# installs things with weird permissions. Again, Imake sucks.
@@ -116,7 +123,7 @@ mkdir -p $PKG/usr/man/man6
gzip -9c x$PRGNAM.6 > $PKG/usr/man/man6/$PRGNAM.6.gz
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp README TODO ANNOUNCE BUGS COPYING Card Koules.FAQ \
+cp -a README TODO ANNOUNCE BUGS COPYING Card Koules.FAQ \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
cat $CWD/README > $PKG/usr/doc/$PRGNAM-$VERSION/README.SBo
diff --git a/games/koules/patches/aoss.diff b/games/koules/patches/aoss.diff
new file mode 100644
index 0000000000000..192784d69c862
--- /dev/null
+++ b/games/koules/patches/aoss.diff
@@ -0,0 +1,30 @@
+diff -Naur koules1.4/sound.c koules1.4.patched/sound.c
+--- koules1.4/sound.c 1998-03-04 13:59:19.000000000 -0500
++++ koules1.4.patched/sound.c 2014-05-02 03:29:02.000000000 -0400
+@@ -40,7 +40,7 @@
+ init_sound ()
+ {
+ int i, fd[2];
+- char *argv[4];
++ char *argv[5];
+ char filename[512];
+
+ signal (SIGCHLD, SIG_IGN);
+@@ -63,11 +63,12 @@
+ dup2 (fd[0], STDIN_FILENO);
+ close (fd[0]);
+ sprintf (filename, SOUNDSERVER);
+- argv[0] = filename;
+- argv[1] = unixSoundPath;
+- argv[2] = unixSoundDev;
+- argv[3] = NULL;
+- execvp (filename, argv);
++ argv[0] = "aoss";
++ argv[1] = filename;
++ argv[2] = unixSoundPath;
++ argv[3] = unixSoundDev;
++ argv[4] = NULL;
++ execvp ("aoss", argv);
+ fprintf (stderr, "Couldn't Execute Sound Server %s!\n", filename);
+ exit (0);
+ };