pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/multimedia/dvdbackup Fix for newer version of libdvdre...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/349de7187112
branches:  trunk
changeset: 426843:349de7187112
user:      rhialto <rhialto%pkgsrc.org@localhost>
date:      Tue Apr 07 09:15:19 2020 +0000

description:
Fix for newer version of libdvdread, using patch from FreeBSD ports.

diffstat:

 multimedia/dvdbackup/Makefile                      |    3 +-
 multimedia/dvdbackup/distinfo                      |    3 +-
 multimedia/dvdbackup/patches/patch-src_dvdbackup.c |  108 +++++++++++++++++++++
 3 files changed, 112 insertions(+), 2 deletions(-)

diffs (136 lines):

diff -r 06caa32ce789 -r 349de7187112 multimedia/dvdbackup/Makefile
--- a/multimedia/dvdbackup/Makefile     Tue Apr 07 08:52:24 2020 +0000
+++ b/multimedia/dvdbackup/Makefile     Tue Apr 07 09:15:19 2020 +0000
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.12 2020/03/20 11:58:03 nia Exp $
+# $NetBSD: Makefile,v 1.13 2020/04/07 09:15:19 rhialto Exp $
 
 DISTNAME=      dvdbackup-0.4.2
+PKGREVISION=   1
 CATEGORIES=    multimedia
 MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE:=dvdbackup/}
 EXTRACT_SUFX=  .tar.xz
diff -r 06caa32ce789 -r 349de7187112 multimedia/dvdbackup/distinfo
--- a/multimedia/dvdbackup/distinfo     Tue Apr 07 08:52:24 2020 +0000
+++ b/multimedia/dvdbackup/distinfo     Tue Apr 07 09:15:19 2020 +0000
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.6 2015/11/03 23:54:23 agc Exp $
+$NetBSD: distinfo,v 1.7 2020/04/07 09:15:19 rhialto Exp $
 
 SHA1 (dvdbackup-0.4.2.tar.xz) = cf10f2e2d1d8df23ecda96e867b9a39ce6b6f884
 RMD160 (dvdbackup-0.4.2.tar.xz) = f329083761672932b38e61c0343935199e08b067
 SHA512 (dvdbackup-0.4.2.tar.xz) = df9abb2ca0b8a7cd7855ddff94dae249b06b2ec0ee42f3e9c53aa46aebd9885bdf26dacecbd4a20ff5f642ea10c0c64b811d25c23802c8a2b1489281900fbe0d
 Size (dvdbackup-0.4.2.tar.xz) = 178660 bytes
