From f873bbe692031c48e1445aec161a07b4a782cb5489ae73077bc2e58f96acedc6 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Thu, 15 Nov 2012 00:07:30 +0000 Subject: [PATCH 1/8] Add Freecode URL OBS-URL: https://build.opensuse.org/package/show/filesystems/libmirage?expand=0&rev=4 --- libmirage.spec | 34 +++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/libmirage.spec b/libmirage.spec index b0a7cc4..05e83b1 100644 --- a/libmirage.spec +++ b/libmirage.spec @@ -14,20 +14,31 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # + + Name: libmirage %define lname libmirage6 %define pname 1_5 Summary: A CD-ROM image access library -Version: 1.5.0 -Release: 0 -URL: http://cdemu.sf.net/ License: GPL-2.0+ Group: Development/Libraries/C and C++ +Version: 1.5.0 +Release: 0 +Url: http://cdemu.sf.net/ -Source: http://downloads.sf.net/cdemu/%name-%version.tar.bz2 +#Freecode-URL: https://freecode.com/projects/cdemu-for-linux +Source: http://downloads.sf.net/cdemu/%name-%version.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-build #BuildRequires: autoconf >= 2.59, automake -BuildRequires: gtk-doc >= 1.4 libtool pkgconfig(glib-2.0) >= 2.6 pkgconfig(gobject-2.0) >= 2.6 pkgconfig(gmodule-2.0) >= 2.6 pkgconfig(sndfile) >= 1.0.0 xz pkgconfig(zlib) pkgconfig >= 0.21 +BuildRequires: gtk-doc >= 1.4 +BuildRequires: libtool +BuildRequires: pkgconfig >= 0.21 +BuildRequires: xz +BuildRequires: pkgconfig(glib-2.0) >= 2.6 +BuildRequires: pkgconfig(gmodule-2.0) >= 2.6 +BuildRequires: pkgconfig(gobject-2.0) >= 2.6 +BuildRequires: pkgconfig(sndfile) >= 1.0.0 +BuildRequires: pkgconfig(zlib) %description A CD-ROM image access library part of the cdemu suite. @@ -40,7 +51,7 @@ file. Summary: A CD-ROM image access library Group: System/Libraries # Technically Suggests:, but pretty useless without -Requires: libmirage-1_5 >= 1.5 +Requires: libmirage-1_5 >= 1.5 %description -n libmirage6 A CD-ROM image access library part of the cdemu suite. @@ -50,9 +61,9 @@ image formats by creating a representation of disc stored in image file. %package 1_5 -Summary: CD-ROM image format plugins for libmirage -Group: System/Libraries -Recommends: libmirage-data +Summary: CD-ROM image format plugins for libmirage +Group: System/Libraries +Recommends: libmirage-data %description 1_5 A CD-ROM image access library part of the cdemu suite. @@ -78,11 +89,12 @@ file. This package contains files needed to develop with libmirage. %package data -Summary: MIME type definitions and documentation for libmirage +Summary: MIME type definitions and documentation for libmirage +Group: Development/Libraries/C and C++ Requires(post): shared-mime-info Requires(postun): shared-mime-info %if 0%{?suse_version} >= 1140 -BuildArch: noarch +BuildArch: noarch %endif %description data From a7086dc316c3502952a0da3194f4f36a5a8b8ac78ef28c0f2fc3254edfc9d09f Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sat, 22 Dec 2012 13:45:28 +0000 Subject: [PATCH 2/8] libmirage-2.0.0 OBS-URL: https://build.opensuse.org/package/show/filesystems/libmirage?expand=0&rev=5 --- libmirage-1.5.0.tar.bz2 | 3 -- libmirage-2.0.0.tar.bz2 | 3 ++ libmirage.changes | 17 +++++++++++ libmirage.spec | 66 +++++++++++++++++++++++++++-------------- 4 files changed, 64 insertions(+), 25 deletions(-) delete mode 100644 libmirage-1.5.0.tar.bz2 create mode 100644 libmirage-2.0.0.tar.bz2 diff --git a/libmirage-1.5.0.tar.bz2 b/libmirage-1.5.0.tar.bz2 deleted file mode 100644 index 06f40d5..0000000 --- a/libmirage-1.5.0.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3ba50c49e6e2a888175a4d5749ac557a53e37c1f409ce76d8e8adfd702c586a6 -size 509179 diff --git a/libmirage-2.0.0.tar.bz2 b/libmirage-2.0.0.tar.bz2 new file mode 100644 index 0000000..c39c71e --- /dev/null +++ b/libmirage-2.0.0.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:154003160e46d33af6d265d8fe03972924b2bc8326fd3572e7138b818f4b5a65 +size 178529 diff --git a/libmirage.changes b/libmirage.changes index cbd9d63..1f64cdd 100644 --- a/libmirage.changes +++ b/libmirage.changes @@ -1,3 +1,20 @@ +------------------------------------------------------------------- +Sat Dec 22 08:23:15 UTC 2012 - jengelh@inai.de + +- Update to new upstream release 2.0.0 (up from 1.5.0) +* Added ISZ, CSO and DMG file filters +* Converted DAA parser to a file filter and added support for the + related GBI format +* Converted audio fragment to a file filter +* Added file filter machinery and converted existing code to use it +* Image analyzer displays disc structures +* Added support for gobject introspection +* Added support for GZIP and XZ compressed images +* Added support for ECM'ed files +* Improved CIF parser +* Partial support for (one track) MDX images +* Improved GVFS support + ------------------------------------------------------------------- Mon May 21 17:33:17 UTC 2012 - jengelh@inai.de diff --git a/libmirage.spec b/libmirage.spec index 05e83b1..c4ae749 100644 --- a/libmirage.spec +++ b/libmirage.spec @@ -17,28 +17,30 @@ Name: libmirage -%define lname libmirage6 -%define pname 1_5 +%define lname libmirage7_0_0 +%define pname 2_0 Summary: A CD-ROM image access library License: GPL-2.0+ Group: Development/Libraries/C and C++ -Version: 1.5.0 +Version: 2.0.0 Release: 0 Url: http://cdemu.sf.net/ #Freecode-URL: https://freecode.com/projects/cdemu-for-linux +#Git-Clone: git://git.code.sf.net/p/cdemu/code Source: http://downloads.sf.net/cdemu/%name-%version.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-build -#BuildRequires: autoconf >= 2.59, automake -BuildRequires: gtk-doc >= 1.4 -BuildRequires: libtool +BuildRequires: cmake BuildRequires: pkgconfig >= 0.21 BuildRequires: xz -BuildRequires: pkgconfig(glib-2.0) >= 2.6 -BuildRequires: pkgconfig(gmodule-2.0) >= 2.6 -BuildRequires: pkgconfig(gobject-2.0) >= 2.6 +BuildRequires: pkgconfig(glib-2.0) >= 2.28 +BuildRequires: pkgconfig(gmodule-2.0) >= 2.28 +BuildRequires: pkgconfig(gobject-2.0) >= 2.28 +BuildRequires: pkgconfig(gobject-introspection-1.0) >= 1.30.0 +BuildRequires: pkgconfig(gtk-doc) >= 1.4 +BuildRequires: pkgconfig(liblzma) >= 5.0.0 BuildRequires: pkgconfig(sndfile) >= 1.0.0 -BuildRequires: pkgconfig(zlib) +BuildRequires: pkgconfig(zlib) >= 1.2.0 %description A CD-ROM image access library part of the cdemu suite. @@ -47,25 +49,29 @@ libmirage provides uniform access to the data stored in different image formats by creating a representation of disc stored in image file. -%package -n libmirage6 +%package -n %lname Summary: A CD-ROM image access library Group: System/Libraries # Technically Suggests:, but pretty useless without -Requires: libmirage-1_5 >= 1.5 +Requires: libmirage-2_0 >= 2.0 -%description -n libmirage6 +%description -n %lname A CD-ROM image access library part of the cdemu suite. libmirage provides uniform access to the data stored in different image formats by creating a representation of disc stored in image file. -%package 1_5 +%package 2_0 Summary: CD-ROM image format plugins for libmirage Group: System/Libraries +%if 0%{?suse_version} Recommends: libmirage-data +%else +Requires: libmirage-data +%endif -%description 1_5 +%description 2_0 A CD-ROM image access library part of the cdemu suite. libmirage provides uniform access to the data stored in different @@ -104,17 +110,28 @@ file. This package contains the MIME type definitions and documentation. +%package -n typelib-1_0-libmirage-2_0 +Summary: The libmirage CD-ROM image access library - introspection bindings +Group: System/Libraries + +%description -n typelib-1_0-libmirage-2_0 +libmirage provides uniform access to the data stored in different +image formats by creating a representation of disc stored in image +file. + +This package provides the GObject Introspection bindings for libmirage. + %prep -%setup -q +%setup -Tcqa0 %build -%configure --disable-static --enable-gtk-doc +cmake . -DCMAKE_INSTALL_PREFIX:PATH="%_prefix" \ + -DCMAKE_C_FLAGS="%optflags" ; make %{?_smp_mflags}; %install b="%buildroot"; make install DESTDIR="$b"; -find "$b/%_libdir" -type f -name "*.la" -delete; %post -n %lname -p /sbin/ldconfig @@ -126,13 +143,13 @@ update-mime-database %{_datadir}/mime || :; %postun data update-mime-database %{_datadir}/mime || :; -%files -n libmirage6 +%files -n %lname %defattr(-,root,root) -%_libdir/libmirage.so.6* +%_libdir/libmirage.so.* -%files 1_5 +%files 2_0 %defattr(-,root,root) -%_libdir/libmirage-1.5 +%_libdir/libmirage-2.0 %files data %defattr(-,root,root) @@ -144,5 +161,10 @@ update-mime-database %{_datadir}/mime || :; %_includedir/libmirage %_libdir/libmirage.so %_libdir/pkgconfig/libmirage.pc +%_datadir/gir-1.0 + +%files -n typelib-1_0-libmirage-2_0 +%defattr(-,root,root) +%_libdir/girepository-1.0 %changelog From 3c1ad8640d8f4803a6a763c17e51a84664c97a48fbdf719e865937a1772f3338 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sat, 22 Dec 2012 13:46:01 +0000 Subject: [PATCH 3/8] cmake weirdness OBS-URL: https://build.opensuse.org/package/show/filesystems/libmirage?expand=0&rev=6 --- libmirage.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libmirage.spec b/libmirage.spec index c4ae749..8426850 100644 --- a/libmirage.spec +++ b/libmirage.spec @@ -126,7 +126,7 @@ This package provides the GObject Introspection bindings for libmirage. %build cmake . -DCMAKE_INSTALL_PREFIX:PATH="%_prefix" \ - -DCMAKE_C_FLAGS="%optflags" ; + -DCMAKE_C_FLAGS:STRING="%optflags" ; make %{?_smp_mflags}; %install From a671c3bbc5cf9c06d2368b9ecc6160af698aab42a85cc558c13f4aae390462f8 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sat, 22 Dec 2012 16:47:06 +0000 Subject: [PATCH 4/8] Set cmake requirement OBS-URL: https://build.opensuse.org/package/show/filesystems/libmirage?expand=0&rev=7 --- libmirage.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libmirage.spec b/libmirage.spec index 8426850..aafdc0b 100644 --- a/libmirage.spec +++ b/libmirage.spec @@ -30,7 +30,7 @@ Url: http://cdemu.sf.net/ #Git-Clone: git://git.code.sf.net/p/cdemu/code Source: http://downloads.sf.net/cdemu/%name-%version.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-build -BuildRequires: cmake +BuildRequires: cmake >= 2.8.5 BuildRequires: pkgconfig >= 0.21 BuildRequires: xz BuildRequires: pkgconfig(glib-2.0) >= 2.28 From 4781653141026e90fe08f4e876095fdb39750cd3658222bc16965d765cb4a648 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sat, 5 Jan 2013 21:54:10 +0000 Subject: [PATCH 5/8] SO version fix OBS-URL: https://build.opensuse.org/package/show/filesystems/libmirage?expand=0&rev=8 --- ...fix-SOVERSION-which-should-be-set-to.patch | 28 +++++++++++++++++++ libmirage.changes | 5 ++++ libmirage.spec | 22 +++++++++++---- 3 files changed, 50 insertions(+), 5 deletions(-) create mode 100644 0001-libMirage-CMake-fix-SOVERSION-which-should-be-set-to.patch diff --git a/0001-libMirage-CMake-fix-SOVERSION-which-should-be-set-to.patch b/0001-libMirage-CMake-fix-SOVERSION-which-should-be-set-to.patch new file mode 100644 index 0000000..e8e5012 --- /dev/null +++ b/0001-libMirage-CMake-fix-SOVERSION-which-should-be-set-to.patch @@ -0,0 +1,28 @@ +From 652f856be7cba289d340b16f78f26e202cf6aa8f Mon Sep 17 00:00:00 2001 +From: Rok Mandeljc +Date: Sat, 22 Dec 2012 21:28:02 +0100 +Subject: [PATCH] libMirage: CMake: fix SOVERSION, which should be set to + MIRAGE_LT_CURRENT, whereas VERSION needs to be set to + MIRAGE_SOVERSION, to produce correct symlinks + +--- + libmirage/CMakeLists.txt | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/libmirage/CMakeLists.txt b/libmirage/CMakeLists.txt +index 8a5e39b..ff72aab 100644 +--- a/libmirage/CMakeLists.txt ++++ b/libmirage/CMakeLists.txt +@@ -112,7 +112,8 @@ set_target_properties (mirage PROPERTIES + COMPILE_DEFINITIONS "${mirage_DEFS}" + LINK_FLAGS ${mirage_LDFLAGS_STR} + LIBRARY_OUTPUT_NAME mirage +- SOVERSION ${MIRAGE_SOVERSION} ++ VERSION ${MIRAGE_SOVERSION} ++ SOVERSION ${MIRAGE_LT_CURRENT} + ) + + install ( +-- +1.7.10.4 + diff --git a/libmirage.changes b/libmirage.changes index 1f64cdd..deef2aa 100644 --- a/libmirage.changes +++ b/libmirage.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sat Jan 5 21:47:42 UTC 2013 - jengelh@inai.de + +- Add 0001-libMirage-CMake-fix-SOVERSION-which-should-be-set-to.patch + ------------------------------------------------------------------- Sat Dec 22 08:23:15 UTC 2012 - jengelh@inai.de diff --git a/libmirage.spec b/libmirage.spec index aafdc0b..b0e0a66 100644 --- a/libmirage.spec +++ b/libmirage.spec @@ -1,7 +1,7 @@ # # spec file for package libmirage # -# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: libmirage -%define lname libmirage7_0_0 +%define lname libmirage7 %define pname 2_0 Summary: A CD-ROM image access library License: GPL-2.0+ @@ -29,10 +29,12 @@ Url: http://cdemu.sf.net/ #Freecode-URL: https://freecode.com/projects/cdemu-for-linux #Git-Clone: git://git.code.sf.net/p/cdemu/code Source: http://downloads.sf.net/cdemu/%name-%version.tar.bz2 +Patch1: 0001-libMirage-CMake-fix-SOVERSION-which-should-be-set-to.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: cmake >= 2.8.5 -BuildRequires: pkgconfig >= 0.21 +BuildRequires: pkgconfig >= 0.16 BuildRequires: xz +BuildRequires: pkgconfig(bzip2) >= 1.0.0 BuildRequires: pkgconfig(glib-2.0) >= 2.28 BuildRequires: pkgconfig(gmodule-2.0) >= 2.28 BuildRequires: pkgconfig(gobject-2.0) >= 2.28 @@ -123,10 +125,16 @@ This package provides the GObject Introspection bindings for libmirage. %prep %setup -Tcqa0 +%patch -P 1 -p2 %build -cmake . -DCMAKE_INSTALL_PREFIX:PATH="%_prefix" \ - -DCMAKE_C_FLAGS:STRING="%optflags" ; +# gir is busted on 12.1 +cmake . \ +%if 0%{?suse_version} == 1210 + -DINTROSPECTION_ENABLED=0 \ +%endif + -DCMAKE_INSTALL_PREFIX:PATH="%_prefix" \ + -DCMAKE_C_FLAGS:STRING="%optflags"; make %{?_smp_mflags}; %install @@ -161,10 +169,14 @@ update-mime-database %{_datadir}/mime || :; %_includedir/libmirage %_libdir/libmirage.so %_libdir/pkgconfig/libmirage.pc +%if 0%{?suse_version} != 1210 %_datadir/gir-1.0 +%endif +%if 0%{?suse_version} != 1210 %files -n typelib-1_0-libmirage-2_0 %defattr(-,root,root) %_libdir/girepository-1.0 +%endif %changelog From d187fd6e0436e35fde96a4602cbe86650c6608c90d3664b4eaf859e6aa2783c9 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sat, 23 Feb 2013 11:53:55 +0000 Subject: [PATCH 6/8] Quo vadis, Fedora OBS-URL: https://build.opensuse.org/package/show/filesystems/libmirage?expand=0&rev=9 --- libmirage.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libmirage.spec b/libmirage.spec index b0e0a66..6ef166b 100644 --- a/libmirage.spec +++ b/libmirage.spec @@ -34,7 +34,6 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: cmake >= 2.8.5 BuildRequires: pkgconfig >= 0.16 BuildRequires: xz -BuildRequires: pkgconfig(bzip2) >= 1.0.0 BuildRequires: pkgconfig(glib-2.0) >= 2.28 BuildRequires: pkgconfig(gmodule-2.0) >= 2.28 BuildRequires: pkgconfig(gobject-2.0) >= 2.28 @@ -43,6 +42,11 @@ BuildRequires: pkgconfig(gtk-doc) >= 1.4 BuildRequires: pkgconfig(liblzma) >= 5.0.0 BuildRequires: pkgconfig(sndfile) >= 1.0.0 BuildRequires: pkgconfig(zlib) >= 1.2.0 +%if 0%{?fedora_version} +BuildRequires: bzip2-devel >= 1.0.0 +%else +BuildRequires: pkgconfig(bzip2) >= 1.0.0 +%endif %description A CD-ROM image access library part of the cdemu suite. From 6191d8e8d7bf304914ec355a5e4933f5bd9af5a27706b76cea2ecab58d917c5b Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sun, 24 Feb 2013 20:10:53 +0000 Subject: [PATCH 7/8] Restore READCD support OBS-URL: https://build.opensuse.org/package/show/filesystems/libmirage?expand=0&rev=10 --- ...-Parser-when-verifying-the-file-don-.patch | 25 +++++++++++++++++++ libmirage.changes | 6 +++++ libmirage.spec | 3 ++- 3 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 0001-libMirage-READCD-Parser-when-verifying-the-file-don-.patch diff --git a/0001-libMirage-READCD-Parser-when-verifying-the-file-don-.patch b/0001-libMirage-READCD-Parser-when-verifying-the-file-don-.patch new file mode 100644 index 0000000..be4d810 --- /dev/null +++ b/0001-libMirage-READCD-Parser-when-verifying-the-file-don-.patch @@ -0,0 +1,25 @@ +From 0a79a47489bf739d97d416bc740fc081704a13b1 Mon Sep 17 00:00:00 2001 +From: Rok Mandeljc +Date: Sun, 24 Feb 2013 20:25:17 +0100 +Subject: [PATCH] libMirage: READCD Parser: when verifying the file, don't + forget to seek to the beginning first. + +--- + libmirage/src/parsers/image-readcd/image-readcd-parser.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/libmirage/src/parsers/image-readcd/image-readcd-parser.c b/libmirage/src/parsers/image-readcd/image-readcd-parser.c +index 39c0522..9b8a76b 100644 +--- a/libmirage/src/parsers/image-readcd/image-readcd-parser.c ++++ b/libmirage/src/parsers/image-readcd/image-readcd-parser.c +@@ -58,6 +58,7 @@ static gboolean mirage_parser_readcd_is_file_valid (MirageParserReadcd *self, GI + + /* 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); + if (g_input_stream_read(stream, &toc_len, sizeof(toc_len), NULL, NULL) != sizeof(toc_len)) { + g_set_error(error, MIRAGE_ERROR, MIRAGE_ERROR_CANNOT_HANDLE, "Parser cannot handle given image: failed to read 2-byte TOC length!"); + return FALSE; +-- +1.7.10.4 + diff --git a/libmirage.changes b/libmirage.changes index deef2aa..dde6b7e 100644 --- a/libmirage.changes +++ b/libmirage.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sun Feb 24 20:08:18 UTC 2013 - jengelh@inai.de + +- Add 0001-libMirage-READCD-Parser-when-verifying-the-file-don-.patch + to make images created by readcd(1) usable again + ------------------------------------------------------------------- Sat Jan 5 21:47:42 UTC 2013 - jengelh@inai.de diff --git a/libmirage.spec b/libmirage.spec index 6ef166b..17dd453 100644 --- a/libmirage.spec +++ b/libmirage.spec @@ -30,6 +30,7 @@ Url: http://cdemu.sf.net/ #Git-Clone: git://git.code.sf.net/p/cdemu/code Source: http://downloads.sf.net/cdemu/%name-%version.tar.bz2 Patch1: 0001-libMirage-CMake-fix-SOVERSION-which-should-be-set-to.patch +Patch2: 0001-libMirage-READCD-Parser-when-verifying-the-file-don-.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: cmake >= 2.8.5 BuildRequires: pkgconfig >= 0.16 @@ -129,7 +130,7 @@ This package provides the GObject Introspection bindings for libmirage. %prep %setup -Tcqa0 -%patch -P 1 -p2 +%patch -P 1 -P 2 -p2 %build # gir is busted on 12.1 From cbd34cda3960c9018bac3dc0fb7ee3a9d2cdfdb2589486b693ac10300a5012f1 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sun, 24 Feb 2013 22:57:44 +0000 Subject: [PATCH 8/8] Restore READCD support 2 OBS-URL: https://build.opensuse.org/package/show/filesystems/libmirage?expand=0&rev=11 --- ...-Parser-readcd-from-cdrtools-appears.patch | 39 +++++++++++++++++++ libmirage.changes | 1 + libmirage.spec | 3 +- 3 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 0001-libMirage-READCD-Parser-readcd-from-cdrtools-appears.patch diff --git a/0001-libMirage-READCD-Parser-readcd-from-cdrtools-appears.patch b/0001-libMirage-READCD-Parser-readcd-from-cdrtools-appears.patch new file mode 100644 index 0000000..019b5ec --- /dev/null +++ b/0001-libMirage-READCD-Parser-readcd-from-cdrtools-appears.patch @@ -0,0 +1,39 @@ +From ce6f8c419a3b6f81d9045a5cf36f625c8a229405 Mon Sep 17 00:00:00 2001 +From: Rok Mandeljc +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 + diff --git a/libmirage.changes b/libmirage.changes index dde6b7e..2424d34 100644 --- a/libmirage.changes +++ b/libmirage.changes @@ -2,6 +2,7 @@ Sun Feb 24 20:08:18 UTC 2013 - jengelh@inai.de - 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 ------------------------------------------------------------------- diff --git a/libmirage.spec b/libmirage.spec index 17dd453..e34201b 100644 --- a/libmirage.spec +++ b/libmirage.spec @@ -31,6 +31,7 @@ Url: http://cdemu.sf.net/ Source: http://downloads.sf.net/cdemu/%name-%version.tar.bz2 Patch1: 0001-libMirage-CMake-fix-SOVERSION-which-should-be-set-to.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 BuildRequires: cmake >= 2.8.5 BuildRequires: pkgconfig >= 0.16 @@ -130,7 +131,7 @@ This package provides the GObject Introspection bindings for libmirage. %prep %setup -Tcqa0 -%patch -P 1 -P 2 -p2 +%patch -P 1 -P 2 -P 3 -p2 %build # gir is busted on 12.1