diff options
author | abs <abs@pkgsrc.org> | 2009-08-22 22:05:23 +0000 |
---|---|---|
committer | abs <abs@pkgsrc.org> | 2009-08-22 22:05:23 +0000 |
commit | d95f8b54f3c00302d338dbdbcae8ea4d1f8f5fcb (patch) | |
tree | f86c115f82778b72dab5de0a29a37780dfa86b3f /multimedia/dvdbackup | |
parent | 1fd0ac4440036cab1be012d731e445e0ae0fff64 (diff) | |
download | pkgsrc-d95f8b54f3c00302d338dbdbcae8ea4d1f8f5fcb.tar.gz |
Fix so it can read the dvd title under NetBSD (and actually work).
Bump pkgrevision
Diffstat (limited to 'multimedia/dvdbackup')
-rw-r--r-- | multimedia/dvdbackup/Makefile | 4 | ||||
-rw-r--r-- | multimedia/dvdbackup/distinfo | 4 | ||||
-rw-r--r-- | multimedia/dvdbackup/patches/patch-aa | 63 |
3 files changed, 65 insertions, 6 deletions
diff --git a/multimedia/dvdbackup/Makefile b/multimedia/dvdbackup/Makefile index 40943ec5ba4..27ca53032d4 100644 --- a/multimedia/dvdbackup/Makefile +++ b/multimedia/dvdbackup/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.4 2008/04/07 16:59:48 joerg Exp $ +# $NetBSD: Makefile,v 1.5 2009/08/22 22:05:23 abs Exp $ DISTNAME= dvdbackup-0.1.1 -PKGREVISION= 4 +PKGREVISION= 5 CATEGORIES= multimedia MASTER_SITES= http://dvd-create.sourceforge.net/ diff --git a/multimedia/dvdbackup/distinfo b/multimedia/dvdbackup/distinfo index 3997c58611d..78b3121c3f5 100644 --- a/multimedia/dvdbackup/distinfo +++ b/multimedia/dvdbackup/distinfo @@ -1,6 +1,6 @@ -$NetBSD: distinfo,v 1.1.1.1 2006/04/13 20:14:51 wiz Exp $ +$NetBSD: distinfo,v 1.2 2009/08/22 22:05:23 abs Exp $ SHA1 (dvdbackup-0.1.1.tar.gz) = 11bbbd0182f80bff1974b86bb989e9a2ab89f717 RMD160 (dvdbackup-0.1.1.tar.gz) = bd0d1824df92b493e4ea5ab4f24740c41ca826ef Size (dvdbackup-0.1.1.tar.gz) = 24806 bytes -SHA1 (patch-aa) = 4c3a6ef36cb3422899ca9ea66a3a5b64a374c85b +SHA1 (patch-aa) = c6cc236681856e5f02182241d0b6c4d027a78fd2 diff --git a/multimedia/dvdbackup/patches/patch-aa b/multimedia/dvdbackup/patches/patch-aa index 07c09621a8c..33009b328b4 100644 --- a/multimedia/dvdbackup/patches/patch-aa +++ b/multimedia/dvdbackup/patches/patch-aa @@ -1,6 +1,6 @@ -$NetBSD: patch-aa,v 1.1.1.1 2006/04/13 20:14:51 wiz Exp $ +$NetBSD: patch-aa,v 1.2 2009/08/22 22:05:24 abs Exp $ ---- dvdbackup.c.orig 2002-08-05 06:08:39.000000000 +0000 +--- dvdbackup.c.orig 2002-08-05 07:08:39.000000000 +0100 +++ dvdbackup.c @@ -20,6 +20,7 @@ @@ -19,3 +19,62 @@ $NetBSD: patch-aa,v 1.1.1.1 2006/04/13 20:14:51 wiz Exp $ /* We have a dual DVD with two feature films - now lets see if they have the same amount of chapters*/ chapters_1 = 0; +@@ -1519,30 +1520,32 @@ int DVDGetTitleName(const char *device, + { + /* Variables for filehandel and title string interaction */ + +- int filehandle, i, last; ++ FILE *filehandle; ++ int i, last; + + /* Open DVD device */ + +- if ( !(filehandle = open(device, O_RDONLY)) ) { ++ if ( !(filehandle = fopen(device, "r")) ) { + fprintf(stderr, "Can't open secified device %s - check your DVD device\n", device); + return(1); + } + + /* Seek to title of first track, which is at (track_no * 32768) + 40 */ + +- if ( 32808 != lseek(filehandle, 32808, SEEK_SET) ) { +- close(filehandle); ++ if ( fseek(filehandle, 32808, SEEK_SET) ) { ++ fclose(filehandle); + fprintf(stderr, "Can't seek DVD device %s - check your DVD device\n", device); + return(1); + } + + /* Read the DVD-Video title */ + +- if ( 32 != read(filehandle, title, 32)) { +- close(filehandle); ++ if ( 32 != fread(title, 1, 32, filehandle)) { ++ fclose(filehandle); + fprintf(stderr, "Can't read title from DVD device %s\n", device); + return(1); + } ++ fclose(filehandle); + + /* Terminate the title string */ + +@@ -2464,6 +2467,10 @@ int main(int argc, char *argv[]){ + #endif + + ++ /* On at least NetBSD5 we cannot fopen the dvd device during DVDOpen */ ++ if (provided_title_name == NULL) ++ DVDGetTitleName(dvd,title_name); ++ + _dvd = DVDOpen(dvd); + if(!_dvd) exit(-1); + +@@ -2476,7 +2483,7 @@ int main(int argc, char *argv[]){ + + + if(provided_title_name == NULL) { +- if (DVDGetTitleName(dvd,title_name) != 0) { ++ if (title_name[0] == 0) { + fprintf(stderr,"You must provide a title name when you read your DVD-Video structure direct from the HD\n"); + DVDClose(_dvd); + exit(1); |