+SHA1 (patch-src_dvdbackup.c) = 3ea11e7d67d18fbabdded7e711091dfe76340401
diff -r 06caa32ce789 -r 349de7187112 multimedia/dvdbackup/patches/patch-src_dvdbackup.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/multimedia/dvdbackup/patches/patch-src_dvdbackup.c        Tue Apr 07 09:15:19 2020 +0000
@@ -0,0 +1,108 @@
+$NetBSD: patch-src_dvdbackup.c,v 1.3 2020/04/07 09:15:19 rhialto Exp $
+
+Patch taken from FreeBSD ports.
+FreeBSD PR:    https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=245228
+Submitted by:  felix%palmen-it.de@localhost
+
+--- src/dvdbackup.c.orig       2012-06-24 01:10:29 UTC
++++ src/dvdbackup.c
+@@ -1132,7 +1132,7 @@ static int DVDCopyIfoBup(dvd_reader_t* dvd, title_set_
+       int size;
+ 
+       /* DVD handler */
+-      ifo_handle_t* ifo_file = NULL;
++      dvd_file_t* ifo_file = NULL;
+ 
+ 
+       if (title_set_info->number_of_title_sets + 1 < title_set) {
+@@ -1181,7 +1181,7 @@ static int DVDCopyIfoBup(dvd_reader_t* dvd, title_set_
+       if ((streamout_ifo = open(targetname_ifo, O_WRONLY | O_CREAT | O_TRUNC, 0666)) == -1) {
+               fprintf(stderr, _("Error creating %s\n"), targetname_ifo);
+               perror(PACKAGE);
+-              ifoClose(ifo_file);
++              DVDCloseFile(ifo_file);
+               free(buffer);
+               close(streamout_ifo);
+               close(streamout_bup);
+@@ -1191,7 +1191,7 @@ static int DVDCopyIfoBup(dvd_reader_t* dvd, title_set_
+       if ((streamout_bup = open(targetname_bup, O_WRONLY | O_CREAT | O_TRUNC, 0666)) == -1) {
+               fprintf(stderr, _("Error creating %s\n"), targetname_bup);
+               perror(PACKAGE);
+-              ifoClose(ifo_file);
++              DVDCloseFile(ifo_file);
+               free(buffer);
+               close(streamout_ifo);
+               close(streamout_bup);
+@@ -1200,31 +1200,31 @@ static int DVDCopyIfoBup(dvd_reader_t* dvd, title_set_
+ 
+       /* Copy VIDEO_TS.IFO, since it's a small file try to copy it in one shot */
+ 
+-      if ((ifo_file = ifoOpen(dvd, title_set))== 0) {
++      if ((ifo_file = DVDOpenFile(dvd, title_set, DVD_READ_INFO_FILE))== 0) {
+               fprintf(stderr, _("Failed opening IFO for title set %d\n"), title_set);
+-              ifoClose(ifo_file);
++              DVDCloseFile(ifo_file);
+               free(buffer);
+               close(streamout_ifo);
+               close(streamout_bup);
+               return 1;
+       }
+ 
+-      size = DVDFileSize(ifo_file->file) * DVD_VIDEO_LB_LEN;
++      size = DVDFileSize(ifo_file) * DVD_VIDEO_LB_LEN;
+ 
+       if ((buffer = (unsigned char *)malloc(size * sizeof(unsigned char))) == NULL) {
+               perror(PACKAGE);
+-              ifoClose(ifo_file);
++              DVDCloseFile(ifo_file);
+               free(buffer);
+               close(streamout_ifo);
+               close(streamout_bup);
+               return 1;
+       }
+ 
+-      DVDFileSeek(ifo_file->file, 0);
++      DVDFileSeek(ifo_file, 0);
+ 
+-      if (DVDReadBytes(ifo_file->file,buffer,size) != size) {
++      if (DVDReadBytes(ifo_file,buffer,size) != size) {
+               fprintf(stderr, _("Error reading IFO for title set %d\n"), title_set);
+-              ifoClose(ifo_file);
++              DVDCloseFile(ifo_file);
+               free(buffer);
+               close(streamout_ifo);
+               close(streamout_bup);
+@@ -1234,7 +1234,7 @@ static int DVDCopyIfoBup(dvd_reader_t* dvd, title_set_
+ 
+       if (write(streamout_ifo,buffer,size) != size) {
+               fprintf(stderr, _("Error writing %s\n"),targetname_ifo);
+-              ifoClose(ifo_file);
++              DVDCloseFile(ifo_file);
+               free(buffer);
+               close(streamout_ifo);
+               close(streamout_bup);
+@@ -1243,7 +1243,7 @@ static int DVDCopyIfoBup(dvd_reader_t* dvd, title_set_
+ 
+       if (write(streamout_bup,buffer,size) != size) {
+               fprintf(stderr, _("Error writing %s\n"),targetname_bup);
+-              ifoClose(ifo_file);
++              DVDCloseFile(ifo_file);
+               free(buffer);
+               close(streamout_ifo);
+               close(streamout_bup);
+@@ -1546,7 +1546,6 @@ int DVDMirror(dvd_reader_t * _dvd, char * targetdir,ch
+ 
+       title_set_info = DVDGetFileSet(_dvd);
+       if (!title_set_info) {
+-              DVDClose(_dvd);
+               return(1);
+       }
+ 
+@@ -1573,7 +1572,6 @@ int DVDMirrorTitleSet(dvd_reader_t * _dvd, char * targ
+       title_set_info = DVDGetFileSet(_dvd);
+ 
+       if (!title_set_info) {
+-              DVDClose(_dvd);
+               return(1);
+       }
+ 



Home | Main Index | Thread Index | Old Index