dvdbackup: fix build with libdvdread 6.1

This commit is contained in:
Jerome Duval
2020-10-21 18:30:19 +02:00
parent af05331c94
commit 510a4c43e8
2 changed files with 99 additions and 0 deletions

View File

@@ -8,6 +8,7 @@ LICENSE="GNU GPL v3"
REVISION="4" REVISION="4"
SOURCE_URI="http://downloads.sf.net/dvdbackup/dvdbackup-$portVersion.tar.gz" SOURCE_URI="http://downloads.sf.net/dvdbackup/dvdbackup-$portVersion.tar.gz"
CHECKSUM_SHA256="0a37c31cc6f2d3c146ec57064bda8a06cf5f2ec90455366cb250506bab964550" CHECKSUM_SHA256="0a37c31cc6f2d3c146ec57064bda8a06cf5f2ec90455366cb250506bab964550"
PATCHES="dvdbackup-$portVersion.patchset"
ARCHITECTURES="!x86_gcc2 x86 x86_64" ARCHITECTURES="!x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="!x86_gcc2 x86" SECONDARY_ARCHITECTURES="!x86_gcc2 x86"
@@ -32,6 +33,7 @@ BUILD_REQUIRES="
BUILD_PREREQUIRES=" BUILD_PREREQUIRES="
cmd:awk cmd:awk
cmd:gcc$secondaryArchSuffix cmd:gcc$secondaryArchSuffix
cmd:getconf
cmd:ld$secondaryArchSuffix cmd:ld$secondaryArchSuffix
cmd:make cmd:make
cmd:pkg_config$secondaryArchSuffix cmd:pkg_config$secondaryArchSuffix

View File

@@ -0,0 +1,97 @@
From 55833694f51a1a9315b62bac6ea709dc7add2d9f Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Wed, 21 Oct 2020 18:28:13 +0200
Subject: libdvdread 6.1 patch from ArchLinux
diff --git a/src/dvdbackup.c b/src/dvdbackup.c
index 5888ce5..b076a76 100644
--- a/src/dvdbackup.c
+++ b/src/dvdbackup.c
@@ -1132,7 +1132,7 @@ static int DVDCopyIfoBup(dvd_reader_t* dvd, title_set_info_t* title_set_info, in
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_info_t* title_set_info, in
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_info_t* title_set_info, in
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_info_t* title_set_info, in
/* 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_info_t* title_set_info, in
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_info_t* title_set_info, in
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);
--
2.28.0