Subject: pkg/13899: Making games/xboing noise
To: None <gnats-bugs@gnats.netbsd.org>
From: None <rxg@ms25.url.com.tw>
List: netbsd-bugs
Date: 09/08/2001 20:15:08
>Number:         13899
>Category:       pkg
>Synopsis:       Making games/xboing noise
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sat Sep 08 05:16:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Rui-Xiang Guo
>Release:        NetBSD-1.5X
>Organization:
	
>Environment:
	
System: NetBSD rxgpc.iplus.net.tw 1.5X NetBSD 1.5X (rxgpc) #0: Tue Aug 14 22:09:37 CST 2001 rxg@rxgpc.iplus.net.tw:/home/rxg/mysys/arch/i386/compile/rxgpc i386
Architecture: i386
Machine: i386
>Description:
	Making games/xboing noise.
>How-To-Repeat:
	Let's hear sound from it. :)
>Fix:
	Please add these two patches:
patch-aa:

$NetBSD$

--- Imakefile.orig      Fri Nov 22 09:28:46 1996
+++ Imakefile
@@ -24,23 +24,23 @@
 XCOMM This is the directory where the highscore, level & sound data will be 
 XCOMM placed. Default will be the current directory.
 
-    XBOING_DIR = .
+    XBOING_DIR = $(X11BASE)/share/xboing
 
 XCOMM These are some defines that must be set. Some may be overwritten in the
 XCOMM machine arch section.
 
-    XPMLIB                             = -L/usr/X11/lib -lXpm
-    XPMINCLUDE                         = -I/usr/X11/include/X11
+    XPMLIB                     = -L$(X11BASE)/lib -lXpm
+    XPMINCLUDE                         = -I$(X11BASE)/include/X11
     XBOINGINCLUDE              = -I./include
-    LEVEL_INSTALL_DIR  = $(XBOING_DIR)/levels
+    LEVEL_INSTALL_DIR          = $(XBOING_DIR)/levels
     SOUNDS_DIR                         = $(XBOING_DIR)/sounds
     BACKUP_DIR                         = $(XBOING_DIR)/../backups
-    HIGH_SCORE_FILE    = $(XBOING_DIR)/.xboing.scr
-    AUDIO_AVAILABLE    = False
-    AUDIO_SRC                  = audio/NOaudio.c
+    HIGH_SCORE_FILE            = /var/games/xboing.scr
+    AUDIO_AVAILABLE            = True
+    AUDIO_SRC                  = audio/LINUXaudio.c
     AUDIO_INCLUDE              =
-    AUDIO_LIB                  =
-       CDEBUGFLAGS         = -g
+    AUDIO_LIB                  = -lossaudio
+    CDEBUGFLAGS                = -O
 
 XCOMM Uncomment this if you want to use ANY of the AUDIO sound systems
 #define COMPILE_IN_AUDIO    
@@ -81,7 +81,7 @@
     AUDIO_LIB          = -laudio
 #endif /* SGIArchitecture */
 
-#if defined(SparcArchitecture) && defined(COMPILE_IN_AUDIO)
+#if defined(SparcArchitecture) && defined(COMPILE_IN_AUDIO) && !defined(NetBSDA
rchitecture)
     AUDIO_AVAILABLE    = True
     AUDIO_SRC          = audio/SUNaudio.c
     AUDIO_SRC          = audio/SUNaudio.c
 
@@ -132,8 +132,8 @@
         -DLEVEL_INSTALL_DIR=\"$(LEVEL_INSTALL_DIR)\" \
         -DAUDIO_AVAILABLE=\"$(AUDIO_AVAILABLE)\" \
         -DSOUNDS_DIR=\"$(SOUNDS_DIR)\" \
-        -DREADMEP_FILE=\"$(XBOING_DIR)/docs/problems.doc\"
-XCOMM   -DUSE_FLOCK=\"True\" \
+        -DREADMEP_FILE=\"$(XBOING_DIR)/docs/problems.doc\" \
+        -DUSE_FLOCK=\"True\" \
 XCOMM   -DNEED_USLEEP=\"True\" \
 XCOMM   -DNO_LOCKING=\"True\" 
 
@@ -205,7 +205,8 @@
        @:
        @echo "Creating a highscore file " $(HIGH_SCORE_FILE)
        @touch $(HIGH_SCORE_FILE);
-       @chmod a+rw $(HIGH_SCORE_FILE);
+       @chown bin:games $(HIGH_SCORE_FILE);
+       @chmod 0664 $(HIGH_SCORE_FILE);
 
 XCOMM I use this for my daily backup of my code.

patch-ad:

$NetBSD$

--- audio/LINUXaudio.c.orig     Sat Sep  8 18:58:01 2001
+++ audio/LINUXaudio.c
@@ -55,7 +55,12 @@
 #include <unistd.h>
 #include <stdio.h>
 #include <fcntl.h>
+#include <sys/ioctl.h>
+#ifdef __NetBSD__
+#include <soundcard.h>
+#else
 #include <linux/soundcard.h>
+#endif
 
 #include "include/error.h"
 #include "include/audio.h"

And add these files into pkg/PLIST:

share/xboing/sounds/Doh1.au
share/xboing/sounds/Doh2.au
share/xboing/sounds/Doh3.au
share/xboing/sounds/Doh4.au
share/xboing/sounds/ammo.au
share/xboing/sounds/applause.au
share/xboing/sounds/ball2ball.au
share/xboing/sounds/balllost.au
share/xboing/sounds/ballshot.au
share/xboing/sounds/boing.au
share/xboing/sounds/bomb.au
share/xboing/sounds/bonus.au
share/xboing/sounds/buzzer.au
share/xboing/sounds/click.au
share/xboing/sounds/ddloo.au
share/xboing/sounds/evillaugh.au
share/xboing/sounds/game_over.au
share/xboing/sounds/gate.au
share/xboing/sounds/hithere.au
share/xboing/sounds/hypspc.au
share/xboing/sounds/intro.au
share/xboing/sounds/key.au
share/xboing/sounds/looksbad.au
share/xboing/sounds/metal.au
share/xboing/sounds/mgun.au
share/xboing/sounds/ouch.au
share/xboing/sounds/paddle.au
share/xboing/sounds/ping.au
share/xboing/sounds/shark.au
share/xboing/sounds/shoot.au
share/xboing/sounds/shotgun.au
share/xboing/sounds/spring.au
share/xboing/sounds/stamp.au
share/xboing/sounds/sticky.au
share/xboing/sounds/supbons.au
share/xboing/sounds/toggle.au
share/xboing/sounds/tone.au
share/xboing/sounds/touch.au
share/xboing/sounds/wallsoff.au
share/xboing/sounds/warp.au
share/xboing/sounds/weeek.au
share/xboing/sounds/whizzo.au
share/xboing/sounds/whoosh.au
share/xboing/sounds/wzzz.au
share/xboing/sounds/wzzz2.au
share/xboing/sounds/youagod.au
@dirrm share/xboing/sounds
>Release-Note:
>Audit-Trail:
>Unformatted: