diff options
author | Rasmus Thomsen <oss@cogitri.dev> | 2019-10-26 20:17:51 +0200 |
---|---|---|
committer | Kevin Daudt <kdaudt@alpinelinux.org> | 2019-11-08 08:45:36 +0000 |
commit | b6772a0772a0eecf6038f0413918f3e158fa528f (patch) | |
tree | d0569abd0d50f145e99f38e17df205d568623c7a /community/libreoffice | |
parent | fee6ba0f5ed398e4d1bcf155c8127bd63a14ff38 (diff) | |
download | aports-b6772a0772a0eecf6038f0413918f3e158fa528f.tar.bz2 aports-b6772a0772a0eecf6038f0413918f3e158fa528f.tar.xz |
community/libreoffice: fix build against poppler 0.82
Closes !846
Diffstat (limited to 'community/libreoffice')
-rw-r--r-- | community/libreoffice/APKBUILD | 4 | ||||
-rw-r--r-- | community/libreoffice/fix-poppler-082.patch | 109 |
2 files changed, 112 insertions, 1 deletions
diff --git a/community/libreoffice/APKBUILD b/community/libreoffice/APKBUILD index 00041c8eed..51064e380c 100644 --- a/community/libreoffice/APKBUILD +++ b/community/libreoffice/APKBUILD @@ -135,6 +135,7 @@ source="https://download.documentfoundation.org/libreoffice/src/$_v/libreoffice- disable-liborcus-unittest.patch musl-stacksize.patch musl-libintl.patch + fix-poppler-082.patch " # secfixes: @@ -458,4 +459,5 @@ c2970c482b3d6557272fe07eda236613176662dd0b789a24dbbea17a33cb6aa55d981feb96a65029 0591099d4e650601b180e80910cd0de9a904713087f189e4ceac96b9ec5654010c2b60fe17177c134f27acc02a753ad37c3b4866299585e1a9ae8667d895fe1a fix-includes.patch 83081b999cedb631122d59d77f74b60adf97e412de924306e35d8d7975e5f5d17694907166136cb865f30c51d8669b79e871d6e8450c8b0038e7d6cdee5cdc02 disable-liborcus-unittest.patch 9abb0b14b7c408705569f26f6ed6519630ee7b98ff9c959eb53bb5efec6c08cae906f3c82943aee21098ab09c6caf58443a0dbe347d7dc5c8b6637f3665abca2 musl-stacksize.patch -d99d074e89e2713a3b6a56fa60d9d989ca6eefc8884ccbf88cb16c7b09da6dde4ba4ebc6a4d8408b61a08088df7cb1bcda60738f91e5569179fc45d7e9b901a3 musl-libintl.patch" +d99d074e89e2713a3b6a56fa60d9d989ca6eefc8884ccbf88cb16c7b09da6dde4ba4ebc6a4d8408b61a08088df7cb1bcda60738f91e5569179fc45d7e9b901a3 musl-libintl.patch +3552e652f4fa3b1760f7c364769f4ff4da2c8fc2a05f592b3c0f2fb19e39215781d1b66f1f3240c9ddae8bdf7d09c2cbfe6e8c1e63faed293a98dd0403eea3db fix-poppler-082.patch" diff --git a/community/libreoffice/fix-poppler-082.patch b/community/libreoffice/fix-poppler-082.patch new file mode 100644 index 0000000000..506bc83faf --- /dev/null +++ b/community/libreoffice/fix-poppler-082.patch @@ -0,0 +1,109 @@ +From 142e03e329bbd6cd2d37cb24ed18c2538eb20daa Mon Sep 17 00:00:00 2001 +From: Rasmus Thomsen <oss@cogitri.dev> +Date: Sat, 26 Oct 2019 14:11:35 +0200 +Subject: [PATCH] Fix build with poppler-0.82 + +Change-Id: I3b6b3faea7986f3e5a6ae4790580d03bc9c955fc +--- + .../pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx | 25 +++++++++++++++++++ + .../pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx | 16 +++++++++++- + 2 files changed, 40 insertions(+), 1 deletion(-) + +--- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx 2019-10-26 12:40:49.670720552 +0200 ++++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx 2019-10-26 12:40:52.894158294 +0200 +@@ -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, + +--- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx 2019-10-26 12:54:06.718793588 +0200 ++++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx 2019-10-26 12:55:54.338415432 +0200 +@@ -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,12 @@ void PDFOutDev::drawImage(GfxState*, Object*, Stream* str, + { + GfxRGB aMinRGB; + colorMap->getColorSpace()->getRGB( +- reinterpret_cast<GfxColor*>(maskColors), ++ const_cast<GfxColor*>(reinterpret_cast<const GfxColor*>(maskColors)), + &aMinRGB ); + + GfxRGB aMaxRGB; + colorMap->getColorSpace()->getRGB( +- reinterpret_cast<GfxColor*>(maskColors)+gfxColorMaxComps, ++ const_cast<GfxColor*>(reinterpret_cast<const GfxColor*>(maskColors))+gfxColorMaxComps, + &aMaxRGB ); + + aMaskBuf.push_back( colToByte(aMinRGB.r) ); |