Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-office/calligra/, app-office/calligra/files/
Date: Sat, 02 Nov 2019 15:23:20
Message-Id: 1572708149.11e22c282ae1fc952dfcdfa407a40c55ab0e3cd0.asturm@gentoo
1 commit: 11e22c282ae1fc952dfcdfa407a40c55ab0e3cd0
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Fri Nov 1 20:07:56 2019 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Sat Nov 2 15:22:29 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=11e22c28
7
8 app-office/calligra: Fix build with poppler-0.82.0
9
10 Package-Manager: Portage-2.3.78, Repoman-2.3.17
11 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
12
13 app-office/calligra/calligra-3.1.0-r4.ebuild | 4 +++
14 .../files/calligra-3.1.0-poppler-0.82.patch | 35 ++++++++++++++++++++++
15 2 files changed, 39 insertions(+)
16
17 diff --git a/app-office/calligra/calligra-3.1.0-r4.ebuild b/app-office/calligra/calligra-3.1.0-r4.ebuild
18 index 37e03558459..411c8177f1c 100644
19 --- a/app-office/calligra/calligra-3.1.0-r4.ebuild
20 +++ b/app-office/calligra/calligra-3.1.0-r4.ebuild
21 @@ -135,6 +135,10 @@ pkg_setup() {
22 src_prepare() {
23 kde5_src_prepare
24
25 + if has_version ">=app-text/poppler-0.82"; then
26 + eapply "${FILESDIR}/${P}-poppler-0.82.patch" # TODO: make upstreamable patch
27 + fi
28 +
29 if ! use test; then
30 sed -e "/add_subdirectory( *benchmarks *)/s/^/#DONT/" \
31 -i libs/pigment/CMakeLists.txt || die
32
33 diff --git a/app-office/calligra/files/calligra-3.1.0-poppler-0.82.patch b/app-office/calligra/files/calligra-3.1.0-poppler-0.82.patch
34 new file mode 100644
35 index 00000000000..4cb9d1872eb
36 --- /dev/null
37 +++ b/app-office/calligra/files/calligra-3.1.0-poppler-0.82.patch
38 @@ -0,0 +1,35 @@
39 +Patch stolen from Mageia Cauldron but had to be modified quite a bit.
40 +
41 +diff --git a/filters/karbon/pdf/SvgOutputDev.cpp b/filters/karbon/pdf/SvgOutputDev.cpp
42 +index ffdbf01..70bc9f8 100644
43 +--- a/filters/karbon/pdf/SvgOutputDev.cpp
44 ++++ b/filters/karbon/pdf/SvgOutputDev.cpp
45 +@@ -405,7 +405,7 @@ void SvgOutputDev::drawString(GfxState * state, GooString * s)
46 + const char * p = s->c_str();
47 + int len = s->getLength();
48 + CharCode code;
49 +- Unicode *u = nullptr;
50 ++ const Unicode *u = nullptr;
51 + int uLen;
52 + double dx, dy, originX, originY;
53 + while (len > 0) {
54 +@@ -545,7 +545,7 @@ void SvgOutputDev::drawImage(GfxState *state, Object */*ref*/, Stream *str,
55 +
56 + void SvgOutputDev::drawImage(GfxState *state, Object *ref, Stream *str,
57 + int width, int height, GfxImageColorMap *colorMap,
58 +- bool /*interpolate*/, int *maskColors, bool inlineImg)
59 ++ bool /*interpolate*/, const int *maskColors, bool inlineImg)
60 + {
61 + drawImage(state, ref, str, width, height, colorMap, maskColors, inlineImg);
62 + }
63 +--- a/filters/karbon/pdf/SvgOutputDev.h
64 ++++ b/filters/karbon/pdf/SvgOutputDev.h
65 +@@ -63,7 +63,7 @@ public:
66 + // images
67 + void drawImage(GfxState *state, Object *ref, Stream *str,
68 + int width, int height, GfxImageColorMap *colorMap,
69 +- bool interpolate, int *maskColors, bool inlineImg) override;
70 ++ bool interpolate, const int *maskColors, bool inlineImg) override;
71 +
72 + // styles
73 + virtual void updateAll(GfxState *state);