summaryrefslogtreecommitdiff
path: root/gnu
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
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')
-rw-r--r--gnu/local.mk1
-rw-r--r--gnu/packages/patches/dvdbackup-with-libdvdread-6.1.0+.patch88
-rw-r--r--gnu/packages/video.scm4
3 files changed, 92 insertions, 1 deletions
diff --git a/gnu/local.mk b/gnu/local.mk
index 820ebdb5c72..048932f28ca 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1201,6 +1201,7 @@ dist_patch_DATA = \
1201 %D%/packages/patches/duc-fix-test-sh.patch \ 1201 %D%/packages/patches/duc-fix-test-sh.patch \
1202 %D%/packages/patches/dune-common-skip-failing-tests.patch \ 1202 %D%/packages/patches/dune-common-skip-failing-tests.patch \
1203 %D%/packages/patches/durden-shadow-arcan.patch \ 1203 %D%/packages/patches/durden-shadow-arcan.patch \
1204 %D%/packages/patches/dvdbackup-with-libdvdread-6.1.0+.patch \
1204 %D%/packages/patches/dvd+rw-tools-add-include.patch \ 1205 %D%/packages/patches/dvd+rw-tools-add-include.patch \
1205 %D%/packages/patches/dwarves-threading-reproducibility.patch \ 1206 %D%/packages/patches/dwarves-threading-reproducibility.patch \
1206 %D%/packages/patches/efivar-fix-fprint-format.patch \ 1207 %D%/packages/patches/efivar-fix-fprint-format.patch \
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 @@
1diff --git a/src/dvdbackup.c b/src/dvdbackup.c
2index 5888ce5..fae109d 100644
3--- a/src/dvdbackup.c
4+++ b/src/dvdbackup.c
5@@ -1132,7 +1132,7 @@ static int DVDCopyIfoBup(dvd_reader_t* dvd, title_set_info_t* title_set_info, in
6 int size;
7
8 /* DVD handler */
9- ifo_handle_t* ifo_file = NULL;
10+ dvd_file_t* ifo_file = NULL;
11
12
13 if (title_set_info->number_of_title_sets + 1 < title_set) {
14@@ -1181,7 +1181,7 @@ static int DVDCopyIfoBup(dvd_reader_t* dvd, title_set_info_t* title_set_info, in
15 if ((streamout_ifo = open(targetname_ifo, O_WRONLY | O_CREAT | O_TRUNC, 0666)) == -1) {
16 fprintf(stderr, _("Error creating %s\n"), targetname_ifo);
17 perror(PACKAGE);
18- ifoClose(ifo_file);
19+ DVDCloseFile(ifo_file);
20 free(buffer);
21 close(streamout_ifo);
22 close(streamout_bup);
23@@ -1191,7 +1191,7 @@ static int DVDCopyIfoBup(dvd_reader_t* dvd, title_set_info_t* title_set_info, in
24 if ((streamout_bup = open(targetname_bup, O_WRONLY | O_CREAT | O_TRUNC, 0666)) == -1) {
25 fprintf(stderr, _("Error creating %s\n"), targetname_bup);
26 perror(PACKAGE);
27- ifoClose(ifo_file);
28+ DVDCloseFile(ifo_file);
29 free(buffer);
30 close(streamout_ifo);
31 close(streamout_bup);
32@@ -1200,31 +1200,31 @@ static int DVDCopyIfoBup(dvd_reader_t* dvd, title_set_info_t* title_set_info, in
33
34 /* Copy VIDEO_TS.IFO, since it's a small file try to copy it in one shot */
35
36- if ((ifo_file = ifoOpen(dvd, title_set))== 0) {
37+ if ((ifo_file = DVDOpenFile(dvd, title_set, DVD_READ_INFO_FILE))== 0) {
38 fprintf(stderr, _("Failed opening IFO for title set %d\n"), title_set);
39- ifoClose(ifo_file);
40+ DVDCloseFile(ifo_file);
41 free(buffer);
42 close(streamout_ifo);
43 close(streamout_bup);
44 return 1;
45 }
46
47- size = DVDFileSize(ifo_file->file) * DVD_VIDEO_LB_LEN;
48+ size = DVDFileSize(ifo_file) * DVD_VIDEO_LB_LEN;
49
50 if ((buffer = (unsigned char *)malloc(size * sizeof(unsigned char))) == NULL) {
51 perror(PACKAGE);
52- ifoClose(ifo_file);
53+ DVDCloseFile(ifo_file);
54 free(buffer);
55 close(streamout_ifo);
56 close(streamout_bup);
57 return 1;
58 }
59
60- DVDFileSeek(ifo_file->file, 0);
61+ DVDFileSeek(ifo_file, 0);
62
63- if (DVDReadBytes(ifo_file->file,buffer,size) != size) {
64+ if (DVDReadBytes(ifo_file,buffer,size) != size) {
65 fprintf(stderr, _("Error reading IFO for title set %d\n"), title_set);
66- ifoClose(ifo_file);
67+ DVDCloseFile(ifo_file);
68 free(buffer);
69 close(streamout_ifo);
70 close(streamout_bup);
71@@ -1234,7 +1234,7 @@ static int DVDCopyIfoBup(dvd_reader_t* dvd, title_set_info_t* title_set_info, in
72
73 if (write(streamout_ifo,buffer,size) != size) {
74 fprintf(stderr, _("Error writing %s\n"),targetname_ifo);
75- ifoClose(ifo_file);
76+ DVDCloseFile(ifo_file);
77 free(buffer);
78 close(streamout_ifo);
79 close(streamout_bup);
80@@ -1243,7 +1243,7 @@ static int DVDCopyIfoBup(dvd_reader_t* dvd, title_set_info_t* title_set_info, in
81
82 if (write(streamout_bup,buffer,size) != size) {
83 fprintf(stderr, _("Error writing %s\n"),targetname_bup);
84- ifoClose(ifo_file);
85+ DVDCloseFile(ifo_file);
86 free(buffer);
87 close(streamout_ifo);
88 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.")
6497 "dvdbackup-" version "/" 6497 "dvdbackup-" version "/"
6498 "dvdbackup-" version ".tar.xz")) 6498 "dvdbackup-" version ".tar.xz"))
6499 (sha256 6499 (sha256
6500 (base32 "1rl3h7waqja8blmbpmwy01q9fgr5r0c32b8dy3pbf59bp3xmd37g")))) 6500 (base32 "1rl3h7waqja8blmbpmwy01q9fgr5r0c32b8dy3pbf59bp3xmd37g"))
6501 ;; XXX: https://bugs.launchpad.net/dvdbackup/+bug/1869226
6502 (patches (search-patches "dvdbackup-with-libdvdread-6.1.0+.patch"))))
6501 (build-system gnu-build-system) 6503 (build-system gnu-build-system)
6502 (inputs 6504 (inputs
6503 (list libdvdcss libdvdread)) 6505 (list libdvdcss libdvdread))