pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/multimedia/dvdbackup Fix so it can read the dvd title ...
details: https://anonhg.NetBSD.org/pkgsrc/rev/0d3292c2b904
branches: trunk
changeset: 398049:0d3292c2b904
user: abs <abs%pkgsrc.org@localhost>
date: Sat Aug 22 22:05:23 2009 +0000
description:
Fix so it can read the dvd title under NetBSD (and actually work).
Bump pkgrevision
diffstat:
multimedia/dvdbackup/Makefile | 4 +-
multimedia/dvdbackup/distinfo | 4 +-
multimedia/dvdbackup/patches/patch-aa | 63 +++++++++++++++++++++++++++++++++-
3 files changed, 65 insertions(+), 6 deletions(-)
diffs (100 lines):
diff -r 685a51504d26 -r 0d3292c2b904 multimedia/dvdbackup/Makefile
--- a/multimedia/dvdbackup/Makefile Sat Aug 22 21:44:27 2009 +0000
+++ b/multimedia/dvdbackup/Makefile Sat Aug 22 22:05:23 2009 +0000
@@ -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 -r 685a51504d26 -r 0d3292c2b904 multimedia/dvdbackup/distinfo
--- a/multimedia/dvdbackup/distinfo Sat Aug 22 21:44:27 2009 +0000
+++ b/multimedia/dvdbackup/distinfo Sat Aug 22 22:05:23 2009 +0000
@@ -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 -r 685a51504d26 -r 0d3292c2b904 multimedia/dvdbackup/patches/patch-aa
--- a/multimedia/dvdbackup/patches/patch-aa Sat Aug 22 21:44:27 2009 +0000
+++ b/multimedia/dvdbackup/patches/patch-aa Sat Aug 22 22:05:23 2009 +0000
@@ -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 @@
/* 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);
Home |
Main Index |
Thread Index |
Old Index