summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortron <tron@pkgsrc.org>1998-08-02 23:10:48 +0000
committertron <tron@pkgsrc.org>1998-08-02 23:10:48 +0000
commit1a262a0c684ce9c67040435cad4d6781b0d7e498 (patch)
tree7143a7c87112330590ceb059a2b64590a0a2f7d7
parent20744d084c4b10d095c4a3d4aee97e35968ff866 (diff)
downloadpkgsrc-1a262a0c684ce9c67040435cad4d6781b0d7e498.tar.gz
Improve sound support.
-rw-r--r--games/maelstrom/patches/patch-aa12
-rw-r--r--games/maelstrom/patches/patch-ac5
-rw-r--r--games/maelstrom/patches/patch-ad31
3 files changed, 39 insertions, 9 deletions
diff --git a/games/maelstrom/patches/patch-aa b/games/maelstrom/patches/patch-aa
index 4c4962aef4a..4082633aad5 100644
--- a/games/maelstrom/patches/patch-aa
+++ b/games/maelstrom/patches/patch-aa
@@ -1,13 +1,13 @@
---- Makeflags.orig Mon Jul 14 11:32:13 1997
-+++ Makeflags Thu Jul 30 04:46:45 1998
-@@ -1,8 +1,13 @@
+--- Makeflags.orig Mon Jul 14 20:32:13 1997
++++ Makeflags Mon Aug 3 00:50:27 1998
+@@ -1,12 +1,42 @@
+# This file contains the template for Makeflags
-# Some sensible defaults
-BINDIR = /usr/local/bin
-LIBDIR = /usr/local/lib/Maelstrom
+SYSTEM =
-+FEATURES =
++FEATURES = -DAUDIO_16BIT -DASYNCHRONOUS_IO -DUSE_POSIX_SIGNALS
-INSTALL = install
+LOGIC = netlogic
@@ -18,7 +18,7 @@
+BINDIR = $(PREFIX)/bin
+LIBDIR = $(PREFIX)/share/maelstrom
DATAFILES = Images/*.icon Images/*.cicn "Maelstrom Fonts" \
-@@ -10,3 +15,28 @@
+ "Maelstrom Sounds" "Maelstrom Sprites"
-all: config
+OBJS = main.o framebuf.o v_framebuf.o x11_framebuf.o vga_framebuf.o \
@@ -39,7 +39,7 @@
+X11LIBS = -lX11 -lXext -lXpm
+CSUMLIB =
+LIBS = $(EXTRALIBS) $(XPMLINKDIR) $(X11LINKDIR) $(X11LIBS) $(CSUMLIB)
-+SOUNDLIBS =
++SOUNDLIBS = -lossaudio
+
+INSTALL = /usr/bin/install
+
diff --git a/games/maelstrom/patches/patch-ac b/games/maelstrom/patches/patch-ac
index f51c2d9fc04..4c16524c145 100644
--- a/games/maelstrom/patches/patch-ac
+++ b/games/maelstrom/patches/patch-ac
@@ -1,5 +1,5 @@
--- mixer.h.orig Sun May 25 23:18:10 1997
-+++ mixer.h Sun Aug 2 20:06:20 1998
++++ mixer.h Mon Aug 3 00:51:48 1998
@@ -22,7 +22,7 @@
#include <linux/soundcard.h>
#undef sparc /* For sparc Linux */
@@ -9,11 +9,12 @@
#ifdef __SVR4 /* Solaris */
#include <sys/audioio.h>
#else /* SunOS */
-@@ -38,6 +38,9 @@
+@@ -38,6 +38,10 @@
#endif /* HPUX */
#endif /* sparc */
#endif /* linux */
+#ifdef __NetBSD__
++#include <sys/signal.h>
+#include <soundcard.h>
+#endif
};
diff --git a/games/maelstrom/patches/patch-ad b/games/maelstrom/patches/patch-ad
index b5b21db8446..2a3b2aef202 100644
--- a/games/maelstrom/patches/patch-ad
+++ b/games/maelstrom/patches/patch-ad
@@ -1,5 +1,14 @@
--- mixer.cpp.orig Thu Dec 5 14:14:44 1996
-+++ mixer.cpp Sun Aug 2 20:07:14 1998
++++ mixer.cpp Mon Aug 3 01:01:04 1998
+@@ -182,7 +182,7 @@
+ }
+
+ /* Do some system specific initialization */
+-#ifdef linux
++#if defined(linux) || defined(__NetBSD__)
+ #ifndef PLAY_DEV_AUDIO /* VoxWare */
+ if ( ioctl(dsp_fd, SNDCTL_DSP_SETFRAGMENT, &frag_spec) < 0 ) {
+ if ( complain )
@@ -285,7 +285,7 @@
/* This is necessary so that the sound server stays in sync */
long flags;
@@ -18,3 +27,23 @@
drain_it:
if ( ioctl(dsp_fd, AUDIO_DRAIN, 0) < 0 ) {
if ( errno == EINTR )
+@@ -549,13 +549,14 @@
+ write_frag:
+ if ( write(dsp_fd, clipped, frag_size*(AUDIO_BITS/8))
+ != frag_size*(AUDIO_BITS/8) ) {
+- if ( errno == EINTR ) // Interrupted system call...
++ if ( errno == EINTR) // Interrupted system call...
+ // This should happen (SA_RESTART)
+ goto write_frag;
+- else {
+- perror("Mixer: Can't write to audio device");
+- return;
+- }
++ else
++ if ( errno != EAGAIN) {
++ perror("Mixer: Can't write to audio device");
++ return;
++ }
+ }
+ #endif /* Not SGI Source */
+ } else