mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-22 08:58:47 +00:00
- Fix sound initialisation problem
- new option WITHOUT_AUDIO default now supports sound on alpha
This commit is contained in:
parent
fa5777841b
commit
9a4f0bcaf2
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=86259
@ -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
|
||||
|
44
games/xboing/files/patch-LINUXaudio.c
Normal file
44
games/xboing/files/patch-LINUXaudio.c
Normal file
@ -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);
|
||||
}
|
||||
|
@ -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"
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
Loading…
Reference in New Issue
Block a user