summaryrefslogtreecommitdiff
path: root/gnu/packages
diff options
context:
space:
mode:
authorAlexey Abramov <levenson@mmer.org>2024-07-02 12:20:58 +0000
committerIan Eure <ian@retrospec.tv>2025-12-20 10:24:55 -0800
commit4eef7ffd5e9bfbf180396f18be2cd3fa1621b1e4 (patch)
tree488a1e3ffbe6f0e283e2909dcdcdf0ba564c9e37 /gnu/packages
parentd392af43c53dc90ee9a3c1d6b29cd9a7fe514fb2 (diff)
gnu: dvdbackup: Fix build with libdvdread 6.1.0+.
* gnu/packages/patches/dvdbackup-with-libdvdread-6.1.0+.patch: Add the patch to fix the build. * gnu/local.mk: Ship it. * gnu/packages/video.scm: Use it.
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/patches/dvdbackup-with-libdvdread-6.1.0+.patch88
-rw-r--r--gnu/packages/video.scm4
2 files changed, 91 insertions, 1 deletions
diff --git a/gnu/packages/patches/dvdbackup-with-libdvdread-6.1.0+.patch b/gnu/packages/patches/dvdbackup-with-libdvdread-6.1.0+.patch
new file mode 100644
index 00000000000..9dd700fa557
--- /dev/null
+++ b/gnu/packages/patches/dvdbackup-with-libdvdread-6.1.0+.patch
@@ -0,0 +1,88 @@
+diff --git a/src/dvdbackup.c b/src/dvdbackup.c
+index 5888ce5..fae109d 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);
diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index 681c210a8b3..69089f61198 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -6497,7 +6497,9 @@ Theora videos. Theorafile was written to be used for FNA's VideoPlayer.")
"dvdbackup-" version "/"
"dvdbackup-" version ".tar.xz"))
(sha256
- (base32 "1rl3h7waqja8blmbpmwy01q9fgr5r0c32b8dy3pbf59bp3xmd37g"))))
+ (base32 "1rl3h7waqja8blmbpmwy01q9fgr5r0c32b8dy3pbf59bp3xmd37g"))
+ ;; XXX: https://bugs.launchpad.net/dvdbackup/+bug/1869226
+ (patches (search-patches "dvdbackup-with-libdvdread-6.1.0+.patch"))))
(build-system gnu-build-system)
(inputs
(list libdvdcss libdvdread))