From e785021cfd5f1dba3d3ab7a11416960b322479f6 Mon Sep 17 00:00:00 2001 From: Andreas Sturmlechner Date: Tue, 8 Jan 2019 02:12:51 +0100 Subject: app-office/calligra: Fix build with poppler-0.72 Package-Manager: Portage-2.3.54, Repoman-2.3.12 Signed-off-by: Andreas Sturmlechner --- app-office/calligra/calligra-3.1.0-r3.ebuild | 1 + .../files/calligra-3.1.0-poppler-0.72.patch | 54 ++++++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 app-office/calligra/files/calligra-3.1.0-poppler-0.72.patch (limited to 'app-office') diff --git a/app-office/calligra/calligra-3.1.0-r3.ebuild b/app-office/calligra/calligra-3.1.0-r3.ebuild index f126c2aad96d..766e2b2b60aa 100644 --- a/app-office/calligra/calligra-3.1.0-r3.ebuild +++ b/app-office/calligra/calligra-3.1.0-r3.ebuild @@ -120,6 +120,7 @@ PATCHES=( "${FILESDIR}"/${P}-stage-qt-5.11.patch "${FILESDIR}"/${P}-poppler-0.69.patch "${FILESDIR}"/${P}-poppler-0.71.patch + "${FILESDIR}"/${P}-poppler-0.72.patch # not upstreamable "${FILESDIR}"/${P}-no-webkit.patch ) 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 new file mode 100644 index 000000000000..3b2e690257be --- /dev/null +++ b/app-office/calligra/files/calligra-3.1.0-poppler-0.72.patch @@ -0,0 +1,54 @@ +From 8f20ea906235cbee1d4aac4706e4eb03366875bf Mon Sep 17 00:00:00 2001 +From: "Tobias C. Berner" +Date: Mon, 7 Jan 2019 19:50:48 +0100 +Subject: [PATCH] Make compatible with poppler 0.72 + +--- + filters/karbon/pdf/SvgOutputDev.cpp | 13 +++++++++++++ + 1 file changed, 13 insertions(+) + +diff --git a/filters/karbon/pdf/SvgOutputDev.cpp b/filters/karbon/pdf/SvgOutputDev.cpp +index 4a1fad6bbcf..b1d4ea2d427 100644 +--- a/filters/karbon/pdf/SvgOutputDev.cpp ++++ b/filters/karbon/pdf/SvgOutputDev.cpp +@@ -25,6 +25,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -409,7 +410,11 @@ void SvgOutputDev::drawString(GfxState * state, const GooString * s) + + QString str; + ++#if POPPLER_CHECK_VERSION(0,72,0) ++ const char * p = s->c_str(); ++#else + const char * p = s->getCString(); ++#endif + int len = s->getLength(); + CharCode code; + Unicode *u = nullptr; +@@ -459,10 +464,18 @@ void SvgOutputDev::drawString(GfxState * state, const GooString * s) + *d->body << " y=\"" << y << "px\""; + + if (font && font->getFamily()) { ++#if POPPLER_CHECK_VERSION(0,72,0) ++ *d->body << " font-family=\"" << QString::fromLatin1(font->getFamily()->c_str()) << "\""; ++#else + *d->body << " font-family=\"" << QString::fromLatin1(font->getFamily()->getCString()) << "\""; ++#endif + //debugPdf << "font family:" << QString::fromLatin1( font->getFamily()->getCString() ); + } else if (font && font->getName()) { ++#if POPPLER_CHECK_VERSION(0,72,0) ++ *d->body << " font-family=\"" << QString::fromLatin1(font->getName()->c_str()) << "\""; ++#else + *d->body << " font-family=\"" << QString::fromLatin1(font->getName()->getCString()) << "\""; ++#endif + //debugPdf << "font name:" << QString::fromLatin1( font->getName()->getCString() ); + } + *d->body << " font-size=\"" << qMax(state->getFontSize(), state->getTransformedFontSize()) << "px\""; +-- +2.20.1 -- cgit v1.2.3-65-gdbad