aboutsummaryrefslogtreecommitdiffstats
path: root/audio/dagrab
diff options
context:
space:
mode:
authorcpiazza <cpiazza@FreeBSD.org>2000-04-23 05:31:59 +0800
committercpiazza <cpiazza@FreeBSD.org>2000-04-23 05:31:59 +0800
commitdd5e0945d77f4f631be4424a6017b07ac83b01f8 (patch)
treedab16bf720e5282877f9616ad70c479b4450cd7c /audio/dagrab
parentba4d1c643c505db84b0da7cc74f3ecfb8b663c0c (diff)
downloadfreebsd-ports-gnome-dd5e0945d77f4f631be4424a6017b07ac83b01f8.tar.gz
freebsd-ports-gnome-dd5e0945d77f4f631be4424a6017b07ac83b01f8.tar.zst
freebsd-ports-gnome-dd5e0945d77f4f631be4424a6017b07ac83b01f8.zip
Update to 0.3.5 and move external patch file into patches/
Submitted by: Ben Smithurst <ben@scientia.demon.co.uk> Approved by: maintainer
Diffstat (limited to 'audio/dagrab')
-rw-r--r--audio/dagrab/Makefile5
-rw-r--r--audio/dagrab/distinfo4
-rw-r--r--audio/dagrab/files/patch-aa8
-rw-r--r--audio/dagrab/files/patch-ab174
4 files changed, 182 insertions, 9 deletions
diff --git a/audio/dagrab/Makefile b/audio/dagrab/Makefile
index d0a821cd0ed1..0233b8fb5e32 100644
--- a/audio/dagrab/Makefile
+++ b/audio/dagrab/Makefile
@@ -6,14 +6,11 @@
#
PORTNAME= dagrab
-PORTVERSION= 0.3.4
+PORTVERSION= 0.3.5
CATEGORIES= audio
MASTER_SITES= ${MASTER_SITE_SUNSITE}
MASTER_SITE_SUBDIR= apps/sound/cdrom
-PATCH_SITES= http://people.FreeBSD.org/~cpiazza/distfiles/
-PATCHFILES= ${DISTNAME}-freebsd.patch.gz
-
MAINTAINER= clkao@CirX.ORG
MAN1= dagrab.1
diff --git a/audio/dagrab/distinfo b/audio/dagrab/distinfo
index 8a0375cf0e50..cbba2f7ba8a2 100644
--- a/audio/dagrab/distinfo
+++ b/audio/dagrab/distinfo
@@ -1,2 +1,2 @@
-MD5 (dagrab-0.3.4.tar.gz) = 5986bfc7b4b58ec86ec380333687b2b9
-MD5 (dagrab-0.3.4-freebsd.patch.gz) = f6c595462125b62b20c25ac63d485d18
+MD5 (dagrab-0.3.5.tar.gz) = 96e77ffddad5c8f63d4e411f4e033d14
+MD5 (dagrab-0.3.5-freebsd.patch.gz) = 65d52d94d7cf15d8bf354c5f0f635942
diff --git a/audio/dagrab/files/patch-aa b/audio/dagrab/files/patch-aa
index f3bc47822240..4b55a924e93a 100644
--- a/audio/dagrab/files/patch-aa
+++ b/audio/dagrab/files/patch-aa
@@ -1,11 +1,13 @@
---- Makefile.orig Thu Jun 24 15:55:04 1999
-+++ Makefile Sat Aug 14 21:58:55 1999
-@@ -1,7 +1,7 @@
+--- 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+=-Wall -g ${UCD}
all:dagrab
diff --git a/audio/dagrab/files/patch-ab b/audio/dagrab/files/patch-ab
new file mode 100644
index 000000000000..e1f21cab3c4b
--- /dev/null
+++ b/audio/dagrab/files/patch-ab
@@ -0,0 +1,174 @@
+--- 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;