Hello community, here is the log from the commit of package calligra for openSUSE:Factory checked in at 2019-01-28 20:49:04 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/calligra (Old) and /work/SRC/openSUSE:Factory/.calligra.new.28833 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "calligra" Mon Jan 28 20:49:04 2019 rev:71 rq:668920 version:3.1.0 Changes: -------- --- /work/SRC/openSUSE:Factory/calligra/calligra.changes 2018-06-04 13:23:15.155033094 +0200 +++ /work/SRC/openSUSE:Factory/.calligra.new.28833/calligra.changes 2019-01-28 20:49:55.909811091 +0100 @@ -1,0 +2,14 @@ +Sun Jan 27 12:19:45 UTC 2019 - wbauer@tmo.at + +- Add upstream patches to fix build with the latest poppler (and + not break it with older versions): + * Fix-build-with-poppler-0.69.patch + * Fix-build-with-poppler-0.64.patch + * Mark-the-functions-as-override.patch + * gBool-to-bool.patch + * Fix-build-with-poppler-0.64-take-2.patch + * Fix-build-with-poppler-0.71.patch + * Fix-GooString-not-having-getCString-anymore.patch +- Remove unused libexiv2-devel build requirement + +------------------------------------------------------------------- New: ---- Fix-GooString-not-having-getCString-anymore.patch Fix-build-with-poppler-0.64-take-2.patch Fix-build-with-poppler-0.64.patch Fix-build-with-poppler-0.69.patch Fix-build-with-poppler-0.71.patch Mark-the-functions-as-override.patch gBool-to-bool.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ calligra.spec ++++++ --- /var/tmp/diff_new_pack.RnP6LZ/_old 2019-01-28 20:49:57.529809383 +0100 +++ /var/tmp/diff_new_pack.RnP6LZ/_new 2019-01-28 20:49:57.533809378 +0100 @@ -26,6 +26,14 @@ Source0: http://download.kde.org/stable/%{name}/%{version}/%{name}-%{version}.tar.xz # PATCH-FIX-UPSTREAM Fix-build-with-Qt-511.patch Patch0: Fix-build-with-Qt-511.patch +# PATCH-FIX-UPSTREAM +Patch1: Fix-build-with-poppler-0.69.patch +Patch2: Fix-build-with-poppler-0.64.patch +Patch3: Mark-the-functions-as-override.patch +Patch4: gBool-to-bool.patch +Patch5: Fix-build-with-poppler-0.64-take-2.patch +Patch6: Fix-build-with-poppler-0.71.patch +Patch7: Fix-GooString-not-having-getCString-anymore.patch BuildRequires: Mesa-devel BuildRequires: OpenColorIO-devel BuildRequires: OpenEXR-devel @@ -70,7 +78,6 @@ BuildRequires: kxmlgui-devel BuildRequires: libeigen3-devel BuildRequires: libetonyek-devel -BuildRequires: libexiv2-devel BuildRequires: libgsf-devel BuildRequires: libicu-devel BuildRequires: libkdcraw-devel ++++++ Fix-GooString-not-having-getCString-anymore.patch ++++++
From 3a65c7f6586380e39e7030ff3e01de9ad32ac64f Mon Sep 17 00:00:00 2001 From: Albert Astals Cid
Date: Tue, 15 Jan 2019 22:46:41 +0100 Subject: Fix GooString not having getCString anymore
--- filters/karbon/pdf/CMakeLists.txt | 4 ++++ filters/karbon/pdf/SvgOutputDev.cpp | 14 +++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/filters/karbon/pdf/CMakeLists.txt b/filters/karbon/pdf/CMakeLists.txt index 3521571..71537f8 100644 --- a/filters/karbon/pdf/CMakeLists.txt +++ b/filters/karbon/pdf/CMakeLists.txt @@ -2,6 +2,10 @@ if(Poppler_VERSION VERSION_LESS "0.64.0") add_definitions("-DHAVE_POPPLER_PRE_0_64") endif() +if(Poppler_VERSION VERSION_LESS "0.72.0") + add_definitions("-DHAVE_POPPLER_PRE_0_72") +endif() + set(pdf2svg_PART_SRCS PdfImportDebug.cpp PdfImport.cpp SvgOutputDev.cpp ) add_library(calligra_filter_pdf2svg MODULE ${pdf2svg_PART_SRCS}) diff --git a/filters/karbon/pdf/SvgOutputDev.cpp b/filters/karbon/pdf/SvgOutputDev.cpp index e412b3d..ba31f18 100644 --- a/filters/karbon/pdf/SvgOutputDev.cpp +++ b/filters/karbon/pdf/SvgOutputDev.cpp @@ -409,7 +409,11 @@ void SvgOutputDev::drawString(GfxState * state, const GooString * s) #ifdef HAVE_POPPLER_PRE_0_64 char * p = s->getCString(); #else - const char * p = s->getCString(); + #ifdef HAVE_POPPLER_PRE_0_72 + const char * p = s->getCString(); + #else + const char * p = s->c_str(); + #endif #endif int len = s->getLength(); CharCode code; @@ -459,10 +463,18 @@ void SvgOutputDev::drawString(GfxState * state, const GooString * s) *d->body << " y=\"" << y << "px\""; if (font && font->getFamily()) { +#ifdef HAVE_POPPLER_PRE_0_72 *d->body << " font-family=\"" << QString::fromLatin1(font->getFamily()->getCString()) << "\""; +#else + *d->body << " font-family=\"" << QString::fromLatin1(font->getFamily()->c_str()) << "\""; +#endif //debugPdf << "font family:" << QString::fromLatin1( font->getFamily()->getCString() ); } else if (font && font->getName()) { +#ifdef HAVE_POPPLER_PRE_0_72 *d->body << " font-family=\"" << QString::fromLatin1(font->getName()->getCString()) << "\""; +#else + *d->body << " font-family=\"" << QString::fromLatin1(font->getName()->c_str()) << "\""; +#endif //debugPdf << "font name:" << QString::fromLatin1( font->getName()->getCString() ); } *d->body << " font-size=\"" << qMax(state->getFontSize(), state->getTransformedFontSize()) << "px\""; -- cgit v1.1 ++++++ Fix-build-with-poppler-0.64-take-2.patch ++++++
From 45559a470604bd9494d0832589411fc5b683b316 Mon Sep 17 00:00:00 2001 From: Antonio Rojas
Date: Sat, 27 Oct 2018 13:16:04 +0200 Subject: Fix build with poppler<0.64, take 2
Fix build breakage with poppler<0.64 due to changes in 2993cf64b878b78e6b66fddd80f3cbd3b6c66cde Differential Revision: https://phabricator.kde.org/D16455 --- filters/karbon/pdf/SvgOutputDev.cpp | 4 ++++ filters/karbon/pdf/SvgOutputDev.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/filters/karbon/pdf/SvgOutputDev.cpp b/filters/karbon/pdf/SvgOutputDev.cpp index 870a940..9063e69 100644 --- a/filters/karbon/pdf/SvgOutputDev.cpp +++ b/filters/karbon/pdf/SvgOutputDev.cpp @@ -387,7 +387,11 @@ QString SvgOutputDev::printStroke() return stroke; } +#ifdef HAVE_POPPLER_PRE_0_64 +void SvgOutputDev::drawString(GfxState * state, GooString * s) +#else void SvgOutputDev::drawString(GfxState * state, const GooString * s) +#endif { int render = state->getRender(); // check for invisible text -- this is used by Acrobat Capture diff --git a/filters/karbon/pdf/SvgOutputDev.h b/filters/karbon/pdf/SvgOutputDev.h index df2805c..f0d180f 100644 --- a/filters/karbon/pdf/SvgOutputDev.h +++ b/filters/karbon/pdf/SvgOutputDev.h @@ -58,7 +58,11 @@ public: void eoFill(GfxState *state) override; // text +#ifdef HAVE_POPPLER_PRE_0_64 + void drawString(GfxState * state, GooString * s) override; +#else void drawString(GfxState * state, const GooString * s) override; +#endif // images void drawImage(GfxState *state, Object *ref, Stream *str, -- cgit v1.1 ++++++ Fix-build-with-poppler-0.64.patch ++++++
From 3760bb3012456261024324e15598d1aefc611665 Mon Sep 17 00:00:00 2001 From: Antonio Rojas
Date: Sat, 27 Oct 2018 00:02:34 +0200 Subject: Fix build with poppler<0.64
Commit a615718222f8ad3bba4b88fad640382e517f7dd9 broke build with poppler<0.64, where getNextChar doesn't accept a const char first argument. Differential Revision: https://phabricator.kde.org/D16406 --- filters/karbon/pdf/CMakeLists.txt | 3 +++ filters/karbon/pdf/SvgOutputDev.cpp | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/filters/karbon/pdf/CMakeLists.txt b/filters/karbon/pdf/CMakeLists.txt index 77c60d8..3521571 100644 --- a/filters/karbon/pdf/CMakeLists.txt +++ b/filters/karbon/pdf/CMakeLists.txt @@ -1,3 +1,6 @@ +if(Poppler_VERSION VERSION_LESS "0.64.0") + add_definitions("-DHAVE_POPPLER_PRE_0_64") +endif() set(pdf2svg_PART_SRCS PdfImportDebug.cpp PdfImport.cpp SvgOutputDev.cpp ) diff --git a/filters/karbon/pdf/SvgOutputDev.cpp b/filters/karbon/pdf/SvgOutputDev.cpp index 7901317..5692824 100644 --- a/filters/karbon/pdf/SvgOutputDev.cpp +++ b/filters/karbon/pdf/SvgOutputDev.cpp @@ -402,7 +402,11 @@ void SvgOutputDev::drawString(GfxState * state, GooString * s) QString str; +#ifdef HAVE_POPPLER_PRE_0_64 + char * p = s->getCString(); +#else const char * p = s->getCString(); +#endif int len = s->getLength(); CharCode code; Unicode *u = nullptr; -- cgit v1.1 ++++++ Fix-build-with-poppler-0.69.patch ++++++
From 56bd4bab320b0c0a893751caee9a15a2241e3ef8 Mon Sep 17 00:00:00 2001 From: Antonio Rojas
Date: Wed, 24 Oct 2018 08:28:00 +0200 Subject: Fix build with poppler>=0.69
Remove no longer available Object::memCheck usage (which didn't do anything anyway since DEBUG_MEM was not set); add some const's Differential Revision: https://phabricator.kde.org/D16388 --- filters/karbon/pdf/PdfImport.cpp | 3 --- filters/karbon/pdf/SvgOutputDev.cpp | 8 ++++---- filters/karbon/pdf/SvgOutputDev.h | 2 +- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/filters/karbon/pdf/PdfImport.cpp b/filters/karbon/pdf/PdfImport.cpp index c3e96b0..48b08df 100644 --- a/filters/karbon/pdf/PdfImport.cpp +++ b/filters/karbon/pdf/PdfImport.cpp @@ -102,9 +102,6 @@ KoFilter::ConversionStatus PdfImport::convert(const QByteArray& from, const QByt delete globalParams; globalParams = 0; - // check for memory leaks - Object::memCheck(stderr); - return KoFilter::OK; } diff --git a/filters/karbon/pdf/SvgOutputDev.cpp b/filters/karbon/pdf/SvgOutputDev.cpp index 931917a..7901317 100644 --- a/filters/karbon/pdf/SvgOutputDev.cpp +++ b/filters/karbon/pdf/SvgOutputDev.cpp @@ -212,7 +212,7 @@ QString SvgOutputDev::convertMatrix(const QMatrix &matrix) .arg(matrix.dx()) .arg(matrix.dy()); } -QString SvgOutputDev::convertMatrix(double * matrix) +QString SvgOutputDev::convertMatrix(const double * matrix) { return QString("matrix(%1 %2 %3 %4 %5 %6)") .arg(matrix[0]).arg(matrix[1]) @@ -402,7 +402,7 @@ void SvgOutputDev::drawString(GfxState * state, GooString * s) QString str; - char * p = s->getCString(); + const char * p = s->getCString(); int len = s->getLength(); CharCode code; Unicode *u = nullptr; @@ -429,7 +429,7 @@ void SvgOutputDev::drawString(GfxState * state, GooString * s) double x = state->getCurX(); double y = state->getCurY(); - double * ctm = state->getCTM(); + const double * ctm = state->getCTM(); QMatrix transform(ctm[0], ctm[1], ctm[2], ctm[3], ctm[4], ctm[5]); QMatrix mirror; @@ -522,7 +522,7 @@ void SvgOutputDev::drawImage(GfxState *state, Object */*ref*/, Stream *str, return; } - double * ctm = state->getCTM(); + const double * ctm = state->getCTM(); QMatrix m; m.setMatrix(ctm[0] / width, ctm[1] / width, -ctm[2] / height, -ctm[3] / height, ctm[2] + ctm[4], ctm[3] + ctm[5]); diff --git a/filters/karbon/pdf/SvgOutputDev.h b/filters/karbon/pdf/SvgOutputDev.h index 85fe55d..2a44908 100644 --- a/filters/karbon/pdf/SvgOutputDev.h +++ b/filters/karbon/pdf/SvgOutputDev.h @@ -84,7 +84,7 @@ public: private: QString convertPath(GfxPath *path); QString convertMatrix(const QMatrix &matrix); - QString convertMatrix(double * matrix); + QString convertMatrix(const double * matrix); QString printFill(); QString printStroke(); -- cgit v1.1 ++++++ Fix-build-with-poppler-0.71.patch ++++++
From f099b8e143bbeb1de3c7e89f4764006c3de61ae4 Mon Sep 17 00:00:00 2001 From: Antonio Rojas
Date: Fri, 2 Nov 2018 21:23:13 +0100 Subject: Fix build with poppler 0.71
Port away from removed API Differential Revision: https://phabricator.kde.org/D16607 --- filters/karbon/pdf/PdfImport.cpp | 6 +++--- filters/karbon/pdf/SvgOutputDev.cpp | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/filters/karbon/pdf/PdfImport.cpp b/filters/karbon/pdf/PdfImport.cpp index 48b08df..e910dae 100644 --- a/filters/karbon/pdf/PdfImport.cpp +++ b/filters/karbon/pdf/PdfImport.cpp @@ -88,9 +88,9 @@ KoFilter::ConversionStatus PdfImport::convert(const QByteArray& from, const QByt SvgOutputDev * dev = new SvgOutputDev(m_chain->outputFile()); if (dev->isOk()) { int rotate = 0; - GBool useMediaBox = gTrue; - GBool crop = gFalse; - GBool printing = gFalse; + bool useMediaBox = true; + bool crop = false; + bool printing = false; pdfDoc->displayPages(dev, firstPage, lastPage, hDPI, vDPI, rotate, useMediaBox, crop, printing); dev->dumpContent(); } diff --git a/filters/karbon/pdf/SvgOutputDev.cpp b/filters/karbon/pdf/SvgOutputDev.cpp index 9063e69..80f01a5 100644 --- a/filters/karbon/pdf/SvgOutputDev.cpp +++ b/filters/karbon/pdf/SvgOutputDev.cpp @@ -39,7 +39,7 @@ class SvgOutputDev::Private { public: Private(const QString &fname) - : svgFile(fname), defs(0), body(0), state(gTrue) + : svgFile(fname), defs(0), body(0), state(true) , brush(Qt::SolidPattern) {} ~Private() { @@ -62,7 +62,7 @@ SvgOutputDev::SvgOutputDev(const QString &fileName) : d(new Private(fileName)) { if (! d->svgFile.open(QIODevice::WriteOnly)) { - d->state = gFalse; + d->state = false; return; } @@ -82,17 +82,17 @@ bool SvgOutputDev::isOk() bool SvgOutputDev::upsideDown() { - return gTrue; + return true; } bool SvgOutputDev::useDrawChar() { - return gFalse; + return false; } bool SvgOutputDev::interpretType3Chars() { - return gFalse; + return false; } void SvgOutputDev::startPage(int pageNum, GfxState *state, XRef */*xref*/) -- cgit v1.1 ++++++ Mark-the-functions-as-override.patch ++++++
From fa4c2961b8280456d4c1484565b973d312e0bd1c Mon Sep 17 00:00:00 2001 From: Albert Astals Cid
Date: Thu, 25 Oct 2018 23:04:39 +0200 Subject: Mark the functions as override
So when poppler API breaks (as it often does) it stops compiling and someone has to fix it --- filters/karbon/pdf/SvgOutputDev.cpp | 13 +++-------- filters/karbon/pdf/SvgOutputDev.h | 43 +++++++++++++++++-------------------- 2 files changed, 23 insertions(+), 33 deletions(-) diff --git a/filters/karbon/pdf/SvgOutputDev.cpp b/filters/karbon/pdf/SvgOutputDev.cpp index 5692824..1d07f16 100644 --- a/filters/karbon/pdf/SvgOutputDev.cpp +++ b/filters/karbon/pdf/SvgOutputDev.cpp @@ -387,7 +387,7 @@ QString SvgOutputDev::printStroke() return stroke; } -void SvgOutputDev::drawString(GfxState * state, GooString * s) +void SvgOutputDev::drawString(GfxState * state, const GooString * s) { int render = state->getRender(); // check for invisible text -- this is used by Acrobat Capture @@ -478,9 +478,9 @@ void SvgOutputDev::drawString(GfxState * state, GooString * s) *d->body << "</text>" << endl; } -void SvgOutputDev::drawImage(GfxState *state, Object */*ref*/, Stream *str, +void SvgOutputDev::drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, - int *maskColors, GBool /*inlineImg*/) + GBool /*interpolate*/, int *maskColors, GBool inlineImg) { ImageStream * imgStr = new ImageStream(str, width, colorMap->getNumPixelComps(), colorMap->getBits()); imgStr->reset(); @@ -547,10 +547,3 @@ void SvgOutputDev::drawImage(GfxState *state, Object */*ref*/, Stream *str, delete imgStr; } -void SvgOutputDev::drawImage(GfxState *state, Object *ref, Stream *str, - int width, int height, GfxImageColorMap *colorMap, - GBool /*interpolate*/, int *maskColors, GBool inlineImg) -{ - drawImage(state, ref, str, width, height, colorMap, maskColors, inlineImg); -} - diff --git a/filters/karbon/pdf/SvgOutputDev.h b/filters/karbon/pdf/SvgOutputDev.h index 2a44908..422027c 100644 --- a/filters/karbon/pdf/SvgOutputDev.h +++ b/filters/karbon/pdf/SvgOutputDev.h @@ -46,38 +46,35 @@ public: GBool isOk(); - virtual GBool upsideDown(); - virtual GBool useDrawChar(); - virtual GBool interpretType3Chars(); - virtual void startPage(int pageNum, GfxState *state, XRef *xref); - virtual void endPage(); + GBool upsideDown() override; + GBool useDrawChar() override; + GBool interpretType3Chars() override; + void startPage(int pageNum, GfxState *state, XRef *xref) override; + void endPage() override; // path painting - virtual void stroke(GfxState * state); - virtual void fill(GfxState * state); - virtual void eoFill(GfxState *state); + void stroke(GfxState * state) override; + void fill(GfxState * state) override; + void eoFill(GfxState *state) override; // text - virtual void drawString(GfxState * state, GooString * s); + void drawString(GfxState * state, const GooString * s) override; // images - virtual void drawImage(GfxState *state, Object *ref, Stream *str, + void drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, - int *maskColors, GBool inlineImg); - virtual void drawImage(GfxState *state, Object *ref, Stream *str, - int width, int height, GfxImageColorMap *colorMap, - GBool interpolate, int *maskColors, GBool inlineImg); + GBool interpolate, int *maskColors, GBool inlineImg) override; // styles - virtual void updateAll(GfxState *state); - virtual void updateFillColor(GfxState *state); - virtual void updateStrokeColor(GfxState *state); - virtual void updateFillOpacity(GfxState *state); - virtual void updateStrokeOpacity(GfxState *state); - virtual void updateLineJoin(GfxState *state); - virtual void updateLineCap(GfxState *state); - virtual void updateMiterLimit(GfxState *state); - virtual void updateLineWidth(GfxState *state); + void updateAll(GfxState *state) override; + void updateFillColor(GfxState *state) override; + void updateStrokeColor(GfxState *state) override; + void updateFillOpacity(GfxState *state) override; + void updateStrokeOpacity(GfxState *state) override; + void updateLineJoin(GfxState *state) override; + void updateLineCap(GfxState *state) override; + void updateMiterLimit(GfxState *state) override; + void updateLineWidth(GfxState *state) override; /// Dumps content to svg file void dumpContent(); -- cgit v1.1 ++++++ gBool-to-bool.patch ++++++
From 82d68cebf870ac97fd27b626a08c3fb4dd94ea3e Mon Sep 17 00:00:00 2001 From: Albert Astals Cid
Date: Thu, 25 Oct 2018 23:06:34 +0200 Subject: GBool -> bool
It was just a typedef in poppler and it'll die in next versions --- filters/karbon/pdf/SvgOutputDev.cpp | 12 ++++++------ filters/karbon/pdf/SvgOutputDev.h | 10 +++++----- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/filters/karbon/pdf/SvgOutputDev.cpp b/filters/karbon/pdf/SvgOutputDev.cpp index 1d07f16..870a940 100644 --- a/filters/karbon/pdf/SvgOutputDev.cpp +++ b/filters/karbon/pdf/SvgOutputDev.cpp @@ -52,7 +52,7 @@ public: QString defsData; QTextStream * defs; QTextStream * body; - GBool state; + bool state; QSizeF pageSize; QPen pen; QBrush brush; @@ -75,22 +75,22 @@ SvgOutputDev::~SvgOutputDev() delete d; } -GBool SvgOutputDev::isOk() +bool SvgOutputDev::isOk() { return d->state; } -GBool SvgOutputDev::upsideDown() +bool SvgOutputDev::upsideDown() { return gTrue; } -GBool SvgOutputDev::useDrawChar() +bool SvgOutputDev::useDrawChar() { return gFalse; } -GBool SvgOutputDev::interpretType3Chars() +bool SvgOutputDev::interpretType3Chars() { return gFalse; } @@ -480,7 +480,7 @@ void SvgOutputDev::drawString(GfxState * state, const GooString * s) void SvgOutputDev::drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, - GBool /*interpolate*/, int *maskColors, GBool inlineImg) + bool /*interpolate*/, int *maskColors, bool inlineImg) { ImageStream * imgStr = new ImageStream(str, width, colorMap->getNumPixelComps(), colorMap->getBits()); imgStr->reset(); diff --git a/filters/karbon/pdf/SvgOutputDev.h b/filters/karbon/pdf/SvgOutputDev.h index 422027c..df2805c 100644 --- a/filters/karbon/pdf/SvgOutputDev.h +++ b/filters/karbon/pdf/SvgOutputDev.h @@ -44,11 +44,11 @@ public: explicit SvgOutputDev(const QString &fileName); virtual ~SvgOutputDev(); - GBool isOk(); + bool isOk(); - GBool upsideDown() override; - GBool useDrawChar() override; - GBool interpretType3Chars() override; + bool upsideDown() override; + bool useDrawChar() override; + bool interpretType3Chars() override; void startPage(int pageNum, GfxState *state, XRef *xref) override; void endPage() override; @@ -63,7 +63,7 @@ public: // images void drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, - GBool interpolate, int *maskColors, GBool inlineImg) override; + bool interpolate, int *maskColors, bool inlineImg) override; // styles void updateAll(GfxState *state) override; -- cgit v1.1