aboutsummaryrefslogtreecommitdiff
path: root/audio/dagrab
diff options
context:
space:
mode:
authorKevin Lo <kevlo@FreeBSD.org>2000-08-12 07:30:34 +0000
committerKevin Lo <kevlo@FreeBSD.org>2000-08-12 07:30:34 +0000
commit38139cc20a3d9f5e9f508244991351fa8b9875c3 (patch)
tree59145cb4a6f5141da9a3aba2cf8869d50c360be1 /audio/dagrab
parent513cb1724eec0d7643728c5e84dd3265cf39520d (diff)
downloadports-38139cc20a3d9f5e9f508244991351fa8b9875c3.tar.gz
ports-38139cc20a3d9f5e9f508244991351fa8b9875c3.zip
Notes
Diffstat (limited to 'audio/dagrab')
-rw-r--r--audio/dagrab/Makefile6
-rw-r--r--audio/dagrab/files/patch-aa2
-rw-r--r--audio/dagrab/files/patch-ab188
-rw-r--r--audio/dagrab/pkg-descr2
4 files changed, 20 insertions, 178 deletions
diff --git a/audio/dagrab/Makefile b/audio/dagrab/Makefile
index 0233b8fb5e32..f382b307ee90 100644
--- a/audio/dagrab/Makefile
+++ b/audio/dagrab/Makefile
@@ -1,4 +1,4 @@
-# New ports collection makefile for: dagrab
+# New ports collection makefile for: dagrab
# Date created: 2nd, Jan 1999
# Whom: Chia-liang Kao <clkao@CirX.ORG>
#
@@ -16,7 +16,7 @@ MAINTAINER= clkao@CirX.ORG
MAN1= dagrab.1
do-install:
- @${INSTALL_PROGRAM} ${WRKSRC}/dagrab ${PREFIX}/bin/dagrab
- @${INSTALL_MAN} ${WRKSRC}/dagrab.1 ${MANPREFIX}/man/man1/dagrab.1
+ ${INSTALL_PROGRAM} ${WRKSRC}/dagrab ${PREFIX}/bin
+ ${INSTALL_MAN} ${WRKSRC}/dagrab.1 ${MANPREFIX}/man/man1
.include <bsd.port.mk>
diff --git a/audio/dagrab/files/patch-aa b/audio/dagrab/files/patch-aa
index 4b55a924e93a..1dc716f4cb36 100644
--- a/audio/dagrab/files/patch-aa
+++ b/audio/dagrab/files/patch-aa
@@ -8,7 +8,7 @@
-PREFIX=/usr/local
-CFLAGS=-Wall -g ${UCD}
+PREFIX?=/usr/local
-+CFLAGS+=-Wall -g ${UCD}
++CFLAGS+=${UCD} -DCDDB_PATH=\"${X11BASE}/lib/X11/xmcd/cddb\"
all:dagrab
dagrab:dagrab.o
diff --git a/audio/dagrab/files/patch-ab b/audio/dagrab/files/patch-ab
index e1f21cab3c4b..1dc716f4cb36 100644
--- a/audio/dagrab/files/patch-ab
+++ b/audio/dagrab/files/patch-ab
@@ -1,174 +1,14 @@
---- dagrab.c.orig Sat Feb 19 16:32:46 2000
-+++ dagrab.c Fri Apr 21 17:07:04 2000
-@@ -94,26 +94,20 @@
- #include <string.h>
- #include <errno.h>
- #include <fcntl.h>
--#include <getopt.h>
- #include <dirent.h>
- #include <netdb.h>
--#include <unistd.h>
- #include <pwd.h>
- #include <ctype.h>
--#define __need_timeval /* needed by glibc */
--#include <time.h>
--#include <linux/cdrom.h>
--#ifdef USE_UCDROM
--#include <linux/ucdrom.h>
--#endif
--#include <sys/vfs.h>
- #include <sys/stat.h>
- #include <sys/types.h>
- #include <sys/ioctl.h>
- #include <sys/socket.h>
- #include <netinet/in.h>
-+#include <sys/cdio.h>
-+#include <sys/param.h>
-+#include <sys/mount.h>
- #define CDDEVICE "/dev/cdrom"
--#define N_BUF 8
-+#define N_BUF 12
- #define OVERLAP 2
- #define KEYLEN 12
- #define OFS 12
-@@ -123,12 +117,16 @@
- #define D_MODE 0660
- #define CDDB_MAX 65535
- #define CDDB_PORT 888
--#define CDDB_PATH "/usr/lib/X11/xmcd/cddb"
-+#define CDDB_PATH "/usr/X11R6/lib/X11/xmcd/cddb"
- #define CDDB_HOST "freedb.freedb.org"
- //#define USE_CDDB (opt_save||opt_name)
- #define USE_CDDB opt_cddb
- #define PROGNAME "dagrab"
- #define VERSION "0.3.5"
-+#define CD_MSF_OFFSET 150
-+#define CDROM_DATA_TRACK 4
-+#define CDROM_LEADOUT 0xaa
-+#define CD_FRAMESIZE_RAW 2352
- #define KW_TRACK 0
- #define KW_FULLD 1
- #define KW_AUTHOR 2
-@@ -226,16 +224,16 @@
- return buf;
- }
-
--int cd_get_tochdr(struct cdrom_tochdr *Th)
-+int cd_get_tochdr(struct ioc_toc_header *Th)
- {
-- return ioctl(cdrom_fd,CDROMREADTOCHDR,Th);
-+ return ioctl(cdrom_fd,CDIOREADTOCHEADER,Th);
- }
-
--int cd_get_tocentry(int trk,struct cdrom_tocentry *Te,int mode)
-+int cd_get_tocentry(int trk,struct ioc_read_toc_single_entry *Te,int mode)
- {
-- Te->cdte_track=trk;
-- Te->cdte_format=mode;
-- return ioctl(cdrom_fd,CDROMREADTOCENTRY,Te);
-+ Te->track=trk;
-+ Te->address_format=mode;
-+ return ioctl(cdrom_fd,CDIOREADTOCENTRY,Te);
- }
-
- void cd_read_audio(int lba,int num,char *buf)
-@@ -244,13 +242,13 @@
- /*NOTE: if num>CDROM_NBLOCKS_BUFFER as defined in ide_cd.c (8 in linux 2.0.32)
- jitter correction may be required inside the block. */
- {
-- struct cdrom_read_audio ra;
-+ struct ioc_read_audio ra;
-
-- ra.addr.lba=lba;
-- ra.addr_format=CDROM_LBA;
-+ ra.address.lba=lba;
-+ ra.address_format=CD_LBA_FORMAT;
- ra.nframes=num;
-- ra.buf=buf;
-- if(ioctl(cdrom_fd,CDROMREADAUDIO,&ra)){
-+ ra.buffer=buf;
-+ if(ioctl(cdrom_fd,CDIOCREADAUDIO,&ra)){
- /*fprintf(stderr,"%s: read raw ioctl failed \n",progname);*/
- fprintf(stderr,"\n%s: read raw ioctl failed at lba %d length %d: %s\n",
- progname,lba,num,strerror(errno));
-@@ -471,7 +469,7 @@
- DIR *d;
- struct dirent *e;
- char *id2,*p,*cddb,*loc;
-- int i,cddbs,locs;
-+ int i,cddbs,locs=0;
- char id[12];
- char *path;
- char path2[500];
-@@ -645,10 +643,10 @@
- int cd_getinfo(char *cd_dev,struct cd_trk_list *tl)
- {
- int i;
-- struct cdrom_tochdr Th;
-- struct cdrom_tocentry Te;
-+ struct ioc_toc_header Th;
-+ struct ioc_read_toc_single_entry Te;
-
-- if ((cdrom_fd=open(cd_dev,O_RDONLY|O_NONBLOCK))==-1){
-+ if ((cdrom_fd=open(cd_dev,O_RDONLY))==-1){
- fprintf(stderr,"%s: error opening device %s\n",progname,cd_dev);
- exit(1);
- }
-@@ -656,7 +654,7 @@
- fprintf(stderr,"%s: read TOC ioctl failed: %s\n",progname,strerror(errno));
- exit(1);
- }
-- tl->min=Th.cdth_trk0;tl->max=Th.cdth_trk1;
-+ tl->min=Th.starting_track;tl->max=Th.ending_track;
- if((tl->starts=(int *)malloc((tl->max-tl->min+2)*sizeof(int)))==NULL){
- fprintf(stderr,"%s: list data allocation failed\n",progname);
- exit(1);
-@@ -668,21 +666,21 @@
-
- for (i=tl->min;i<=tl->max;i++)
- {
-- if(cd_get_tocentry(i,&Te,CDROM_LBA)){
-+ if(cd_get_tocentry(i,&Te,CD_LBA_FORMAT)){
- fprintf(stderr,"%s: read TOC entry ioctl failed: %s\n",
- progname,strerror(errno));
- exit(1);
- }
-- tl->starts[i-tl->min]=Te.cdte_addr.lba;
-- tl->types[i-tl->min]=Te.cdte_ctrl&CDROM_DATA_TRACK;
-+ tl->starts[i-tl->min]=ntohl(Te.entry.addr.lba);
-+ tl->types[i-tl->min]=Te.entry.control&CDROM_DATA_TRACK;
- }
- i=CDROM_LEADOUT;
-- if(cd_get_tocentry(i,&Te,CDROM_LBA)){
-+ if(cd_get_tocentry(i,&Te,CD_LBA_FORMAT)){
- fprintf(stderr,"%s: read TOC entry ioctl failed: %s\n",progname,strerror(errno));
- exit(1);
- }
-- tl->starts[tl->max-tl->min+1]=Te.cdte_addr.lba;
-- tl->types[tl->max-tl->min+1]=Te.cdte_ctrl&CDROM_DATA_TRACK;
-+ tl->starts[tl->max-tl->min+1]=ntohl(Te.entry.addr.lba);
-+ tl->types[tl->max-tl->min+1]=Te.entry.control&CDROM_DATA_TRACK;
-
- i=cddb_main(tl);
- if(i==-1) {
-@@ -961,7 +959,7 @@
- int main(int ac,char **av)
- {
- int i,l,disp_TOC=0;
-- char c;
-+ int c;
- int all_tracks=0;
- struct cd_trk_list tl;
- char cd_dev[BLEN+1]=CDDEVICE;
-@@ -969,10 +967,8 @@
- char filter[BLEN+1] = "";
- char path[500];
- FILE *f;
--
- progname=av[0];
-- optind=0;
-- while((c=getopt(ac,av,"d:f:n:o:k:r:t:m:e:H:P:D:pshaivCSN"))!=EOF){
-+ while((c=getopt(ac,av,"pshaivCSNd:f:n:o:k:r:t:m:e:H:P:D:"))!=-1){
- switch(c){
- case 'h':usage();break;
- case 'd':CPARG(cd_dev);break;
+--- Makefile.orig Sat Feb 19 15:41:30 2000
++++ Makefile Fri Apr 21 17:12:20 2000
+@@ -1,8 +1,8 @@
+-CC=gcc
++#CC=gcc
+ #uncomment the following line for linux 2.0.x (and maybe 2.1.x or 1.x too ...)
+ #UCD=-DUSE_UCDROM
+-PREFIX=/usr/local
+-CFLAGS=-Wall -g ${UCD}
++PREFIX?=/usr/local
++CFLAGS+=${UCD} -DCDDB_PATH=\"${X11BASE}/lib/X11/xmcd/cddb\"
+ all:dagrab
+
+ dagrab:dagrab.o
diff --git a/audio/dagrab/pkg-descr b/audio/dagrab/pkg-descr
index b12e68b2f8b3..5cf5c64b4c8d 100644
--- a/audio/dagrab/pkg-descr
+++ b/audio/dagrab/pkg-descr
@@ -1,2 +1,4 @@
DAGRAB is a program for reading audio tracks from a CD into wav sound
files. An IDE CD-rom drive that supports digital audio is required.
+
+WWW: http://web.tiscalinet.it/marcellou/dagrab.html