diff options
author | hoek <hoek@FreeBSD.org> | 1998-06-27 13:35:02 +0800 |
---|---|---|
committer | hoek <hoek@FreeBSD.org> | 1998-06-27 13:35:02 +0800 |
commit | 1670137ebafc6153f373081e2b3e28208944aa27 (patch) | |
tree | 35c2d31ed54fd4183c21c300acf2fbd46c9a4d1c /audio/cdplay | |
parent | e269a25f5fbe6f5626fa7696046c91f0e36832f1 (diff) | |
download | freebsd-ports-gnome-1670137ebafc6153f373081e2b3e28208944aa27.tar.gz freebsd-ports-gnome-1670137ebafc6153f373081e2b3e28208944aa27.tar.zst freebsd-ports-gnome-1670137ebafc6153f373081e2b3e28208944aa27.zip |
Add patches to support IDE cd-roms. While I'm here, respect
${CFLAGS}. Heck, why not go all the way and respect ${PREFIX},
too (respect now added). As an intentional side-effect, these
patches also prevent the pause function from blasting the listener's
ears off (the way cdcontrol currently does (and cdplay used to)).
Diffstat (limited to 'audio/cdplay')
-rw-r--r-- | audio/cdplay/Makefile | 8 | ||||
-rw-r--r-- | audio/cdplay/files/patch-aa | 18 | ||||
-rw-r--r-- | audio/cdplay/files/patch-ab | 73 | ||||
-rw-r--r-- | audio/cdplay/files/patch-ac | 50 | ||||
-rw-r--r-- | audio/cdplay/files/patch-ad | 11 | ||||
-rw-r--r-- | audio/cdplay/files/patch-ae | 16 | ||||
-rw-r--r-- | audio/cdplay/pkg-descr | 3 |
7 files changed, 176 insertions, 3 deletions
diff --git a/audio/cdplay/Makefile b/audio/cdplay/Makefile index 8de08f80da4a..d45bdb8b90db 100644 --- a/audio/cdplay/Makefile +++ b/audio/cdplay/Makefile @@ -3,7 +3,7 @@ # Date created: 8 July 1997 # Whom: Antti Kaipila <anttik@iki.fi> # -# $Id: Makefile,v 1.1.1.1 1997/11/16 22:48:48 fenner Exp $ +# $Id: Makefile,v 1.2 1998/01/05 17:12:11 vanilla Exp $ # DISTNAME= cdplay-0.92 @@ -12,4 +12,10 @@ MASTER_SITES= ftp://ftp.one.sci.fi/pub/cdplay/ MAINTAINER= anttik@iki.fi +pre-patch: + @${GUNZIP_CMD} ${WRKSRC}/cdplay.1.gz + +post-patch: + @${GZIP_CMD} ${WRKSRC}/cdplay.1 + .include <bsd.port.mk> diff --git a/audio/cdplay/files/patch-aa b/audio/cdplay/files/patch-aa new file mode 100644 index 000000000000..31decc602877 --- /dev/null +++ b/audio/cdplay/files/patch-aa @@ -0,0 +1,18 @@ +diff -ur ../cdplay-0.92.orig/Makefile ./Makefile +--- ../cdplay-0.92.orig/Makefile Fri Nov 7 19:32:07 1997 ++++ ./Makefile Sat Jun 27 00:36:45 1998 +@@ -26,11 +26,11 @@ + BIN=cdplay + CDDEVICE=\"/dev/rcd0c\" + OPTIMISE=-O2 +-CFLAGS=-c -ansi -pedantic -Wall ++CFLAGS+=-c -ansi -pedantic -Wall + LFLAGS=-ltermcap + OFILES=cd.o term.o main.o sound.o +-MANPATH=/usr/local/man/man1/ +-BINPATH=/usr/local/bin/ ++MANPATH=${PREFIX}/man/man1/ ++BINPATH=${PREFIX}/bin/ + + all: main term cd sound link + diff --git a/audio/cdplay/files/patch-ab b/audio/cdplay/files/patch-ab new file mode 100644 index 000000000000..6d09ac7c56b2 --- /dev/null +++ b/audio/cdplay/files/patch-ab @@ -0,0 +1,73 @@ +--- cd.c.orig Fri Oct 24 11:38:25 1997 ++++ cd.c Sat Jun 27 00:53:10 1998 +@@ -98,8 +98,15 @@ + cd_play.end_s=cdinfo.s_sec[cdinfo.l_track-1]; + cd_play.end_f=cdinfo.s_frame[cdinfo.l_track-1]; + +- if(ioctl (cd_fd, CDIOCPLAYMSF, (char *) &cd_play)<0) +- per(); ++ if(ioctl (cd_fd, CDIOCPLAYMSF, (char *) &cd_play)<0) { ++ /* Hack for IDE CD-ROMs */ ++ if (cd_play.start_s < 2) { ++ cd_play.start_s=2; ++ if(ioctl (cd_fd, CDIOCPLAYMSF, (char *) &cd_play)<0) ++ per(); ++ } else ++ per(); ++ } + } + + /* Skips one track forward */ +@@ -111,7 +118,7 @@ + /* Quess */ + void prev(void) + { +- if(cdinfo.c_sec<1) ++ if(cdinfo.c_sec<4) + play_track(cdinfo.c_track-1); + else play_track(cdinfo.c_track); + } +@@ -141,6 +148,43 @@ + } + } + ++/* Softly pauses the cd, or unpauses, as appropriate */ ++void cdsoftpause(void) ++{ ++ struct ioc_vol real_vol, cur_vol; ++ int i; ++ ++ if(ioctl(cd_fd,CDIOCGETVOL,(char *) &real_vol)) per(); ++ cur_vol = real_vol; ++ ++ if(cdinfo.pause){ ++ message="continue"; ++ memset (cur_vol.vol, 0, sizeof(cur_vol.vol)); ++ if(ioctl(cd_fd,CDIOCSETVOL,(char *) &cur_vol)) per(); ++ if(ioctl(cd_fd,CDIOCRESUME)<0) per(); else cdinfo.pause=0; ++ for (i=0; i<20; usleep(21), i++) { ++ cur_vol.vol[0] += (real_vol.vol[0] / 20); ++ cur_vol.vol[1] += (real_vol.vol[1] / 20); ++ cur_vol.vol[2] += (real_vol.vol[2] / 20); ++ cur_vol.vol[3] += (real_vol.vol[3] / 20); ++ if(ioctl(cd_fd,CDIOCSETVOL,(char *) &cur_vol)) per(); ++ } ++ if(ioctl(cd_fd,CDIOCSETVOL,(char *) &real_vol)) per(); ++ } ++ else { ++ message="pause"; ++ for (i=0; i<20; usleep(21), i++) { ++ cur_vol.vol[0] -= (real_vol.vol[0] / 20); ++ cur_vol.vol[1] -= (real_vol.vol[1] / 20); ++ cur_vol.vol[2] -= (real_vol.vol[2] / 20); ++ cur_vol.vol[3] -= (real_vol.vol[3] / 20); ++ if(ioctl(cd_fd,CDIOCSETVOL,(char *) &cur_vol)) per(); ++ } ++ if(ioctl (cd_fd, CDIOCPAUSE)<0) per(); else cdinfo.pause=1; ++ if(ioctl (cd_fd, CDIOCSETVOL,(char *) &real_vol)) per(); ++ } ++} ++ + /* Huge kludge */ + void ff(void) + { diff --git a/audio/cdplay/files/patch-ac b/audio/cdplay/files/patch-ac new file mode 100644 index 000000000000..f25db42951fe --- /dev/null +++ b/audio/cdplay/files/patch-ac @@ -0,0 +1,50 @@ +diff -ur ../cdplay-0.92.orig/cdplay.1 ./cdplay.1 +--- ../cdplay-0.92.orig/cdplay.1 Fri Nov 7 20:13:21 1997 ++++ ./cdplay.1 Sat Jun 27 00:29:34 1998 +@@ -35,15 +35,15 @@ + ] + .SH DESCRIPTION + .B cdplay +-plays audio cd's with a confortable console user interface. ++plays audio cd's with a confortable console user interface. + Supports only SCSI CD-ROM drives. + .SH OPTIONS + .TP + .BR \-d " device" + Uses + .B device +-instead of /dev/rcd0a witch it uses by default. (unless defined otherwise +-while compiling) ++instead of /dev/rcd0a which it uses by default (unless defined otherwise ++while compiling). + .TP + .BR -h + Display a brief help message. +@@ -59,6 +59,9 @@ + Space + Pause. If cd is already on pause continues. + .TP ++\'P\' ++Pause (or unpause) abruptly. ++.TP + \'e\' + Eject. Spits the disc out of your drive. + .TP +@@ -80,13 +83,13 @@ + \'q\' + Quit. Exit the program. + .SH NOTES +-If someone gets this to work with IDE drive please let me know. Currently +-tested ONLY with FreeBSD and NetBSD. Writen for FreeBSD and some features ++Currently ++tested ONLY with FreeBSD and NetBSD. Written for FreeBSD and some features + may not work with NetBSD, OpenBSD or BSDi. Don't think it'll work with linux + or some SYSV Unix's. + .SH BUGS +-Yes. I know it does'nt work with your IDE drive. And I also know that it +-does'nt work with your old SCSI drive. ++Yes, I know that it ++doesn't work with your old SCSI drive. + .SH AUTHOR + .br + Copyright (C) 1997 diff --git a/audio/cdplay/files/patch-ad b/audio/cdplay/files/patch-ad new file mode 100644 index 000000000000..0766f3acc9e9 --- /dev/null +++ b/audio/cdplay/files/patch-ad @@ -0,0 +1,11 @@ +diff -ur ../cdplay-0.92.orig/cdplay.h ./cdplay.h +--- ../cdplay-0.92.orig/cdplay.h Mon Nov 17 02:21:55 1997 ++++ ./cdplay.h Sat Jun 27 00:29:34 1998 +@@ -71,6 +71,7 @@ + void prev(void); + void stop(void); + void cdpause(void); ++void cdsoftpause(void); + void ff(void); + void rew(void); + void eject(void); diff --git a/audio/cdplay/files/patch-ae b/audio/cdplay/files/patch-ae new file mode 100644 index 000000000000..c782287bfc81 --- /dev/null +++ b/audio/cdplay/files/patch-ae @@ -0,0 +1,16 @@ +diff -ur ../cdplay-0.92.orig/main.c ./main.c +--- ../cdplay-0.92.orig/main.c Mon Nov 17 04:26:26 1997 ++++ ./main.c Sat Jun 27 00:29:34 1998 +@@ -77,10 +77,11 @@ + else if(cmd[0]=='r'){message="rew";rew();} + else if(cmd[0]=='s'){message="stop";stop();} + else if(cmd[0]=='e'){message="eject";eject();} +- else if(cmd[0]==' ') cdpause(); ++ else if(cmd[0]==' ') cdsoftpause(); + else if(cmd[0]=='+'){message="more vol";more_vol();} + else if(cmd[0]=='-'){message="less vol";less_vol();} + else if(cmd[0]=='q'){message="bye!";do_exit(0);} ++ else if(cmd[0]=='P') cdpause(); + } + update_cdinfo(); + move_up(5); diff --git a/audio/cdplay/pkg-descr b/audio/cdplay/pkg-descr index 1f989cf42ec6..219c59328a80 100644 --- a/audio/cdplay/pkg-descr +++ b/audio/cdplay/pkg-descr @@ -1,3 +1,2 @@ This is a neat cd-player for those of you who don't use X11 -and still want to play audio cds. It does not work with -IDE cdrom drives. +and still want to play audio cds. |