From 767d4ba2d13de309783bf8e39209617a96f7e7f7 Mon Sep 17 00:00:00 2001 From: Marek Kasik Date: Fri, 17 Jan 2020 14:10:05 +0100 Subject: [PATCH] Rebuild for poppler-0.84.0 --- 0001-Fix-build-with-poppler-0.82.patch | 124 +++++++++++++++++++++++++ libreoffice.spec | 6 +- 2 files changed, 129 insertions(+), 1 deletion(-) create mode 100644 0001-Fix-build-with-poppler-0.82.patch diff --git a/0001-Fix-build-with-poppler-0.82.patch b/0001-Fix-build-with-poppler-0.82.patch new file mode 100644 index 0000000..dc6e070 --- /dev/null +++ b/0001-Fix-build-with-poppler-0.82.patch @@ -0,0 +1,124 @@ +From 2eadd46ab81058087af95bdfc1fea28fcdb65998 Mon Sep 17 00:00:00 2001 +From: Rasmus Thomsen +Date: Sat, 26 Oct 2019 14:11:35 +0200 +Subject: [PATCH] Fix build with poppler-0.82 + +Change-Id: I3b6b3faea7986f3e5a6ae4790580d03bc9c955fc +Reviewed-on: https://gerrit.libreoffice.org/81545 +Tested-by: Jenkins +Reviewed-by: Michael Stahl +--- + .../pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx | 25 +++++++++++++++++++ + .../pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx | 16 +++++++++++- + 2 files changed, 40 insertions(+), 1 deletion(-) + +diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx +index ce32a4139c..3ae3bdc503 100644 +--- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx ++++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx +@@ -863,11 +863,20 @@ void PDFOutDev::eoClip(GfxState *state) + local offset of character (zero for horizontal writing mode). not + taken into account for output pos updates. Used for vertical writing. + */ ++ ++#if POPPLER_CHECK_VERSION(0, 82, 0) ++void PDFOutDev::drawChar(GfxState *state, double x, double y, ++ double dx, double dy, ++ double originX, double originY, ++ CharCode, int /*nBytes*/, const Unicode *u, int uLen) ++{ ++#else + void PDFOutDev::drawChar(GfxState *state, double x, double y, + double dx, double dy, + double originX, double originY, + CharCode, int /*nBytes*/, Unicode *u, int uLen) + { ++#endif + assert(state); + + if( u == nullptr ) +@@ -979,11 +988,19 @@ void PDFOutDev::drawImageMask(GfxState* pState, Object*, Stream* str, + writeBinaryBuffer(aBuf); + } + ++#if POPPLER_CHECK_VERSION(0, 82, 0) ++void PDFOutDev::drawImage(GfxState*, Object*, Stream* str, ++ int width, int height, GfxImageColorMap* colorMap, ++ poppler_bool /*interpolate*/, ++ const int* maskColors, poppler_bool /*inlineImg*/ ) ++{ ++#else + void PDFOutDev::drawImage(GfxState*, Object*, Stream* str, + int width, int height, GfxImageColorMap* colorMap, + poppler_bool /*interpolate*/, + int* maskColors, poppler_bool /*inlineImg*/ ) + { ++#endif + if (m_bSkipImages) + return; + OutputBuffer aBuf; initBuf(aBuf); +@@ -1004,12 +1021,20 @@ void PDFOutDev::drawImage(GfxState*, Object*, Stream* str, + { + GfxRGB aMinRGB; + colorMap->getColorSpace()->getRGB( ++#if POPPLER_CHECK_VERSION(0, 82, 0) ++ reinterpret_cast(maskColors), ++#else + reinterpret_cast(maskColors), ++#endif + &aMinRGB ); + + GfxRGB aMaxRGB; + colorMap->getColorSpace()->getRGB( ++#if POPPLER_CHECK_VERSION(0, 82, 0) ++ reinterpret_cast(maskColors)+gfxColorMaxComps, ++#else + reinterpret_cast(maskColors)+gfxColorMaxComps, ++#endif + &aMaxRGB ); + + aMaskBuf.push_back( colToByte(aMinRGB.r) ); +diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx +index 1a0c3f0caa..02f6b59f6f 100644 +--- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx ++++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx +@@ -232,10 +232,17 @@ namespace pdfi + virtual void eoClip(GfxState *state) override; + + //----- text drawing ++#if POPPLER_CHECK_VERSION(0, 82, 0) ++ virtual void drawChar(GfxState *state, double x, double y, ++ double dx, double dy, ++ double originX, double originY, ++ CharCode code, int nBytes, const Unicode *u, int uLen) override; ++#else + virtual void drawChar(GfxState *state, double x, double y, + double dx, double dy, + double originX, double originY, + CharCode code, int nBytes, Unicode *u, int uLen) override; ++#endif + #if POPPLER_CHECK_VERSION(0, 64, 0) + virtual void drawString(GfxState *state, const GooString *s) override; + #else +@@ -248,10 +255,17 @@ namespace pdfi + int width, int height, poppler_bool invert, + poppler_bool interpolate, + poppler_bool inlineImg) override; ++#if POPPLER_CHECK_VERSION(0, 82, 0) + virtual void drawImage(GfxState *state, Object *ref, Stream *str, + int width, int height, GfxImageColorMap *colorMap, + poppler_bool interpolate, +- int* maskColors, poppler_bool inlineImg) override; ++ const int* maskColors, poppler_bool inlineImg) override; ++#else ++ virtual void drawImage(GfxState *state, Object *ref, Stream *str, ++ int width, int height, GfxImageColorMap *colorMap, ++ poppler_bool interpolate, ++ int* maskColors, poppler_bool inlineImg) override; ++#endif + virtual void drawMaskedImage(GfxState *state, Object *ref, Stream *str, + int width, int height, + GfxImageColorMap *colorMap, +-- +2.24.1 + diff --git a/libreoffice.spec b/libreoffice.spec index 14029dd..f81f386 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -54,7 +54,7 @@ Summary: Free Software Productivity Suite Name: libreoffice Epoch: 1 Version: %{libo_version}.2 -Release: 5%{?libo_prerelease}%{?dist} +Release: 6%{?libo_prerelease}%{?dist} License: (MPLv1.1 or LGPLv3+) and LGPLv3 and LGPLv2+ and BSD and (MPLv1.1 or GPLv2 or LGPLv2 or Netscape) and Public Domain and ASL 2.0 and MPLv2.0 and CC0 URL: http://www.libreoffice.org/ @@ -248,6 +248,7 @@ Patch4: 0001-Resolves-rhbz-1766990-starmath-might-not-be-availabl.patch Patch5: 0001-rhbz-1773525-reducing-the-amount-of-saved-search-rep.patch Patch6: 0002-rhbz-1773525-wrong-elements-removed-from-saved-entri.patch Patch7: 0001-Fix-build-with-poppler-0.83.patch +Patch8: 0001-Fix-build-with-poppler-0.82.patch %if 0%{?rhel} # not upstreamed @@ -2140,6 +2141,9 @@ done %{_includedir}/LibreOfficeKit %changelog +* Fri Jan 17 2020 Marek Kasik - 1:6.3.3.2-6 +- Rebuild for poppler-0.84.0 + * Fri Jan 17 2020 Marek Kasik - 1:6.3.3.2-5 - Rebuild for poppler-0.84.0