[calibre/f16] Add patch to work with poppler 0.17.3

mkasik mkasik at fedoraproject.org
Wed Sep 21 10:42:28 UTC 2011


commit ef215c2874f7a5dc8d5deba209f78e52a79fb36f
Author: Marek Kasik <mkasik at redhat.com>
Date:   Wed Sep 21 12:41:36 2011 +0200

    Add patch to work with poppler 0.17.3

 calibre-0.8.11-poppler-0.17.3.patch |   26 ++++++++++++++++++++++++++
 calibre.spec                        |    9 ++++++++-
 2 files changed, 34 insertions(+), 1 deletions(-)
---
diff --git a/calibre-0.8.11-poppler-0.17.3.patch b/calibre-0.8.11-poppler-0.17.3.patch
new file mode 100644
index 0000000..bdf9070
--- /dev/null
+++ b/calibre-0.8.11-poppler-0.17.3.patch
@@ -0,0 +1,26 @@
+--- calibre/src/calibre/ebooks/pdf/images.cpp	2011-07-22 18:17:44.000000000 +0200
++++ calibre/src/calibre/ebooks/pdf/images.cpp	2011-09-09 13:30:26.000000000 +0200
+@@ -126,7 +126,13 @@ void XMLImages::add(GfxState *state, Obj
+ 
+     if (img->type == jpeg) {
+         int c;
++
++#if POPPLER_CHECK_VERSION(0, 17, 3)
++        str = str->getBaseStream();
++#else
+         str = ((DCTStream *)str)->getRawStream();
++#endif
++
+         str->reset();
+ 
+         // copy the stream
+--- calibre/src/calibre/ebooks/pdf/images.h	2011-09-09 13:35:14.000000000 +0200
++++ calibre/src/calibre/ebooks/pdf/images.h	2011-09-09 13:35:27.000000000 +0200
+@@ -12,6 +12,7 @@
+ #include <splash/SplashBitmap.h>
+ #include <png.h>
+ #include <jpeglib.h>
++#include <glib/poppler-features.h>
+ #include "utils.h"
+ 
+ using namespace std;
diff --git a/calibre.spec b/calibre.spec
index 565760a..22ad914 100644
--- a/calibre.spec
+++ b/calibre.spec
@@ -2,7 +2,7 @@
 
 Name:           calibre
 Version:        0.8.11
-Release:        2%{?dist}
+Release:        3%{?dist}
 Summary:        E-book converter and library management
 Group:          Applications/Multimedia
 License:        GPLv3
@@ -25,6 +25,7 @@ Patch1:         %{name}-no-update.patch
 # (use the correct API for the external pyPdf library)
 Patch2:         %{name}-0.7.38-pyPdf-fix.patch
 Patch3:         calibre-0.8.10-poppler.patch
+Patch4:         calibre-0.8.11-poppler-0.17.3.patch
 
 BuildRequires:  python >= 2.6
 BuildRequires:  python-devel >= 2.6
@@ -98,6 +99,9 @@ RTF, TXT, PDF and LRS.
 # work with poppler 0.17
 %patch3 -p1 -b .poppler-fix
 
+# fix for poppler 0.17.3
+%patch4 -p1 -b .poppler-0.17.3
+
 # dos2unix newline conversion
 %{__sed} -i 's/\r//' src/calibre/web/feeds/recipes/*
 
@@ -260,6 +264,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
 %{_mandir}/man1/*
 
 %changelog
+* Wed Sep 21 2011 Marek Kasik <mkasik at redhat.com> - 0.8.11-3
+- Add patch to work with poppler 0.17.3
+
 * Wed Sep 21 2011 Marek Kasik <mkasik at redhat.com> - 0.8.11-2
 - Rebuild (poppler-0.17.3)
 


More information about the scm-commits mailing list