forked from pool/libmirage
Restore READCD support 2
OBS-URL: https://build.opensuse.org/package/show/filesystems/libmirage?expand=0&rev=11
This commit is contained in:
parent
6191d8e8d7
commit
cbd34cda39
@ -0,0 +1,39 @@
|
|||||||
|
From ce6f8c419a3b6f81d9045a5cf36f625c8a229405 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Rok Mandeljc <rok.mandeljc@gmail.com>
|
||||||
|
Date: Sun, 24 Feb 2013 23:46:48 +0100
|
||||||
|
Subject: [PATCH] libMirage: READCD Parser: readcd from cdrtools appears to
|
||||||
|
pad odd TOC lengths to make them even, whereas readcd from
|
||||||
|
cdrkit does not. Make the .toc validation take this into
|
||||||
|
account.
|
||||||
|
|
||||||
|
---
|
||||||
|
libmirage/src/parsers/image-readcd/image-readcd-parser.c | 6 ++++--
|
||||||
|
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/libmirage/src/parsers/image-readcd/image-readcd-parser.c b/libmirage/src/parsers/image-readcd/image-readcd-parser.c
|
||||||
|
index 9b8a76b..68dc820 100644
|
||||||
|
--- a/libmirage/src/parsers/image-readcd/image-readcd-parser.c
|
||||||
|
+++ b/libmirage/src/parsers/image-readcd/image-readcd-parser.c
|
||||||
|
@@ -55,7 +55,6 @@ static gboolean mirage_parser_readcd_is_file_valid (MirageParserReadcd *self, GI
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
-
|
||||||
|
/* First 4 bytes of TOC are its header; and first 2 bytes of that indicate
|
||||||
|
the length */
|
||||||
|
g_seekable_seek(G_SEEKABLE(stream), 0, G_SEEK_SET, NULL, NULL);
|
||||||
|
@@ -70,7 +69,10 @@ static gboolean mirage_parser_readcd_is_file_valid (MirageParserReadcd *self, GI
|
||||||
|
g_seekable_seek(G_SEEKABLE(stream), 0, G_SEEK_END, NULL, NULL);
|
||||||
|
file_size = g_seekable_tell(G_SEEKABLE(stream));
|
||||||
|
|
||||||
|
- if (file_size - 2 == toc_len + 2) {
|
||||||
|
+ /* readcd from cdrdtools appears to pad odd TOC lengths to make them
|
||||||
|
+ even, whereas readcd from cdrkit does not. So we account for both
|
||||||
|
+ cases. */
|
||||||
|
+ if ((file_size == 2 + toc_len + 2) || (file_size == 2 + toc_len + 3)) {
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
--
|
||||||
|
1.7.10.4
|
||||||
|
|
@ -2,6 +2,7 @@
|
|||||||
Sun Feb 24 20:08:18 UTC 2013 - jengelh@inai.de
|
Sun Feb 24 20:08:18 UTC 2013 - jengelh@inai.de
|
||||||
|
|
||||||
- Add 0001-libMirage-READCD-Parser-when-verifying-the-file-don-.patch
|
- Add 0001-libMirage-READCD-Parser-when-verifying-the-file-don-.patch
|
||||||
|
0001-libMirage-READCD-Parser-readcd-from-cdrtools-appears.patch
|
||||||
to make images created by readcd(1) usable again
|
to make images created by readcd(1) usable again
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
|
@ -31,6 +31,7 @@ Url: http://cdemu.sf.net/
|
|||||||
Source: http://downloads.sf.net/cdemu/%name-%version.tar.bz2
|
Source: http://downloads.sf.net/cdemu/%name-%version.tar.bz2
|
||||||
Patch1: 0001-libMirage-CMake-fix-SOVERSION-which-should-be-set-to.patch
|
Patch1: 0001-libMirage-CMake-fix-SOVERSION-which-should-be-set-to.patch
|
||||||
Patch2: 0001-libMirage-READCD-Parser-when-verifying-the-file-don-.patch
|
Patch2: 0001-libMirage-READCD-Parser-when-verifying-the-file-don-.patch
|
||||||
|
Patch3: 0001-libMirage-READCD-Parser-readcd-from-cdrtools-appears.patch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
BuildRequires: cmake >= 2.8.5
|
BuildRequires: cmake >= 2.8.5
|
||||||
BuildRequires: pkgconfig >= 0.16
|
BuildRequires: pkgconfig >= 0.16
|
||||||
@ -130,7 +131,7 @@ This package provides the GObject Introspection bindings for libmirage.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -Tcqa0
|
%setup -Tcqa0
|
||||||
%patch -P 1 -P 2 -p2
|
%patch -P 1 -P 2 -P 3 -p2
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# gir is busted on 12.1
|
# gir is busted on 12.1
|
||||||
|
Loading…
Reference in New Issue
Block a user