diff --git a/converters/pdf2djvu/files/patch-pdf-backend.cc b/converters/pdf2djvu/files/patch-pdf-backend.cc new file mode 100644 index 000000000000..7e967b6c7210 --- /dev/null +++ b/converters/pdf2djvu/files/patch-pdf-backend.cc @@ -0,0 +1,26 @@ +--- pdf-backend.cc.orig 2019-06-10 17:06:44 UTC ++++ pdf-backend.cc +@@ -103,7 +103,7 @@ static void poppler_error_handler(void *data, ErrorCat + + pdf::Environment::Environment() + { +- globalParams = new GlobalParams(); ++ globalParams = std::unique_ptr(new GlobalParams); + setErrorCallback(poppler_error_handler, nullptr); + } + +@@ -499,12 +499,11 @@ bool pdf::get_glyph(splash::Splash *splash, splash::Fo + void pdf::Renderer::convert_path(pdf::gfx::State *state, splash::Path &splash_path) + { + /* Source was copied from . */ +- pdf::gfx::Subpath *subpath; +- pdf::gfx::Path *path = state->getPath(); ++ auto path = state->getPath(); + int n_subpaths = path->getNumSubpaths(); + for (int i = 0; i < n_subpaths; i++) + { +- subpath = path->getSubpath(i); ++ auto subpath = path->getSubpath(i); + if (subpath->getNumPoints() > 0) + { + double x1, y1, x2, y2, x3, y3; diff --git a/editors/calligra/files/patch-kde_pr-414795 b/editors/calligra/files/patch-kde_pr-414795 new file mode 100644 index 000000000000..2a8e252f8c2d --- /dev/null +++ b/editors/calligra/files/patch-kde_pr-414795 @@ -0,0 +1,69 @@ +Source: Timo Gurr +Upstream: Reported, https://bugs.kde.org/show_bug.cgi?id=414795 +Reason: Fix build with poppler 0.83.0 + +diff -Naur calligra-3.1.0/filters/karbon/pdf/PdfImport.cpp calligra-3.1.0.new/filters/karbon/pdf/PdfImport.cpp +--- filters/karbon/pdf/PdfImport.cpp 2019-12-04 12:41:13.000000000 +0100 ++++ filters/karbon/pdf/PdfImport.cpp 2019-12-04 12:39:03.000000000 +0100 +@@ -60,19 +60,17 @@ + } + + // read config file +- globalParams = new GlobalParams(); ++ globalParams.reset(new GlobalParams()); + if (! globalParams) + return KoFilter::NotImplemented; + + GooString * fname = new GooString(QFile::encodeName(m_chain->inputFile()).data()); + PDFDoc * pdfDoc = new PDFDoc(fname, 0, 0, 0); + if (! pdfDoc) { +- delete globalParams; + return KoFilter::StupidError; + } + + if (! pdfDoc->isOk()) { +- delete globalParams; + delete pdfDoc; + return KoFilter::StupidError; + } +@@ -99,7 +97,6 @@ + + delete dev; + delete pdfDoc; +- delete globalParams; + globalParams = 0; + + return KoFilter::OK; +diff -Naur calligra-3.1.0/filters/karbon/pdf/SvgOutputDev.cpp calligra-3.1.0.new/filters/karbon/pdf/SvgOutputDev.cpp +--- filters/karbon/pdf/SvgOutputDev.cpp 2019-12-04 12:41:14.000000000 +0100 ++++ filters/karbon/pdf/SvgOutputDev.cpp 2019-12-04 12:35:30.000000000 +0100 +@@ -172,7 +172,7 @@ + *d->body << "/>" << endl; + } + +-QString SvgOutputDev::convertPath(GfxPath *path) ++QString SvgOutputDev::convertPath(const GfxPath *path) + { + if (! path) + return QString(); +@@ -180,7 +180,7 @@ + QString output; + + for (int i = 0; i < path->getNumSubpaths(); ++i) { +- GfxSubpath * subpath = path->getSubpath(i); ++ const GfxSubpath * subpath = path->getSubpath(i); + if (subpath->getNumPoints() > 0) { + output += QString("M%1 %2").arg(subpath->getX(0)).arg(subpath->getY(0)); + int j = 1; +diff -Naur calligra-3.1.0/filters/karbon/pdf/SvgOutputDev.h calligra-3.1.0.new/filters/karbon/pdf/SvgOutputDev.h +--- filters/karbon/pdf/SvgOutputDev.h 2019-12-04 12:41:14.000000000 +0100 ++++ filters/karbon/pdf/SvgOutputDev.h 2019-12-04 12:30:41.000000000 +0100 +@@ -83,7 +83,7 @@ + /// Dumps content to svg file + void dumpContent(); + private: +- QString convertPath(GfxPath *path); ++ QString convertPath(const GfxPath *path); + QString convertMatrix(const QMatrix &matrix); + QString convertMatrix(const double * matrix); + QString printFill(); diff --git a/editors/libreoffice/files/patch-git_9065cd8d-poppler-0.83 b/editors/libreoffice/files/patch-git_9065cd8d-poppler-0.83 new file mode 100644 index 000000000000..849e994dd895 --- /dev/null +++ b/editors/libreoffice/files/patch-git_9065cd8d-poppler-0.83 @@ -0,0 +1,70 @@ +From 9065cd8d9a19864f6b618f2dc10daf577badd9ee Mon Sep 17 00:00:00 2001 +From: Martin Milata +Date: Wed, 4 Dec 2019 02:37:40 +0100 +Subject: [PATCH] Fix build with poppler-0.83 + +Change-Id: I7a3684932b8f9c403a3368b42fa4d8039c67f1a9 +Reviewed-on: https://gerrit.libreoffice.org/84384 +Tested-by: Jenkins +Reviewed-by: Michael Stahl +--- + sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx | 7 +++++++ + sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx | 4 ++++ + sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx | 4 ++++ + 3 files changed, 15 insertions(+) + +diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx +index 26048177e87d..e9c2a407c279 100644 +--- sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx ++++ sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx +@@ -491,11 +491,18 @@ void PDFOutDev::writeFontFile( GfxFont* gfxFont ) const + gfree(pBuf); + } + ++#if POPPLER_CHECK_VERSION(0, 83, 0) ++void PDFOutDev::printPath( const GfxPath* pPath ) ++#else + void PDFOutDev::printPath( GfxPath* pPath ) ++#endif + { + int nSubPaths = pPath ? pPath->getNumSubpaths() : 0; + for( int i=0; igetSubpath( i ); + const int nPoints = pSub->getNumPoints(); + +diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx +index 02f6b59f6f15..2e7d2186f9a1 100644 +--- sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx ++++ sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx +@@ -149,7 +149,11 @@ namespace pdfi + + int parseFont( long long nNewId, GfxFont* pFont, GfxState* state ) const; + void writeFontFile( GfxFont* gfxFont ) const; ++#if POPPLER_CHECK_VERSION(0, 83, 0) ++ static void printPath( const GfxPath* pPath ); ++#else + static void printPath( GfxPath* pPath ); ++#endif + + public: + explicit PDFOutDev( PDFDoc* pDoc ); +diff --git a/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx +index 42178b650cdd..b1a54bd09c5f 100644 +--- sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx ++++ sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx +@@ -68,7 +68,11 @@ int main(int argc, char **argv) + } + + // read config file ++#if POPPLER_CHECK_VERSION(0, 83, 0) ++ globalParams = std::make_unique(); ++#else + globalParams = new GlobalParams(); ++#endif + globalParams->setErrQuiet(true); + #if defined(_MSC_VER) + globalParams->setupBaseFonts(nullptr); diff --git a/graphics/inkscape/Makefile b/graphics/inkscape/Makefile index 23d86bd88d12..fa8ebd82fa17 100644 --- a/graphics/inkscape/Makefile +++ b/graphics/inkscape/Makefile @@ -94,5 +94,11 @@ post-patch: # Fix with poppler 0.73 @${REINPLACE_CMD} -E '/#include "goo\/gtypes.h"/d' \ ${WRKSRC}/src/extension/internal/pdfinput/pdf-parser.h + # Fix build with poppler 0.83 + ${REINPLACE_CMD} -e 's|(GfxPath|(const GfxPath|g' \ + -e 's|GfxSubpath|const GfxSubpath|g' \ + -e 's|new GlobalParams()|std::unique_ptr(new GlobalParams())|g' \ + -e 's|new GlobalParams(poppler_datadir)|std::unique_ptr(new GlobalParams(poppler_datadir))|g' \ + ${WRKSRC}/src/extension/internal/pdfinput/*.cpp .include diff --git a/graphics/openfx-arena/files/patch-Extra_ReadPDF.cpp b/graphics/openfx-arena/files/patch-Extra_ReadPDF.cpp new file mode 100644 index 000000000000..7213735c54d8 --- /dev/null +++ b/graphics/openfx-arena/files/patch-Extra_ReadPDF.cpp @@ -0,0 +1,13 @@ +Fix build with poppler 0.83 + +--- Extra/ReadPDF.cpp.orig 2020-01-18 15:54:18 UTC ++++ Extra/ReadPDF.cpp +@@ -134,7 +134,7 @@ false + if (!popplerData.empty()) { + struct stat sb; + if (stat(popplerData.c_str(), &sb) == 0 && S_ISDIR(sb.st_mode)) { +- globalParams = new GlobalParams(popplerData.c_str()); ++ globalParams = std::unique_ptr(new GlobalParams(popplerData.c_str())); + } + } + } diff --git a/graphics/poppler-glib/Makefile b/graphics/poppler-glib/Makefile index fc61a3effe42..13ebb1558f82 100644 --- a/graphics/poppler-glib/Makefile +++ b/graphics/poppler-glib/Makefile @@ -1,7 +1,7 @@ # Created by: Michael Johnson # $FreeBSD$ -PORTREVISION= 2 +PORTREVISION= 0 COMMENT= GLib bindings to poppler diff --git a/graphics/poppler-qt5/Makefile b/graphics/poppler-qt5/Makefile index f617c40a8d1a..686ee8cf48b0 100644 --- a/graphics/poppler-qt5/Makefile +++ b/graphics/poppler-qt5/Makefile @@ -1,6 +1,6 @@ # $FreeBSD$ -PORTREVISION= 2 +PORTREVISION= 0 PKGNAMESUFFIX= -qt5 COMMENT= Qt 5 bindings to poppler diff --git a/graphics/poppler-utils/Makefile b/graphics/poppler-utils/Makefile index 9657f45fa6f2..67fa87041131 100644 --- a/graphics/poppler-utils/Makefile +++ b/graphics/poppler-utils/Makefile @@ -1,7 +1,7 @@ # Created by: Michael Nottebrock # $FreeBSD$ -PORTREVISION= 3 +PORTREVISION= 0 COMMENT= Poppler's xpdf-workalike command line utilities # ' diff --git a/graphics/poppler/Makefile b/graphics/poppler/Makefile index f5a9ba003fc0..0df80ebbc1e1 100644 --- a/graphics/poppler/Makefile +++ b/graphics/poppler/Makefile @@ -2,8 +2,8 @@ # $FreeBSD$ PORTNAME= poppler -DISTVERSION= 0.82.0 -PORTREVISION?= 1 +DISTVERSION= 0.84.0 +PORTREVISION?= 0 CATEGORIES= graphics print MASTER_SITES= https://poppler.freedesktop.org/ diff --git a/graphics/poppler/distinfo b/graphics/poppler/distinfo index bfb21b5db967..5e65fa82b4ce 100644 --- a/graphics/poppler/distinfo +++ b/graphics/poppler/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1572047126 -SHA256 (poppler-0.82.0.tar.xz) = 234f8e573ea57fb6a008e7c1e56bfae1af5d1adf0e65f47555e1ae103874e4df -SIZE (poppler-0.82.0.tar.xz) = 1553336 +TIMESTAMP = 1577727452 +SHA256 (poppler-0.84.0.tar.xz) = c7a130da743b38a548f7a21fe5940506fb1949f4ebdd3209f0e5b302fa139731 +SIZE (poppler-0.84.0.tar.xz) = 1561236 diff --git a/graphics/poppler/files/patch-CMakeLists.txt b/graphics/poppler/files/patch-CMakeLists.txt deleted file mode 100644 index 33521f482a64..000000000000 --- a/graphics/poppler/files/patch-CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ ---- CMakeLists.txt.orig 2018-10-07 08:06:59 UTC -+++ CMakeLists.txt -@@ -263,6 +263,7 @@ endif() - - if (NSS3_FOUND) - add_definitions(${NSS3_CFLAGS}) -+ link_directories(${NSS3_LIBRARY_DIRS}) - set(ENABLE_NSS3 ON) - endif() - if(JPEG_FOUND) diff --git a/graphics/poppler/pkg-plist b/graphics/poppler/pkg-plist index 220402819e2e..3d6074597778 100644 --- a/graphics/poppler/pkg-plist +++ b/graphics/poppler/pkg-plist @@ -135,8 +135,8 @@ lib/libpoppler-cpp.so lib/libpoppler-cpp.so.0 lib/libpoppler-cpp.so.0.7.0 lib/libpoppler.so -lib/libpoppler.so.92 -lib/libpoppler.so.92.0.0 +lib/libpoppler.so.94 +lib/libpoppler.so.94.0.0 libdata/pkgconfig/poppler-cairo.pc libdata/pkgconfig/poppler-cpp.pc libdata/pkgconfig/poppler-splash.pc diff --git a/print/scribus-devel/files/patch-scribus_plugins_import_pdf_importpdf.cpp b/print/scribus-devel/files/patch-scribus_plugins_import_pdf_importpdf.cpp new file mode 100644 index 000000000000..f9309530fe67 --- /dev/null +++ b/print/scribus-devel/files/patch-scribus_plugins_import_pdf_importpdf.cpp @@ -0,0 +1,65 @@ +--- scribus/plugins/import/pdf/importpdf.cpp.orig 2020-01-18 17:59:00 UTC ++++ scribus/plugins/import/pdf/importpdf.cpp +@@ -75,7 +75,7 @@ PdfPlug::PdfPlug(ScribusDoc* doc, int flags) + QImage PdfPlug::readThumbnail(const QString& fName) + { + QString pdfFile = QDir::toNativeSeparators(fName); +- globalParams = new GlobalParams(); ++ globalParams.reset(new GlobalParams()); + if (globalParams) + { + #if defined(Q_OS_WIN32) && POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 62, 0) +@@ -90,7 +90,6 @@ QImage PdfPlug::readThumbnail(const QString& fName) + if (pdfDoc->getErrorCode() == errEncrypted) + { + delete pdfDoc; +- delete globalParams; + return QImage(); + } + if (pdfDoc->isOk()) +@@ -134,11 +133,9 @@ QImage PdfPlug::readThumbnail(const QString& fName) + image.setText("YSize", QString("%1").arg(h)); + delete dev; + delete pdfDoc; +- delete globalParams; + return image; + } + delete pdfDoc; +- delete globalParams; + } + } + return QImage(); +@@ -387,7 +384,7 @@ bool PdfPlug::convert(const QString& fn) + qApp->processEvents(); + } + +- globalParams = new GlobalParams(); ++ globalParams.reset(new GlobalParams()); + GooString *userPW = nullptr; + if (globalParams) + { +@@ -429,7 +426,6 @@ bool PdfPlug::convert(const QString& fn) + if (progressDialog) + progressDialog->close(); + delete pdfDoc; +- delete globalParams; + return false; + } + if (progressDialog) +@@ -474,7 +470,6 @@ bool PdfPlug::convert(const QString& fn) + progressDialog->close(); + delete optImp; + delete pdfDoc; +- delete globalParams; + return false; + } + pageString = optImp->getPagesString(); +@@ -908,7 +903,7 @@ bool PdfPlug::convert(const QString& fn) + } + delete pdfDoc; + } +- delete globalParams; ++ globalParams.release(); + globalParams = nullptr; + + // qDebug() << "converting finished"; diff --git a/print/scribus-devel/files/patch-scribus_plugins_import_pdf_slaoutput.cpp b/print/scribus-devel/files/patch-scribus_plugins_import_pdf_slaoutput.cpp index 8f4f7d06a446..d73ea82f4885 100644 --- a/print/scribus-devel/files/patch-scribus_plugins_import_pdf_slaoutput.cpp +++ b/print/scribus-devel/files/patch-scribus_plugins_import_pdf_slaoutput.cpp @@ -1,6 +1,24 @@ ---- scribus/plugins/import/pdf/slaoutput.cpp.orig 2019-10-27 16:14:24 UTC +--- scribus/plugins/import/pdf/slaoutput.cpp.orig 2020-01-18 17:22:17 UTC +++ scribus/plugins/import/pdf/slaoutput.cpp -@@ -2784,7 +2784,7 @@ void SlaOutputDev::drawMaskedImage(GfxState *state, Ob +@@ -1224,16 +1224,7 @@ void SlaOutputDev::startDoc(PDFDoc *doc, XRef *xrefA, + catalog = catA; + pdfDoc = doc; + updateGUICounter = 0; +- m_fontEngine = new SplashFontEngine( +-#if HAVE_T1LIB_H +- globalParams->getEnableT1lib(), +-#endif +-#if HAVE_FREETYPE_H +- globalParams->getEnableFreeType(), +- true, +- true, +-#endif +- true); ++ m_fontEngine = new SplashFontEngine(true, true, true, true); + } + + void SlaOutputDev::startPage(int pageNum, GfxState *, XRef *) +@@ -2784,7 +2775,7 @@ void SlaOutputDev::drawMaskedImage(GfxState *state, Ob delete[] mbuffer; } @@ -9,7 +27,7 @@ { ImageStream * imgStr = new ImageStream(str, width, colorMap->getNumPixelComps(), colorMap->getBits()); // qDebug() << "Image Components" << colorMap->getNumPixelComps() << "Mask" << maskColors; -@@ -3365,7 +3365,7 @@ err1: +@@ -3365,7 +3356,7 @@ err1: fontsrc->unref(); } @@ -18,7 +36,7 @@ { double x1, y1, x2, y2; int render; -@@ -3452,7 +3452,7 @@ void SlaOutputDev::drawChar(GfxState *state, double x, +@@ -3452,7 +3443,7 @@ void SlaOutputDev::drawChar(GfxState *state, double x, } } @@ -27,3 +45,21 @@ { // qDebug() << "beginType3Char"; GfxFont *gfxFont; +@@ -3705,7 +3696,7 @@ QString SlaOutputDev::getAnnotationColor(const AnnotCo + return fNam; + } + +-QString SlaOutputDev::convertPath(GfxPath *path) ++QString SlaOutputDev::convertPath(const GfxPath *path) + { + if (! path) + return QString(); +@@ -3715,7 +3706,7 @@ QString SlaOutputDev::convertPath(GfxPath *path) + + for (int i = 0; i < path->getNumSubpaths(); ++i) + { +- GfxSubpath * subpath = path->getSubpath(i); ++ const GfxSubpath * subpath = path->getSubpath(i); + if (subpath->getNumPoints() > 0) + { + output += QString("M %1 %2").arg(subpath->getX(0)).arg(subpath->getY(0)); diff --git a/print/scribus-devel/files/patch-scribus_plugins_import_pdf_slaoutput.h b/print/scribus-devel/files/patch-scribus_plugins_import_pdf_slaoutput.h index 46128ebe8f14..849403c1d0c3 100644 --- a/print/scribus-devel/files/patch-scribus_plugins_import_pdf_slaoutput.h +++ b/print/scribus-devel/files/patch-scribus_plugins_import_pdf_slaoutput.h @@ -1,4 +1,4 @@ ---- scribus/plugins/import/pdf/slaoutput.h.orig 2019-10-27 16:12:47 UTC +--- scribus/plugins/import/pdf/slaoutput.h.orig 2020-01-18 17:22:17 UTC +++ scribus/plugins/import/pdf/slaoutput.h @@ -229,7 +229,7 @@ class SlaOutputDev : public OutputDev (public) @@ -20,3 +20,12 @@ void endType3Char(GfxState * /*state*/) override; void type3D0(GfxState * /*state*/, double /*wx*/, double /*wy*/) override; void type3D1(GfxState * /*state*/, double /*wx*/, double /*wy*/, double /*llx*/, double /*lly*/, double /*urx*/, double /*ury*/) override; +@@ -282,7 +282,7 @@ class SlaOutputDev : public OutputDev (public) + void getPenState(GfxState *state); + QString getColor(GfxColorSpace *color_space, POPPLER_CONST_070 GfxColor *color, int *shade); + QString getAnnotationColor(const AnnotColor *color); +- QString convertPath(GfxPath *path); ++ QString convertPath(const GfxPath *path); + int getBlendMode(GfxState *state); + void applyMask(PageItem *ite); + void pushGroup(const QString& maskName = "", GBool forSoftMask = gFalse, GBool alpha = gFalse, bool inverted = false);