[packages/ka5-kitinerary] - fix building with poppler 0.82 - rel 2

baggins baggins at pld-linux.org
Sun Nov 3 15:12:04 CET 2019


commit f27320082b5a8778f7d8d59bea8e6d18e0ec8140
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sun Nov 3 15:10:21 2019 +0100

    - fix building with poppler 0.82
    - rel 2

 ka5-kitinerary.spec |  4 ++-
 poppler-0.82.patch  | 72 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 75 insertions(+), 1 deletion(-)
---
diff --git a/ka5-kitinerary.spec b/ka5-kitinerary.spec
index bbaddf7..893cbbc 100644
--- a/ka5-kitinerary.spec
+++ b/ka5-kitinerary.spec
@@ -5,11 +5,12 @@
 Summary:	kitinerary
 Name:		ka5-%{kaname}
 Version:	19.04.1
-Release:	1
+Release:	2
 License:	GPL v2+/LGPL v2.1+
 Group:		X11/Libraries
 Source0:	http://download.kde.org/stable/applications/%{kdeappsver}/src/%{kaname}-%{version}.tar.xz
 # Source0-md5:	d1e9604ac8dccbb550def3efb1233722
+Patch0:		poppler-0.82.patch
 URL:		http://www.kde.org/
 BuildRequires:	Qt5Core-devel >= %{qtver}
 BuildRequires:	Qt5Gui-devel
@@ -55,6 +56,7 @@ Pliki nagłówkowe dla programistów używających %{kaname}.
 
 %prep
 %setup -q -n %{kaname}-%{version}
+%patch0 -p1
 
 %build
 install -d build
diff --git a/poppler-0.82.patch b/poppler-0.82.patch
new file mode 100644
index 0000000..06d38bc
--- /dev/null
+++ b/poppler-0.82.patch
@@ -0,0 +1,72 @@
+--- kitinerary-19.04.1/src/pdfdocument.cpp~	2019-04-29 07:13:27.000000000 +0200
++++ kitinerary-19.04.1/src/pdfdocument.cpp	2019-11-03 14:59:36.863067477 +0100
+@@ -95,7 +95,11 @@
+ public:
+     ExtractorOutputDevice();
+     bool needNonText() override { return true; }
++#ifdef HAVE_POPPLER_0_82
++    void drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, bool interpolate, const int *maskColors, bool inlineImg) override;
++#else
+     void drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, bool interpolate, int *maskColors, bool inlineImg) override;
++#endif
+ 
+     std::vector<PdfImage> m_images;
+ 
+@@ -118,7 +118,11 @@
+     bool upsideDown() override { return false; }
+     bool useDrawChar() override { return false; }
+ 
++#ifdef HAVE_POPPLER_0_82
++    void drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, bool interpolate, const int *maskColors, bool inlineImg) override;
++#else
+     void drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, bool interpolate, int *maskColors, bool inlineImg) override;
++#endif
+     QImage image() const { return m_image; }
+ 
+ private:
+@@ -178,7 +182,11 @@
+ {
+ }
+ 
++#ifdef HAVE_POPPLER_0_82
++void ExtractorOutputDevice::drawImage(GfxState* state, Object* ref, Stream* str, int width, int height, GfxImageColorMap* colorMap, bool interpolate, const int* maskColors, bool inlineImg)
++#else
+ void ExtractorOutputDevice::drawImage(GfxState* state, Object* ref, Stream* str, int width, int height, GfxImageColorMap* colorMap, bool interpolate, int* maskColors, bool inlineImg)
++#endif
+ {
+     Q_UNUSED(str);
+     Q_UNUSED(interpolate);
+@@ -233,7 +241,11 @@
+ {
+ }
+ 
++#ifdef HAVE_POPPLER_0_82
++void ImageLoaderOutputDevice::drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, bool interpolate, const int *maskColors, bool inlineImg)
++#else
+ void ImageLoaderOutputDevice::drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, bool interpolate, int *maskColors, bool inlineImg)
++#endif
+ {
+     Q_UNUSED(state);
+     Q_UNUSED(height);
+--- kitinerary-19.04.1/CMakeLists.txt~	2019-05-07 03:05:49.000000000 +0200
++++ kitinerary-19.04.1/CMakeLists.txt	2019-11-03 15:01:21.029730602 +0100
+@@ -62,6 +62,9 @@
+     if (${Poppler_VERSION} VERSION_GREATER 0.68)
+         set(HAVE_POPPLER_0_69 ON)
+     endif()
++    if (${Poppler_VERSION} VERSION_GREATER 0.81)
++        set(HAVE_POPPLER_0_82 ON)
++    endif()
+     set(CMAKE_REQUIRED_LIBRARIES Poppler::Core Qt5::Core)
+     check_cxx_source_compiles("
+     #include <goo/GooString.h>
+--- kitinerary-19.04.1/src/config-kitinerary.h.cmake~	2019-04-29 07:13:27.000000000 +0200
++++ kitinerary-19.04.1/src/config-kitinerary.h.cmake	2019-11-03 15:04:23.523057744 +0100
+@@ -24,6 +24,7 @@
+ #cmakedefine HAVE_POPPLER_0_58
+ #cmakedefine HAVE_POPPLER_0_69
+ #cmakedefine HAVE_POPPLER_0_72
++#cmakedefine HAVE_POPPLER_0_82
+ 
+ #cmakedefine HAVE_ZXING
+ #cmakedefine HAVE_ZXING_OLD
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/ka5-kitinerary.git/commitdiff/f27320082b5a8778f7d8d59bea8e6d18e0ec8140



More information about the pld-cvs-commit mailing list