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/files/, app-office/calligra/
Date: Tue, 08 Jan 2019 01:48:04
Message-Id: 1546912063.e785021cfd5f1dba3d3ab7a11416960b322479f6.asturm@gentoo
1 commit: e785021cfd5f1dba3d3ab7a11416960b322479f6
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jan 8 01:12:51 2019 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Tue Jan 8 01:47:43 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e785021c
7
8 app-office/calligra: Fix build with poppler-0.72
9
10 Package-Manager: Portage-2.3.54, Repoman-2.3.12
11 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
12
13 app-office/calligra/calligra-3.1.0-r3.ebuild | 1 +
14 .../files/calligra-3.1.0-poppler-0.72.patch | 54 ++++++++++++++++++++++
15 2 files changed, 55 insertions(+)
16
17 diff --git a/app-office/calligra/calligra-3.1.0-r3.ebuild b/app-office/calligra/calligra-3.1.0-r3.ebuild
18 index f126c2aad96..766e2b2b60a 100644
19 --- a/app-office/calligra/calligra-3.1.0-r3.ebuild
20 +++ b/app-office/calligra/calligra-3.1.0-r3.ebuild
21 @@ -120,6 +120,7 @@ PATCHES=(
22 "${FILESDIR}"/${P}-stage-qt-5.11.patch
23 "${FILESDIR}"/${P}-poppler-0.69.patch
24 "${FILESDIR}"/${P}-poppler-0.71.patch
25 + "${FILESDIR}"/${P}-poppler-0.72.patch # not upstreamable
26 "${FILESDIR}"/${P}-no-webkit.patch
27 )
28
29
30 diff --git a/app-office/calligra/files/calligra-3.1.0-poppler-0.72.patch b/app-office/calligra/files/calligra-3.1.0-poppler-0.72.patch
31 new file mode 100644
32 index 00000000000..3b2e690257b
33 --- /dev/null
34 +++ b/app-office/calligra/files/calligra-3.1.0-poppler-0.72.patch
35 @@ -0,0 +1,54 @@
36 +From 8f20ea906235cbee1d4aac4706e4eb03366875bf Mon Sep 17 00:00:00 2001
37 +From: "Tobias C. Berner" <tcberner@×××××××.org>
38 +Date: Mon, 7 Jan 2019 19:50:48 +0100
39 +Subject: [PATCH] Make compatible with poppler 0.72
40 +
41 +---
42 + filters/karbon/pdf/SvgOutputDev.cpp | 13 +++++++++++++
43 + 1 file changed, 13 insertions(+)
44 +
45 +diff --git a/filters/karbon/pdf/SvgOutputDev.cpp b/filters/karbon/pdf/SvgOutputDev.cpp
46 +index 4a1fad6bbcf..b1d4ea2d427 100644
47 +--- a/filters/karbon/pdf/SvgOutputDev.cpp
48 ++++ b/filters/karbon/pdf/SvgOutputDev.cpp
49 +@@ -25,6 +25,7 @@
50 + #include <poppler/GfxState.h>
51 + #include <poppler/Stream.h>
52 + #include <poppler/GfxFont.h>
53 ++#include <poppler/glib/poppler-features.h>
54 +
55 + #include <QFile>
56 + #include <QTextStream>
57 +@@ -409,7 +410,11 @@ void SvgOutputDev::drawString(GfxState * state, const GooString * s)
58 +
59 + QString str;
60 +
61 ++#if POPPLER_CHECK_VERSION(0,72,0)
62 ++ const char * p = s->c_str();
63 ++#else
64 + const char * p = s->getCString();
65 ++#endif
66 + int len = s->getLength();
67 + CharCode code;
68 + Unicode *u = nullptr;
69 +@@ -459,10 +464,18 @@ void SvgOutputDev::drawString(GfxState * state, const GooString * s)
70 + *d->body << " y=\"" << y << "px\"";
71 +
72 + if (font && font->getFamily()) {
73 ++#if POPPLER_CHECK_VERSION(0,72,0)
74 ++ *d->body << " font-family=\"" << QString::fromLatin1(font->getFamily()->c_str()) << "\"";
75 ++#else
76 + *d->body << " font-family=\"" << QString::fromLatin1(font->getFamily()->getCString()) << "\"";
77 ++#endif
78 + //debugPdf << "font family:" << QString::fromLatin1( font->getFamily()->getCString() );
79 + } else if (font && font->getName()) {
80 ++#if POPPLER_CHECK_VERSION(0,72,0)
81 ++ *d->body << " font-family=\"" << QString::fromLatin1(font->getName()->c_str()) << "\"";
82 ++#else
83 + *d->body << " font-family=\"" << QString::fromLatin1(font->getName()->getCString()) << "\"";
84 ++#endif
85 + //debugPdf << "font name:" << QString::fromLatin1( font->getName()->getCString() );
86 + }
87 + *d->body << " font-size=\"" << qMax(state->getFontSize(), state->getTransformedFontSize()) << "px\"";
88 +--
89 +2.20.1