diff options
author | Tobias C. Berner <tcberner@FreeBSD.org> | 2018-12-16 15:10:42 +0000 |
---|---|---|
committer | Tobias C. Berner <tcberner@FreeBSD.org> | 2018-12-16 15:10:42 +0000 |
commit | 1fb34516c19e99468a4e212e3689f331937fcb33 (patch) | |
tree | d25c257492f3b7cfcf0c4195b31b86d6981d8edc /editors/calligra | |
parent | Update KDE Frameworks to 5.53.0 (diff) |
Update poppler to 0.72
This update brings many changes
- the build system has switched to cmake
- some ports needed to be switched to use their bundled
version of poppler:
- print/tex-luatex (r487226)
- print/tex-xetex (r487226)
- editors/opeonffice-devel
- Qt4 support has been dropped
- print/frescobaldi has been removed for this reason.
- most of the added patches can be removed with the next
upgrade of the concerning port.
PR: 233452
Exp-run by: antoine
Approved by: gnome (kwm)
Differential Revision: https://reviews.freebsd.org/D17456
Notes
Notes:
svn path=/head/; revision=487596
Diffstat (limited to 'editors/calligra')
5 files changed, 245 insertions, 1 deletions
diff --git a/editors/calligra/Makefile b/editors/calligra/Makefile index 37dbd00b2667..8df72ab7c9f0 100644 --- a/editors/calligra/Makefile +++ b/editors/calligra/Makefile @@ -2,7 +2,7 @@ PORTNAME= calligra DISTVERSION= 3.1.0 -PORTREVISION= 7 +PORTREVISION= 8 CATEGORIES= editors kde MASTER_SITES= KDE/stable/${PORTNAME}/${PORTVERSION} DIST_SUBDIR= KDE/${PORTNAME} diff --git a/editors/calligra/files/patch-debian_poppler-0.69.patch b/editors/calligra/files/patch-debian_poppler-0.69.patch new file mode 100644 index 000000000000..327435149bc1 --- /dev/null +++ b/editors/calligra/files/patch-debian_poppler-0.69.patch @@ -0,0 +1,17 @@ +Description: Fix build with poppler 0.69 +Author: Gianfranco Costamagna <locutusofborg@debian.org> +Bug-Debian: https://bugs.debian.org/910873 +Last-Update: 2018-10-22 + +--- filters/karbon/pdf/PdfImport.cpp ++++ filters/karbon/pdf/PdfImport.cpp +@@ -102,9 +102,6 @@ KoFilter::ConversionStatus PdfImport::co + delete globalParams; + globalParams = 0; + +- // check for memory leaks +- Object::memCheck(stderr); +- + return KoFilter::OK; + } + diff --git a/editors/calligra/files/patch-filters_karbon_pdf_PdfImport.cpp b/editors/calligra/files/patch-filters_karbon_pdf_PdfImport.cpp new file mode 100644 index 000000000000..24c28f41e9c1 --- /dev/null +++ b/editors/calligra/files/patch-filters_karbon_pdf_PdfImport.cpp @@ -0,0 +1,15 @@ +--- filters/karbon/pdf/PdfImport.cpp.orig 2018-12-08 16:48:32 UTC ++++ filters/karbon/pdf/PdfImport.cpp +@@ -88,9 +88,9 @@ KoFilter::ConversionStatus PdfImport::convert(const QB + 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/editors/calligra/files/patch-filters_karbon_pdf_SvgOutputDev.cpp b/editors/calligra/files/patch-filters_karbon_pdf_SvgOutputDev.cpp new file mode 100644 index 000000000000..911bedf7e936 --- /dev/null +++ b/editors/calligra/files/patch-filters_karbon_pdf_SvgOutputDev.cpp @@ -0,0 +1,175 @@ +--- filters/karbon/pdf/SvgOutputDev.cpp.orig 2018-01-26 09:24:44 UTC ++++ 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() { +@@ -52,7 +52,7 @@ class SvgOutputDev::Private + QString defsData; + QTextStream * defs; + QTextStream * body; +- GBool state; ++ bool state; + QSizeF pageSize; + QPen pen; + QBrush brush; +@@ -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; + } + +@@ -75,24 +75,24 @@ SvgOutputDev::~SvgOutputDev() + delete d; + } + +-GBool SvgOutputDev::isOk() ++bool SvgOutputDev::isOk() + { + return d->state; + } + +-GBool SvgOutputDev::upsideDown() ++bool SvgOutputDev::upsideDown() + { +- return gTrue; ++ return true; + } + +-GBool SvgOutputDev::useDrawChar() ++bool SvgOutputDev::useDrawChar() + { +- return gFalse; ++ return false; + } + +-GBool SvgOutputDev::interpretType3Chars() ++bool SvgOutputDev::interpretType3Chars() + { +- return gFalse; ++ return false; + } + + void SvgOutputDev::startPage(int pageNum, GfxState *state, XRef */*xref*/) +@@ -143,7 +143,9 @@ void SvgOutputDev::stroke(GfxState * state) + { + QString path = convertPath(state->getPath()); + *d->body << "<path"; +- *d->body << " transform=\"" << convertMatrix(state->getCTM()) << "\""; ++ const double * ctm = state->getCTM(); ++ QMatrix transform(ctm[0], ctm[1], ctm[2], ctm[3], ctm[4], ctm[5]); ++ *d->body << " transform=\"" << convertMatrix(transform) << "\""; + *d->body << printStroke(); + *d->body << " fill=\"none\""; + *d->body << " d=\"" << path << "\""; +@@ -154,7 +156,9 @@ void SvgOutputDev::fill(GfxState * state) + { + QString path = convertPath(state->getPath()); + *d->body << "<path"; +- *d->body << " transform=\"" << convertMatrix(state->getCTM()) << "\""; ++ const double * ctm = state->getCTM(); ++ QMatrix transform(ctm[0], ctm[1], ctm[2], ctm[3], ctm[4], ctm[5]); ++ *d->body << " transform=\"" << convertMatrix(transform) << "\""; + *d->body << printFill(); + *d->body << " fill-rule=\"nonzero\""; + *d->body << " d=\"" << path << "\""; +@@ -165,7 +169,9 @@ void SvgOutputDev::eoFill(GfxState *state) + { + QString path = convertPath(state->getPath()); + *d->body << "<path"; +- *d->body << " transform=\"" << convertMatrix(state->getCTM()) << "\""; ++ const double * ctm = state->getCTM(); ++ QMatrix transform(ctm[0], ctm[1], ctm[2], ctm[3], ctm[4], ctm[5]); ++ *d->body << " transform=\"" << convertMatrix(transform) << "\""; + *d->body << printFill(); + *d->body << " fill-rule=\"evenodd\""; + *d->body << " d=\"" << path << "\""; +@@ -387,7 +393,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 +@@ -402,7 +408,7 @@ void SvgOutputDev::drawString(GfxState * state, GooStr + + QString str; + +- char * p = s->getCString(); ++ const char * p = s->c_str(); + int len = s->getLength(); + CharCode code; + Unicode *u = nullptr; +@@ -429,7 +435,7 @@ void SvgOutputDev::drawString(GfxState * state, GooStr + 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; +@@ -451,11 +457,11 @@ void SvgOutputDev::drawString(GfxState * state, GooStr + *d->body << " y=\"" << y << "px\""; + + if (font && font->getFamily()) { +- *d->body << " font-family=\"" << QString::fromLatin1(font->getFamily()->getCString()) << "\""; +- //debugPdf << "font family:" << QString::fromLatin1( font->getFamily()->getCString() ); ++ *d->body << " font-family=\"" << QString::fromLatin1(font->getFamily()->c_str()) << "\""; ++ //debugPdf << "font family:" << QString::fromLatin1( font->getFamily()->c_str() ); + } else if (font && font->getName()) { +- *d->body << " font-family=\"" << QString::fromLatin1(font->getName()->getCString()) << "\""; +- //debugPdf << "font name:" << QString::fromLatin1( font->getName()->getCString() ); ++ *d->body << " font-family=\"" << QString::fromLatin1(font->getName()->c_str()) << "\""; ++ //debugPdf << "font name:" << QString::fromLatin1( font->getName()->c_str() ); + } + *d->body << " font-size=\"" << qMax(state->getFontSize(), state->getTransformedFontSize()) << "px\""; + +@@ -476,7 +482,7 @@ void SvgOutputDev::drawString(GfxState * state, GooStr + + void SvgOutputDev::drawImage(GfxState *state, Object */*ref*/, Stream *str, + int width, int height, GfxImageColorMap *colorMap, +- int *maskColors, GBool /*inlineImg*/) ++ int *maskColors, bool /*inlineImg*/) + { + ImageStream * imgStr = new ImageStream(str, width, colorMap->getNumPixelComps(), colorMap->getBits()); + imgStr->reset(); +@@ -522,7 +528,7 @@ void SvgOutputDev::drawImage(GfxState *state, Object * + 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]); + +@@ -531,7 +537,9 @@ void SvgOutputDev::drawImage(GfxState *state, Object * + device.open(QIODevice::WriteOnly); + if (image->save(&device, "PNG")) { + *d->body << "<image"; +- *d->body << " transform=\"" << convertMatrix(m) << "\""; ++ const double * ctm = state->getCTM(); ++ QMatrix transform(ctm[0], ctm[1], ctm[2], ctm[3], ctm[4], ctm[5]); ++ *d->body << " transform=\"" << convertMatrix(transform) << "\""; + *d->body << " width=\"" << width << "px\""; + *d->body << " height=\"" << height << "px\""; + *d->body << " xlink:href=\"data:image/png;base64," << ba.toBase64() << "\""; +@@ -545,7 +553,7 @@ void SvgOutputDev::drawImage(GfxState *state, Object * + + 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) + { + drawImage(state, ref, str, width, height, colorMap, maskColors, inlineImg); + } diff --git a/editors/calligra/files/patch-filters_karbon_pdf_SvgOutputDev.h b/editors/calligra/files/patch-filters_karbon_pdf_SvgOutputDev.h new file mode 100644 index 000000000000..731c1a9a086f --- /dev/null +++ b/editors/calligra/files/patch-filters_karbon_pdf_SvgOutputDev.h @@ -0,0 +1,37 @@ +--- filters/karbon/pdf/SvgOutputDev.h.orig 2018-01-26 09:24:44 UTC ++++ filters/karbon/pdf/SvgOutputDev.h +@@ -44,11 +44,11 @@ class SvgOutputDev : public OutputDev (public) + explicit SvgOutputDev(const QString &fileName); + virtual ~SvgOutputDev(); + +- GBool isOk(); ++ bool isOk(); + +- virtual GBool upsideDown(); +- virtual GBool useDrawChar(); +- virtual GBool interpretType3Chars(); ++ virtual bool upsideDown(); ++ virtual bool useDrawChar(); ++ virtual bool interpretType3Chars(); + virtual void startPage(int pageNum, GfxState *state, XRef *xref); + virtual void endPage(); + +@@ -58,15 +58,15 @@ class SvgOutputDev : public OutputDev (public) + virtual void eoFill(GfxState *state); + + // text +- virtual void drawString(GfxState * state, GooString * s); ++ virtual void drawString(GfxState * state, const GooString * s); + + // images + virtual void drawImage(GfxState *state, Object *ref, Stream *str, + int width, int height, GfxImageColorMap *colorMap, +- int *maskColors, GBool inlineImg); ++ int *maskColors, bool inlineImg); + virtual void 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); + + // styles + virtual void updateAll(GfxState *state); |