summaryrefslogtreecommitdiff
path: root/user/calligra
diff options
context:
space:
mode:
Diffstat (limited to 'user/calligra')
-rw-r--r--user/calligra/APKBUILD8
-rw-r--r--user/calligra/poppler2.patch114
-rw-r--r--user/calligra/poppler3.patch92
-rw-r--r--user/calligra/poppler4.patch76
4 files changed, 289 insertions, 1 deletions
diff --git a/user/calligra/APKBUILD b/user/calligra/APKBUILD
index d5c1efb35..787ba8ba8 100644
--- a/user/calligra/APKBUILD
+++ b/user/calligra/APKBUILD
@@ -31,6 +31,9 @@ source="https://download.kde.org/stable/calligra/$pkgver/calligra-$pkgver.tar.xz
https://download.kde.org/stable/calligra/$pkgver/calligraplan-$pkgver.tar.xz
c99-math.patch
poppler.patch
+ poppler2.patch
+ poppler3.patch
+ poppler4.patch
"
prepare() {
@@ -77,4 +80,7 @@ package() {
sha512sums="ad1b689a5b36deafcf6985d4a0a1e8148d10e19fb4a0be8343c6e1d24146b9a8ffa0890ab5bbb21816b3134d21150b57f6159db1a30cc54c0fde5bf7bdf4537b calligra-3.1.0.tar.xz
a8ccc6ee2f0381b811926a296122464bdb79aad7c75ff0f7a554e4596165ff7fd7ef62c9af9232ea36542d6b538446c8920fe77cbbe7ffacdf6e6b99a1b68156 calligraplan-3.1.0.tar.xz
b03d2f33a0233638be06b4219328404eac4a77c508619c4037b3b53556b257fc4888cd690bb3755562040a198cbd51a323d13553fed3f2082398556a49482c6e c99-math.patch
-960614eb2d367443810cc356d004d43867a4fa4085b054ffd1522b94ef09e9338e723117c91148383d33d54104729750a199ab1b75569aaa7164a908afd3cd4c poppler.patch"
+960614eb2d367443810cc356d004d43867a4fa4085b054ffd1522b94ef09e9338e723117c91148383d33d54104729750a199ab1b75569aaa7164a908afd3cd4c poppler.patch
+53296af0b1ad39c523bc93a0040f1316dfb52e2077d277a83841a741c5cb48d81efb1f6328b2af2c8f1dc92db12c4d771a9a65028498d7802b2c30dd702b9455 poppler2.patch
+a22b78d9664284ee5de7a4299907ec37a7835cb6ae3af8e7c1ee0202cea8c1e544fbad7395e56115fb5fe13ec06aeff22e381431e20c6c151c93003cf8a45446 poppler3.patch
+df0e592f8c314581b1811776f8aa1c3dd32f05f966f23ef4dd023c41dad759aea8b674b32e2bd7bee36efe4ba0ce0bdd08f3fc30d10115330605d09d46883a28 poppler4.patch"
diff --git a/user/calligra/poppler2.patch b/user/calligra/poppler2.patch
new file mode 100644
index 000000000..6f18c070f
--- /dev/null
+++ b/user/calligra/poppler2.patch
@@ -0,0 +1,114 @@
+From fa4c2961b8280456d4c1484565b973d312e0bd1c Mon Sep 17 00:00:00 2001
+From: Albert Astals Cid <aacid@kde.org>
+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
+
diff --git a/user/calligra/poppler3.patch b/user/calligra/poppler3.patch
new file mode 100644
index 000000000..54702b515
--- /dev/null
+++ b/user/calligra/poppler3.patch
@@ -0,0 +1,92 @@
+From 82d68cebf870ac97fd27b626a08c3fb4dd94ea3e Mon Sep 17 00:00:00 2001
+From: Albert Astals Cid <aacid@kde.org>
+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
+
diff --git a/user/calligra/poppler4.patch b/user/calligra/poppler4.patch
new file mode 100644
index 000000000..9a13bcdec
--- /dev/null
+++ b/user/calligra/poppler4.patch
@@ -0,0 +1,76 @@
+From f099b8e143bbeb1de3c7e89f4764006c3de61ae4 Mon Sep 17 00:00:00 2001
+From: Antonio Rojas <arojas@archlinux.org>
+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
+