aboutsummaryrefslogtreecommitdiffstats
path: root/games
diff options
context:
space:
mode:
authordinoex <dinoex@FreeBSD.org>2003-08-04 14:50:44 +0800
committerdinoex <dinoex@FreeBSD.org>2003-08-04 14:50:44 +0800
commitb59614ee405b0be8db44152e578cabea25761a14 (patch)
tree34acb61ce4bafbbbaf46e205bf16c0d467738c53 /games
parent1413276112da013f3568f1fa0276e151140162b4 (diff)
downloadfreebsd-ports-gnome-b59614ee405b0be8db44152e578cabea25761a14.tar.gz
freebsd-ports-gnome-b59614ee405b0be8db44152e578cabea25761a14.tar.zst
freebsd-ports-gnome-b59614ee405b0be8db44152e578cabea25761a14.zip
- Fix sound initialisation problem
- new option WITHOUT_AUDIO default now supports sound on alpha
Diffstat (limited to 'games')
-rw-r--r--games/xboing/Makefile14
-rw-r--r--games/xboing/files/patch-LINUXaudio.c44
-rw-r--r--games/xboing/files/patch-ab19
-rw-r--r--games/xboing/files/patch-ac2
-rw-r--r--games/xboing/pkg-plist94
-rw-r--r--games/xboing/pkg-plist.alpha88
6 files changed, 101 insertions, 160 deletions
diff --git a/games/xboing/Makefile b/games/xboing/Makefile
index f34975ba94c7..820952aeaf11 100644
--- a/games/xboing/Makefile
+++ b/games/xboing/Makefile
@@ -6,23 +6,27 @@
PORTNAME= xboing
PORTVERSION= 2.4
+PORTREVISION= 1
CATEGORIES= games
MASTER_SITES= ${MASTER_SITE_XCONTRIB}
MASTER_SITE_SUBDIR= games
DISTNAME= ${PORTNAME}${PORTVERSION}
-MAINTAINER= dinoex@FreeBSD.Org
+MAINTAINER= dinoex@FreeBSD.org
COMMENT= X11 arcade game
-.if ${MACHINE_ARCH} == "alpha"
-PLIST= ${PKGDIR}/pkg-plist.alpha
-.endif
-
USE_IMAKE= yes
USE_XPM= yes
WRKSRC= ${WRKDIR}/xboing
MAN1= xboing.1
+.if defined(WITHOUT_AUDIO)
+MAKE_ENV+= WITHOUT_AUDIO=True
+PLIST_SUB+= WITH_SOUND="@comment "
+.else
+PLIST_SUB+= WITH_SOUND=""
+.endif
+
post-install:
${CHOWN} root:games ${PREFIX}/bin/xboing
${CHMOD} 2755 ${PREFIX}/bin/xboing
diff --git a/games/xboing/files/patch-LINUXaudio.c b/games/xboing/files/patch-LINUXaudio.c
new file mode 100644
index 000000000000..a3dd9a7d464b
--- /dev/null
+++ b/games/xboing/files/patch-LINUXaudio.c
@@ -0,0 +1,44 @@
+--- audio/LINUXaudio.c.orig Fri Nov 22 02:28:33 1996
++++ audio/LINUXaudio.c Tue Mar 4 22:06:01 2003
+@@ -55,7 +55,7 @@
+ #include <unistd.h>
+ #include <stdio.h>
+ #include <fcntl.h>
+-#include <linux/soundcard.h>
++#include <sys/soundcard.h>
+
+ #include "include/error.h"
+ #include "include/audio.h"
+@@ -78,7 +78,7 @@
+ */
+
+ static char *Audio_dev = "/dev/audio";
+-static int Audio_fd;
++static int Audio_fd = -1;
+ /* size should depend on sample_rate */
+ static unsigned char buf[BUFFER_SIZE];
+ static char errorString[255];
+@@ -125,13 +125,14 @@
+ if (!strcmp(string, "EXIT"))
+ {
+ /* Make sure that the audio device is flushed and reset */
++ if ( Audio_fd >= 0 )
+ ioctl(Audio_fd, SNDCTL_DSP_RESET, 0);
+
+ exit(0);
+ }
+
+ /* Try to open the audio device */
+- if (!(Audio_fd = open(Audio_dev, O_WRONLY)))
++ if ((Audio_fd = open(Audio_dev, O_WRONLY)) < 0)
+ {
+ continue;
+ }
+@@ -185,6 +186,7 @@
+ /* Close the sound file */
+ (void) close(ifd);
+ (void) close(Audio_fd);
++ Audio_fd = -1;
+ } while (True);
+ }
+
diff --git a/games/xboing/files/patch-ab b/games/xboing/files/patch-ab
deleted file mode 100644
index 90acedf57c8a..000000000000
--- a/games/xboing/files/patch-ab
+++ /dev/null
@@ -1,19 +0,0 @@
-*** audio/LINUXaudio.c.orig Thu Nov 20 03:04:17 1997
---- audio/LINUXaudio.c Thu Nov 20 03:04:31 1997
-***************
-*** 55,61 ****
- #include <unistd.h>
- #include <stdio.h>
- #include <fcntl.h>
-! #include <linux/soundcard.h>
-
- #include "include/error.h"
- #include "include/audio.h"
---- 55,61 ----
- #include <unistd.h>
- #include <stdio.h>
- #include <fcntl.h>
-! #include <sys/soundcard.h>
-
- #include "include/error.h"
- #include "include/audio.h"
diff --git a/games/xboing/files/patch-ac b/games/xboing/files/patch-ac
index 7e4d8f4c6e6e..0d9f5240991a 100644
--- a/games/xboing/files/patch-ac
+++ b/games/xboing/files/patch-ac
@@ -19,7 +19,7 @@
SOUNDS_DIR = $(XBOING_DIR)/sounds
BACKUP_DIR = $(XBOING_DIR)/../backups
HIGH_SCORE_FILE = $(XBOING_DIR)/.xboing.scr
-+#ifdef AlphaArchitecture
++#ifdef WITHOUT_AUDIO
AUDIO_AVAILABLE = False
AUDIO_SRC = audio/NOaudio.c
+#else
diff --git a/games/xboing/pkg-plist b/games/xboing/pkg-plist
index 6ebdb38002f1..984a629dfb00 100644
--- a/games/xboing/pkg-plist
+++ b/games/xboing/pkg-plist
@@ -83,53 +83,53 @@ lib/X11/xboing/levels/level78.data
lib/X11/xboing/levels/level79.data
lib/X11/xboing/levels/level80.data
lib/X11/xboing/levels/new.data
-lib/X11/xboing/sounds/Doh1.au
-lib/X11/xboing/sounds/Doh2.au
-lib/X11/xboing/sounds/Doh3.au
-lib/X11/xboing/sounds/Doh4.au
-lib/X11/xboing/sounds/ammo.au
-lib/X11/xboing/sounds/applause.au
-lib/X11/xboing/sounds/ball2ball.au
-lib/X11/xboing/sounds/balllost.au
-lib/X11/xboing/sounds/ballshot.au
-lib/X11/xboing/sounds/boing.au
-lib/X11/xboing/sounds/bomb.au
-lib/X11/xboing/sounds/bonus.au
-lib/X11/xboing/sounds/buzzer.au
-lib/X11/xboing/sounds/click.au
-lib/X11/xboing/sounds/ddloo.au
-lib/X11/xboing/sounds/evillaugh.au
-lib/X11/xboing/sounds/game_over.au
-lib/X11/xboing/sounds/gate.au
-lib/X11/xboing/sounds/hithere.au
-lib/X11/xboing/sounds/hypspc.au
-lib/X11/xboing/sounds/intro.au
-lib/X11/xboing/sounds/key.au
-lib/X11/xboing/sounds/looksbad.au
-lib/X11/xboing/sounds/metal.au
-lib/X11/xboing/sounds/mgun.au
-lib/X11/xboing/sounds/ouch.au
-lib/X11/xboing/sounds/paddle.au
-lib/X11/xboing/sounds/ping.au
-lib/X11/xboing/sounds/shark.au
-lib/X11/xboing/sounds/shoot.au
-lib/X11/xboing/sounds/shotgun.au
-lib/X11/xboing/sounds/spring.au
-lib/X11/xboing/sounds/stamp.au
-lib/X11/xboing/sounds/sticky.au
-lib/X11/xboing/sounds/supbons.au
-lib/X11/xboing/sounds/toggle.au
-lib/X11/xboing/sounds/tone.au
-lib/X11/xboing/sounds/touch.au
-lib/X11/xboing/sounds/wallsoff.au
-lib/X11/xboing/sounds/warp.au
-lib/X11/xboing/sounds/weeek.au
-lib/X11/xboing/sounds/whizzo.au
-lib/X11/xboing/sounds/whoosh.au
-lib/X11/xboing/sounds/wzzz.au
-lib/X11/xboing/sounds/wzzz2.au
-lib/X11/xboing/sounds/youagod.au
+%%WITH_SOUND%%lib/X11/xboing/sounds/Doh1.au
+%%WITH_SOUND%%lib/X11/xboing/sounds/Doh2.au
+%%WITH_SOUND%%lib/X11/xboing/sounds/Doh3.au
+%%WITH_SOUND%%lib/X11/xboing/sounds/Doh4.au
+%%WITH_SOUND%%lib/X11/xboing/sounds/ammo.au
+%%WITH_SOUND%%lib/X11/xboing/sounds/applause.au
+%%WITH_SOUND%%lib/X11/xboing/sounds/ball2ball.au
+%%WITH_SOUND%%lib/X11/xboing/sounds/balllost.au
+%%WITH_SOUND%%lib/X11/xboing/sounds/ballshot.au
+%%WITH_SOUND%%lib/X11/xboing/sounds/boing.au
+%%WITH_SOUND%%lib/X11/xboing/sounds/bomb.au
+%%WITH_SOUND%%lib/X11/xboing/sounds/bonus.au
+%%WITH_SOUND%%lib/X11/xboing/sounds/buzzer.au
+%%WITH_SOUND%%lib/X11/xboing/sounds/click.au
+%%WITH_SOUND%%lib/X11/xboing/sounds/ddloo.au
+%%WITH_SOUND%%lib/X11/xboing/sounds/evillaugh.au
+%%WITH_SOUND%%lib/X11/xboing/sounds/game_over.au
+%%WITH_SOUND%%lib/X11/xboing/sounds/gate.au
+%%WITH_SOUND%%lib/X11/xboing/sounds/hithere.au
+%%WITH_SOUND%%lib/X11/xboing/sounds/hypspc.au
+%%WITH_SOUND%%lib/X11/xboing/sounds/intro.au
+%%WITH_SOUND%%lib/X11/xboing/sounds/key.au
+%%WITH_SOUND%%lib/X11/xboing/sounds/looksbad.au
+%%WITH_SOUND%%lib/X11/xboing/sounds/metal.au
+%%WITH_SOUND%%lib/X11/xboing/sounds/mgun.au
+%%WITH_SOUND%%lib/X11/xboing/sounds/ouch.au
+%%WITH_SOUND%%lib/X11/xboing/sounds/paddle.au
+%%WITH_SOUND%%lib/X11/xboing/sounds/ping.au
+%%WITH_SOUND%%lib/X11/xboing/sounds/shark.au
+%%WITH_SOUND%%lib/X11/xboing/sounds/shoot.au
+%%WITH_SOUND%%lib/X11/xboing/sounds/shotgun.au
+%%WITH_SOUND%%lib/X11/xboing/sounds/spring.au
+%%WITH_SOUND%%lib/X11/xboing/sounds/stamp.au
+%%WITH_SOUND%%lib/X11/xboing/sounds/sticky.au
+%%WITH_SOUND%%lib/X11/xboing/sounds/supbons.au
+%%WITH_SOUND%%lib/X11/xboing/sounds/toggle.au
+%%WITH_SOUND%%lib/X11/xboing/sounds/tone.au
+%%WITH_SOUND%%lib/X11/xboing/sounds/touch.au
+%%WITH_SOUND%%lib/X11/xboing/sounds/wallsoff.au
+%%WITH_SOUND%%lib/X11/xboing/sounds/warp.au
+%%WITH_SOUND%%lib/X11/xboing/sounds/weeek.au
+%%WITH_SOUND%%lib/X11/xboing/sounds/whizzo.au
+%%WITH_SOUND%%lib/X11/xboing/sounds/whoosh.au
+%%WITH_SOUND%%lib/X11/xboing/sounds/wzzz.au
+%%WITH_SOUND%%lib/X11/xboing/sounds/wzzz2.au
+%%WITH_SOUND%%lib/X11/xboing/sounds/youagod.au
lib/X11/xboing/problems.doc
-@dirrm lib/X11/xboing/sounds
@dirrm lib/X11/xboing/levels
+%%WITH_SOUND%%@dirrm lib/X11/xboing/sounds
@dirrm lib/X11/xboing
diff --git a/games/xboing/pkg-plist.alpha b/games/xboing/pkg-plist.alpha
deleted file mode 100644
index 040ebfa16b24..000000000000
--- a/games/xboing/pkg-plist.alpha
+++ /dev/null
@@ -1,88 +0,0 @@
-bin/xboing
-lib/X11/xboing/.xboing.scr
-lib/X11/xboing/levels/demo.data
-lib/X11/xboing/levels/editor.data
-lib/X11/xboing/levels/level01.data
-lib/X11/xboing/levels/level02.data
-lib/X11/xboing/levels/level03.data
-lib/X11/xboing/levels/level04.data
-lib/X11/xboing/levels/level05.data
-lib/X11/xboing/levels/level06.data
-lib/X11/xboing/levels/level07.data
-lib/X11/xboing/levels/level08.data
-lib/X11/xboing/levels/level09.data
-lib/X11/xboing/levels/level10.data
-lib/X11/xboing/levels/level11.data
-lib/X11/xboing/levels/level12.data
-lib/X11/xboing/levels/level13.data
-lib/X11/xboing/levels/level14.data
-lib/X11/xboing/levels/level15.data
-lib/X11/xboing/levels/level16.data
-lib/X11/xboing/levels/level17.data
-lib/X11/xboing/levels/level18.data
-lib/X11/xboing/levels/level19.data
-lib/X11/xboing/levels/level20.data
-lib/X11/xboing/levels/level21.data
-lib/X11/xboing/levels/level22.data
-lib/X11/xboing/levels/level23.data
-lib/X11/xboing/levels/level24.data
-lib/X11/xboing/levels/level25.data
-lib/X11/xboing/levels/level26.data
-lib/X11/xboing/levels/level27.data
-lib/X11/xboing/levels/level28.data
-lib/X11/xboing/levels/level29.data
-lib/X11/xboing/levels/level30.data
-lib/X11/xboing/levels/level31.data
-lib/X11/xboing/levels/level32.data
-lib/X11/xboing/levels/level33.data
-lib/X11/xboing/levels/level34.data
-lib/X11/xboing/levels/level35.data
-lib/X11/xboing/levels/level36.data
-lib/X11/xboing/levels/level37.data
-lib/X11/xboing/levels/level38.data
-lib/X11/xboing/levels/level39.data
-lib/X11/xboing/levels/level40.data
-lib/X11/xboing/levels/level41.data
-lib/X11/xboing/levels/level42.data
-lib/X11/xboing/levels/level43.data
-lib/X11/xboing/levels/level44.data
-lib/X11/xboing/levels/level45.data
-lib/X11/xboing/levels/level46.data
-lib/X11/xboing/levels/level47.data
-lib/X11/xboing/levels/level48.data
-lib/X11/xboing/levels/level49.data
-lib/X11/xboing/levels/level50.data
-lib/X11/xboing/levels/level51.data
-lib/X11/xboing/levels/level52.data
-lib/X11/xboing/levels/level53.data
-lib/X11/xboing/levels/level54.data
-lib/X11/xboing/levels/level55.data
-lib/X11/xboing/levels/level56.data
-lib/X11/xboing/levels/level57.data
-lib/X11/xboing/levels/level58.data
-lib/X11/xboing/levels/level59.data
-lib/X11/xboing/levels/level60.data
-lib/X11/xboing/levels/level61.data
-lib/X11/xboing/levels/level62.data
-lib/X11/xboing/levels/level63.data
-lib/X11/xboing/levels/level64.data
-lib/X11/xboing/levels/level65.data
-lib/X11/xboing/levels/level66.data
-lib/X11/xboing/levels/level67.data
-lib/X11/xboing/levels/level68.data
-lib/X11/xboing/levels/level69.data
-lib/X11/xboing/levels/level70.data
-lib/X11/xboing/levels/level71.data
-lib/X11/xboing/levels/level72.data
-lib/X11/xboing/levels/level73.data
-lib/X11/xboing/levels/level74.data
-lib/X11/xboing/levels/level75.data
-lib/X11/xboing/levels/level76.data
-lib/X11/xboing/levels/level77.data
-lib/X11/xboing/levels/level78.data
-lib/X11/xboing/levels/level79.data
-lib/X11/xboing/levels/level80.data
-lib/X11/xboing/levels/new.data
-lib/X11/xboing/problems.doc
-@dirrm lib/X11/xboing/levels
-@dirrm lib/X11/xboing