diff options
author | Paul Gideon Dann | 2018-11-19 15:23:42 +0000 |
---|---|---|
committer | Paul Gideon Dann | 2018-11-19 15:23:42 +0000 |
commit | 5cb347b9130a9865ef152b6e23d7c4e47e1d5d01 (patch) | |
tree | cb3a851c57c625df6c22251b226da6a9c1be1b9e | |
parent | 942603fc0ba44a684b74878e82b694223dd25a50 (diff) | |
download | aur-5cb347b9130a9865ef152b6e23d7c4e47e1d5d01.tar.gz |
Update for Poppler 0.71.0
-rw-r--r-- | .SRCINFO | 24 | ||||
-rw-r--r-- | 0001-Cairo-backend-added-to-Qt5-wrapper.patch | 42 | ||||
-rw-r--r-- | 0002-Setting-default-Qt5-backend-to-Cairo.patch | 8 | ||||
-rw-r--r-- | 0003-Apply-subpixel-rendering-in-Cairo-Backend.patch | 128 | ||||
-rw-r--r-- | 0004-Don-t-build-the-main-poppler-library.patch | 17 | ||||
-rw-r--r-- | 0005-Work-around-openjpeg2-includes-issue.patch | 25 | ||||
-rw-r--r-- | PKGBUILD | 19 |
7 files changed, 137 insertions, 126 deletions
@@ -1,8 +1,8 @@ # Generated by mksrcinfo v8 -# Mon Aug 13 10:53:05 UTC 2018 +# Mon Nov 19 15:23:34 UTC 2018 pkgbase = poppler-qt-lcd pkgdesc = Poppler Qt bindings, with patches to allow subpixel rendering via Cairo - pkgver = 0.67.0 + pkgver = 0.71.0 pkgrel = 1 url = https://github.com/giddie/poppler-cairo-backend arch = i686 @@ -12,22 +12,24 @@ pkgbase = poppler-qt-lcd makedepends = pkgconfig depends = qt5-base depends = cairo - depends = poppler>=0.67.0 - provides = poppler-qt=0.67.0 - provides = poppler-qt5=0.67.0 + depends = poppler>=0.71.0 + provides = poppler-qt=0.71.0 + provides = poppler-qt5=0.71.0 conflicts = poppler-qt conflicts = poppler-qt4 conflicts = poppler-qt5 - source = http://poppler.freedesktop.org/poppler-0.67.0.tar.xz + source = http://poppler.freedesktop.org/poppler-0.71.0.tar.xz source = 0001-Cairo-backend-added-to-Qt5-wrapper.patch source = 0002-Setting-default-Qt5-backend-to-Cairo.patch source = 0003-Apply-subpixel-rendering-in-Cairo-Backend.patch source = 0004-Don-t-build-the-main-poppler-library.patch - md5sums = bcfbdcaca2a1f72435e4aaa3c06664ca - md5sums = 153dfa85e66c0895685198df2aab23f4 - md5sums = bbbfa1b57a77771bbf5c3cc8a139a598 - md5sums = 5e2c5ea62d566a78d2f2a76437663095 - md5sums = 302fad6e739a022fcd4fed159e3008e2 + source = 0005-Work-around-openjpeg2-includes-issue.patch + md5sums = b505011e49e922c83f3ffb57ab40bc28 + md5sums = 9f02368dcbfe5443c685231e2d71006c + md5sums = e83270012cd0a839723f6eecdc577106 + md5sums = a8e7a953f3d26f61189077ebc4eb8cc6 + md5sums = 78dd2a6709fe4a25f73cf4972aaa1bda + md5sums = f25d93ed88065ecb31c099dd5de7ea25 pkgname = poppler-qt-lcd diff --git a/0001-Cairo-backend-added-to-Qt5-wrapper.patch b/0001-Cairo-backend-added-to-Qt5-wrapper.patch index 7ed3036d1728..aac389a10ab3 100644 --- a/0001-Cairo-backend-added-to-Qt5-wrapper.patch +++ b/0001-Cairo-backend-added-to-Qt5-wrapper.patch @@ -1,7 +1,7 @@ -From 658937f5adbf1f77302c07095447b59e607749de Mon Sep 17 00:00:00 2001 +From bced35b82a9bd386894f535794fd61feed482525 Mon Sep 17 00:00:00 2001 From: Paul Gideon Dann <pdgiddie@gmail.com> Date: Wed, 4 Apr 2018 16:36:56 +0100 -Subject: [PATCH 1/4] Cairo backend added to Qt5 wrapper +Subject: [PATCH 1/5] Cairo backend added to Qt5 wrapper --- qt5/src/CMakeLists.txt | 15 ++++++++ @@ -12,7 +12,7 @@ Subject: [PATCH 1/4] Cairo backend added to Qt5 wrapper 5 files changed, 95 insertions(+), 1 deletion(-) diff --git a/qt5/src/CMakeLists.txt b/qt5/src/CMakeLists.txt -index 38bb6b14..e40fd82b 100644 +index 6f34054e..70d635ad 100644 --- a/qt5/src/CMakeLists.txt +++ b/qt5/src/CMakeLists.txt @@ -7,6 +7,11 @@ include_directories( @@ -24,10 +24,10 @@ index 38bb6b14..e40fd82b 100644 + add_definitions(${CAIRO_CFLAGS}) +endif (HAVE_CAIRO) + - set(poppler_qt5_SRCS - poppler-annotation.cc - poppler-document.cc -@@ -29,6 +34,13 @@ set(poppler_qt5_SRCS + set(CMAKE_C_VISIBILITY_PRESET hidden) + set(CMAKE_CXX_VISIBILITY_PRESET hidden) + set(CMAKE_VISIBILITY_INLINES_HIDDEN 1) +@@ -33,6 +38,13 @@ set(poppler_qt5_SRCS poppler-media.cc ArthurOutputDev.cc ) @@ -39,9 +39,9 @@ index 38bb6b14..e40fd82b 100644 + ) +endif(HAVE_CAIRO) add_library(poppler-qt5 ${poppler_qt5_SRCS}) - set_target_properties(poppler-qt5 PROPERTIES VERSION 1.15.0 SOVERSION 1) + set_target_properties(poppler-qt5 PROPERTIES VERSION 1.17.0 SOVERSION 1) if(MINGW) -@@ -36,6 +48,9 @@ if(MINGW) +@@ -40,6 +52,9 @@ if(MINGW) set_target_properties(poppler-qt5 PROPERTIES SUFFIX "-${POPPLER_QT5_SOVERSION}${CMAKE_SHARED_LIBRARY_SUFFIX}") endif() target_link_libraries(poppler-qt5 poppler ${Qt5Core_LIBRARIES} ${Qt5Gui_LIBRARIES} ${Qt5Xml_LIBRARIES}) @@ -52,10 +52,10 @@ index 38bb6b14..e40fd82b 100644 target_link_libraries(poppler-qt5 poppler ${poppler_LIBS}) endif() diff --git a/qt5/src/poppler-document.cc b/qt5/src/poppler-document.cc -index 102bd820..4f20ebe7 100644 +index c7b90ca9..afad9f5d 100644 --- a/qt5/src/poppler-document.cc +++ b/qt5/src/poppler-document.cc -@@ -673,6 +673,9 @@ namespace Poppler { +@@ -677,6 +677,9 @@ namespace Poppler { ret << Document::SplashBackend; #endif ret << Document::ArthurBackend; @@ -66,10 +66,10 @@ index 102bd820..4f20ebe7 100644 } diff --git a/qt5/src/poppler-page.cc b/qt5/src/poppler-page.cc -index b48ee959..d2d52069 100644 +index 34f58053..37b1d06a 100644 --- a/qt5/src/poppler-page.cc +++ b/qt5/src/poppler-page.cc -@@ -46,6 +46,7 @@ +@@ -47,6 +47,7 @@ #include <QtGui/QPainter> #include <config.h> @@ -77,7 +77,7 @@ index b48ee959..d2d52069 100644 #include <PDFDoc.h> #include <Catalog.h> #include <Form.h> -@@ -59,6 +60,9 @@ +@@ -60,6 +61,9 @@ #include <SplashOutputDev.h> #include <splash/SplashBitmap.h> #endif @@ -87,7 +87,7 @@ index b48ee959..d2d52069 100644 #include "poppler-private.h" #include "poppler-page-transition-private.h" -@@ -621,6 +625,70 @@ QImage Page::renderToImage(double xres, double yres, int x, int y, int w, int h, +@@ -623,6 +627,70 @@ QImage Page::renderToImage(double xres, double yres, int x, int y, int w, int h, img = tmpimg; break; } @@ -148,7 +148,7 @@ index b48ee959..d2d52069 100644 + false, x, y, w, h); + + // Clean up -+ output_dev->setCairo(NULL); ++ output_dev->setCairo(nullptr); + cairo_destroy(cairo); + cairo_surface_destroy(surface); + delete output_dev; @@ -158,7 +158,7 @@ index b48ee959..d2d52069 100644 } if (shouldAbortRenderCallback && shouldAbortRenderCallback(payload)) -@@ -643,6 +711,8 @@ bool Page::renderToPainter(QPainter* painter, double xres, double yres, int x, i +@@ -645,6 +713,8 @@ bool Page::renderToPainter(QPainter* painter, double xres, double yres, int x, i QImageDumpingArthurOutputDev arthur_output(painter, nullptr); return renderToArthur(&arthur_output, painter, m_page, xres, yres, x, y, w, h, rotate, flags); } @@ -168,10 +168,10 @@ index b48ee959..d2d52069 100644 return false; } diff --git a/qt5/src/poppler-qt5.h b/qt5/src/poppler-qt5.h -index b70644f7..f4b1ba71 100644 +index ed189701..2e8ca01f 100644 --- a/qt5/src/poppler-qt5.h +++ b/qt5/src/poppler-qt5.h -@@ -1054,7 +1054,8 @@ delete it; +@@ -1061,7 +1061,8 @@ delete it; */ enum RenderBackend { SplashBackend, ///< Splash backend @@ -182,7 +182,7 @@ index b70644f7..f4b1ba71 100644 /** diff --git a/qt5/tests/CMakeLists.txt b/qt5/tests/CMakeLists.txt -index 1e67e6ec..9131568d 100644 +index af8de6ef..20df9f4b 100644 --- a/qt5/tests/CMakeLists.txt +++ b/qt5/tests/CMakeLists.txt @@ -11,6 +11,11 @@ include_directories( @@ -198,5 +198,5 @@ index 1e67e6ec..9131568d 100644 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Gui_EXECUTABLE_COMPILE_FLAGS}") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Xml_EXECUTABLE_COMPILE_FLAGS}") -- -2.18.0 +2.19.1 diff --git a/0002-Setting-default-Qt5-backend-to-Cairo.patch b/0002-Setting-default-Qt5-backend-to-Cairo.patch index e8e50d75aea6..e30452991478 100644 --- a/0002-Setting-default-Qt5-backend-to-Cairo.patch +++ b/0002-Setting-default-Qt5-backend-to-Cairo.patch @@ -1,14 +1,14 @@ -From deaf87c625be17d000dc1d01cf866802cb9e7ffb Mon Sep 17 00:00:00 2001 +From b8de7641f1dcad5d8c948e740e0ead6fd2aa52a0 Mon Sep 17 00:00:00 2001 From: Paul Gideon Dann <pdgiddie@gmail.com> Date: Wed, 4 Apr 2018 16:37:38 +0100 -Subject: [PATCH 2/4] Setting default Qt5 backend to Cairo +Subject: [PATCH 2/5] Setting default Qt5 backend to Cairo --- qt5/src/poppler-private.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qt5/src/poppler-private.cc b/qt5/src/poppler-private.cc -index ca5251df..6b445505 100644 +index edbabe13..4e6f255a 100644 --- a/qt5/src/poppler-private.cc +++ b/qt5/src/poppler-private.cc @@ -262,7 +262,7 @@ namespace Debug { @@ -21,5 +21,5 @@ index ca5251df..6b445505 100644 m_hints = 0; m_optContentModel = nullptr; -- -2.18.0 +2.19.1 diff --git a/0003-Apply-subpixel-rendering-in-Cairo-Backend.patch b/0003-Apply-subpixel-rendering-in-Cairo-Backend.patch index acb379526431..48b602904f63 100644 --- a/0003-Apply-subpixel-rendering-in-Cairo-Backend.patch +++ b/0003-Apply-subpixel-rendering-in-Cairo-Backend.patch @@ -1,21 +1,21 @@ -From c0c4a253390b391e7f7271969a48880faca070da Mon Sep 17 00:00:00 2001 +From a90586073f306d4598e1be254e617bd4f6ceba34 Mon Sep 17 00:00:00 2001 From: Paul Gideon Dann <pdgiddie@gmail.com> Date: Tue, 9 Aug 2016 15:02:53 +0100 -Subject: [PATCH 3/4] Apply subpixel rendering in Cairo Backend +Subject: [PATCH 3/5] Apply subpixel rendering in Cairo Backend Source: https://github.com/zhou13/poppler-subpixel/blob/master/poppler/poppler-subpixel.patch --- - glib/demo/render.c | 25 +++++++++++++++-- - glib/poppler-page.cc | 10 +++++++ + glib/demo/render.c | 25 ++++++++++++++++++++--- + glib/poppler-page.cc | 10 ++++++++++ glib/poppler-page.h | 1 + - poppler/CairoFontEngine.cc | 6 ++-- - poppler/CairoOutputDev.cc | 24 ++++++++++++++++ - poppler/Gfx.cc | 56 ++++++++++++++++++++++++++++++++++++++ - poppler/Gfx.h | 3 ++ - poppler/Page.cc | 14 ++++++++++ - poppler/Page.h | 3 ++ - 9 files changed, 136 insertions(+), 6 deletions(-) + poppler/CairoFontEngine.cc | 6 +++--- + poppler/CairoOutputDev.cc | 24 ++++++++++++++++++++++ + poppler/Gfx.cc | 41 ++++++++++++++++++++++++++++++++++++++ + poppler/Gfx.h | 3 +++ + poppler/Page.cc | 13 ++++++++++++ + poppler/Page.h | 3 +++ + 9 files changed, 120 insertions(+), 6 deletions(-) diff --git a/glib/demo/render.c b/glib/demo/render.c index 78d24bb5..d482ceb5 100644 @@ -74,7 +74,7 @@ index 78d24bb5..d482ceb5 100644 g_timer_stop (timer); diff --git a/glib/poppler-page.cc b/glib/poppler-page.cc -index 6b511692..8f08307d 100644 +index 6a592fbc..3bd532fa 100644 --- a/glib/poppler-page.cc +++ b/glib/poppler-page.cc @@ -2419,3 +2419,13 @@ poppler_page_get_text_attributes_for_area (PopplerPage *page, @@ -92,11 +92,11 @@ index 6b511692..8f08307d 100644 + return page->page->supportSubpixelRendering(output_dev); +} diff --git a/glib/poppler-page.h b/glib/poppler-page.h -index fdbfd38e..0f02a3af 100644 +index 487b3656..24216aeb 100644 --- a/glib/poppler-page.h +++ b/glib/poppler-page.h -@@ -109,6 +109,7 @@ GList *poppler_page_get_text_attributes (PopplerPage *pa - void poppler_page_free_text_attributes (GList *list); +@@ -147,6 +147,7 @@ void poppler_page_free_text_attributes (GList *li + POPPLER_PUBLIC GList * poppler_page_get_text_attributes_for_area (PopplerPage *page, PopplerRectangle *area); +gboolean poppler_page_support_subpixel_rendering (PopplerPage *page); @@ -104,10 +104,10 @@ index fdbfd38e..0f02a3af 100644 /* A rectangle on a page, with coordinates in PDF points. */ #define POPPLER_TYPE_RECTANGLE (poppler_rectangle_get_type ()) diff --git a/poppler/CairoFontEngine.cc b/poppler/CairoFontEngine.cc -index 91deac46..aad28564 100644 +index 4114fa7b..c922c162 100644 --- a/poppler/CairoFontEngine.cc +++ b/poppler/CairoFontEngine.cc -@@ -132,7 +132,7 @@ CairoFont::getSubstitutionCorrection(GfxFont *gfxFont) +@@ -123,7 +123,7 @@ CairoFont::getSubstitutionCorrection(GfxFont *gfxFont) cairo_matrix_t m; cairo_matrix_init_identity(&m); cairo_font_options_t *options = cairo_font_options_create(); @@ -116,7 +116,7 @@ index 91deac46..aad28564 100644 cairo_font_options_set_hint_metrics(options, CAIRO_HINT_METRICS_OFF); cairo_scaled_font_t *scaled_font = cairo_scaled_font_create(cairo_font_face, &m, &m, options); -@@ -190,7 +190,7 @@ _ft_new_face_uncached (FT_Library lib, +@@ -181,7 +181,7 @@ _ft_new_face_uncached (FT_Library lib, } font_face = cairo_ft_font_face_create_for_ft_face (face, @@ -125,7 +125,7 @@ index 91deac46..aad28564 100644 FT_LOAD_NO_BITMAP); if (cairo_font_face_set_user_data (font_face, &_ft_cairo_key, -@@ -359,7 +359,7 @@ _ft_new_face (FT_Library lib, +@@ -350,7 +350,7 @@ _ft_new_face (FT_Library lib, _ft_open_faces = l; l->font_face = cairo_ft_font_face_create_for_ft_face (tmpl.face, @@ -135,10 +135,10 @@ index 91deac46..aad28564 100644 if (cairo_font_face_set_user_data (l->font_face, &_ft_cairo_key, diff --git a/poppler/CairoOutputDev.cc b/poppler/CairoOutputDev.cc -index 8e8102e9..a93a7075 100644 +index b8a3e491..9490b600 100644 --- a/poppler/CairoOutputDev.cc +++ b/poppler/CairoOutputDev.cc -@@ -214,6 +214,13 @@ void CairoOutputDev::setCairo(cairo_t *cairo) +@@ -205,6 +205,13 @@ void CairoOutputDev::setCairo(cairo_t *cairo) } if (cairo != nullptr) { this->cairo = cairo_reference (cairo); @@ -152,7 +152,7 @@ index 8e8102e9..a93a7075 100644 /* save the initial matrix so that we can use it for type3 fonts. */ //XXX: is this sufficient? could we miss changes to the matrix somehow? cairo_get_matrix(cairo, &orig_matrix); -@@ -1441,6 +1448,7 @@ void CairoOutputDev::drawChar(GfxState *state, double x, double y, +@@ -1431,6 +1438,7 @@ void CairoOutputDev::drawChar(GfxState *state, double x, double y, void CairoOutputDev::endString(GfxState *state) { int render; @@ -160,7 +160,7 @@ index 8e8102e9..a93a7075 100644 if (!currentFont) return; -@@ -1458,6 +1466,18 @@ void CairoOutputDev::endString(GfxState *state) +@@ -1448,6 +1456,18 @@ void CairoOutputDev::endString(GfxState *state) goto finish; } @@ -179,7 +179,7 @@ index 8e8102e9..a93a7075 100644 if (!(render & 1)) { LOG (printf ("fill string\n")); cairo_set_source (cairo, fill_pattern); -@@ -1508,6 +1528,10 @@ void CairoOutputDev::endString(GfxState *state) +@@ -1498,6 +1518,10 @@ void CairoOutputDev::endString(GfxState *state) } finish: @@ -191,105 +191,89 @@ index 8e8102e9..a93a7075 100644 glyphs = nullptr; if (use_show_text_glyphs) { diff --git a/poppler/Gfx.cc b/poppler/Gfx.cc -index 8f2c62d2..473cacb5 100644 +index 3dfc08e8..428a4481 100644 --- a/poppler/Gfx.cc +++ b/poppler/Gfx.cc -@@ -4611,6 +4611,62 @@ void Gfx::doImage(Object *ref, Stream *str, GBool inlineImg) { +@@ -4604,6 +4604,47 @@ void Gfx::doImage(Object *ref, Stream *str, bool inlineImg) { error(errSyntaxError, getPos(), "Bad image parameters"); } -+GBool Gfx::checkNormalBlendModeOnly(Object *str) { ++bool Gfx::checkNormalBlendModeOnly(Object *str) { + printf("check blender mode start\n"); -+ char *cmd; -+ Object obj; + Object args[maxArgs]; -+ int numArgs, i; -+ GBool onlyNormalBlendMode; -+ Parser myParser(xref, new Lexer(xref, str), gFalse); ++ int numArgs; ++ bool onlyNormalBlendMode; ++ Parser myParser(xref, new Lexer(xref, str), false); + + numArgs = 0; -+ onlyNormalBlendMode = gTrue; ++ onlyNormalBlendMode = true; + -+ myParser.getObj(&obj); ++ Object obj = myParser.getObj(); + while (!obj.isEOF()) { + if (obj.isCmd()) { -+ cmd = obj.getCmd(); ++ const char* cmd = obj.getCmd(); + + if (strcmp(cmd, "gs") == 0) { -+ Object obj1, obj2; + GfxBlendMode mode; -+ if (res->lookupGState(args[0].getName(), &obj1)) { -+ if (!obj1.dictLookup("BM", &obj2)->isNull()) { ++ Object obj1 = res->lookupGState(args[0].getName()); ++ if (!obj1.isNull()) { ++ Object obj2 = obj1.dictLookup("BM"); ++ if (!obj2.isNull()) { + if (state->parseBlendMode(&obj2, &mode)) { + printf("check blend mode: %d\n", mode); + onlyNormalBlendMode &= (mode == gfxBlendNormal); + } + } -+ obj2.free(); + } -+ obj1.free(); + } -+ obj.free(); + -+ for (i = 0; i < numArgs; ++i) -+ args[i].free(); + numArgs = 0; -+ + } else if (numArgs < maxArgs) { -+ args[numArgs++] = obj; -+ } else { -+ obj.free(); ++ args[numArgs++] = obj.copy(); + } + -+ myParser.getObj(&obj); -+ } -+ obj.free(); -+ -+ if (numArgs > 0) { -+ for (i = 0; i < numArgs; ++i) -+ args[i].free(); ++ obj = myParser.getObj(); + } + + return onlyNormalBlendMode; +} + + - GBool Gfx::checkTransparencyGroup(Dict *resDict) { + bool Gfx::checkTransparencyGroup(Dict *resDict) { // check the effect of compositing objects as a group: // look for ExtGState entries with ca != 1 or CA != 1 or BM != normal diff --git a/poppler/Gfx.h b/poppler/Gfx.h -index 3ac4c929..5cefa0d1 100644 +index f966e8f6..3850bc28 100644 --- a/poppler/Gfx.h +++ b/poppler/Gfx.h -@@ -195,6 +195,9 @@ public: +@@ -193,6 +193,9 @@ public: // Get the current graphics state object. GfxState *getState() { return state; } + // Check whether a stream only contains normal blend mode (to enable subpixel rendering) -+ GBool checkNormalBlendModeOnly(Object *str); ++ bool checkNormalBlendModeOnly(Object *str); + - GBool checkTransparencyGroup(Dict *resDict); + bool checkTransparencyGroup(Dict *resDict); - void drawForm(Object *str, Dict *resDict, double *matrix, double *bbox, + void drawForm(Object *str, Dict *resDict, const double *matrix, const double *bbox, diff --git a/poppler/Page.cc b/poppler/Page.cc -index d4799dd1..4a0e559e 100644 +index fddb831c..880ee303 100644 --- a/poppler/Page.cc +++ b/poppler/Page.cc -@@ -348,6 +348,20 @@ Dict *Page::getResourceDictCopy(XRef *xrefA) { +@@ -336,6 +336,19 @@ Dict *Page::getResourceDictCopy(XRef *xrefA) { return dict ? dict->copy(xrefA) : nullptr; } -+GBool Page::supportSubpixelRendering(OutputDev *out) { -+ GBool supported = gFalse; -+ Object obj; ++bool Page::supportSubpixelRendering(OutputDev *out) { ++ bool supported = false; + PDFRectangle box; + -+ contents.fetch(xref, &obj); ++ Object obj = contents.fetch(xref); + if (!obj.isNull()) { -+ Gfx gfx(doc, out, attrs->getResourceDict(), &box, NULL); ++ Gfx gfx(doc, out, attrs->getResourceDict(), &box, nullptr); + supported = gfx.checkNormalBlendModeOnly(&obj); + } -+ obj.free(); ++ + return supported; +} + @@ -297,19 +281,19 @@ index d4799dd1..4a0e559e 100644 Object obj1; Dict *pageDict = pageObj.getDict()->copy(xrefA); diff --git a/poppler/Page.h b/poppler/Page.h -index 7151ee5b..41c1fd75 100644 +index 37b59455..bf8e44aa 100644 --- a/poppler/Page.h +++ b/poppler/Page.h -@@ -185,6 +185,9 @@ public: +@@ -183,6 +183,9 @@ public: Object *getResourceDictObject(); Dict *getResourceDictCopy(XRef *xrefA); + // Whether the content in this page supports subpixel rendering (lcdfilter) -+ GBool supportSubpixelRendering(OutputDev *out); ++ bool supportSubpixelRendering(OutputDev *out); + // Get annotations array. Object getAnnotsObject(XRef *xrefA = nullptr) { return annotsObj.fetch(xrefA ? xrefA : xref); } // Add a new annotation to the page -- -2.18.0 +2.19.1 diff --git a/0004-Don-t-build-the-main-poppler-library.patch b/0004-Don-t-build-the-main-poppler-library.patch index 14f43a3533ba..28810a8e4575 100644 --- a/0004-Don-t-build-the-main-poppler-library.patch +++ b/0004-Don-t-build-the-main-poppler-library.patch @@ -1,28 +1,27 @@ -From 07fde1b2f53a16306401a85264e5728ec510036d Mon Sep 17 00:00:00 2001 +From 3bb124da95aba8cbea8625b66b1d10af8dde21bb Mon Sep 17 00:00:00 2001 From: Paul Gideon Dann <pdgiddie@gmail.com> Date: Tue, 20 Oct 2009 18:32:35 +0100 -Subject: [PATCH 4/4] Don't build the main poppler library. +Subject: [PATCH 4/5] Don't build the main poppler library. --- - CMakeLists.txt | 18 ------------------ - 1 file changed, 18 deletions(-) + CMakeLists.txt | 17 ----------------- + 1 file changed, 17 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt -index cdfe7795..001425ce 100644 +index 88a53c47..f3abde94 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -483,24 +483,6 @@ if(TIFF_FOUND) +@@ -478,23 +478,6 @@ if(TIFF_FOUND) set(poppler_LIBS ${poppler_LIBS} ${TIFF_LIBRARIES}) endif() -if(MSVC) -add_definitions(-D_CRT_SECURE_NO_WARNINGS) --set(CMAKE_CXX_FLAGS "/Zc:wchar_t- ${CMAKE_CXX_FLAGS}") -add_library(poppler STATIC ${poppler_SRCS}) -else() -add_library(poppler ${poppler_SRCS}) -endif() --set_target_properties(poppler PROPERTIES VERSION 78.0.0 SOVERSION 78) +-set_target_properties(poppler PROPERTIES VERSION 82.0.0 SOVERSION 82) -if(MINGW) - get_target_property(POPPLER_SOVERSION poppler SOVERSION) - set_target_properties(poppler PROPERTIES SUFFIX "-${POPPLER_SOVERSION}${CMAKE_SHARED_LIBRARY_SUFFIX}") @@ -37,5 +36,5 @@ index cdfe7795..001425ce 100644 install(FILES poppler/Annot.h -- -2.18.0 +2.19.1 diff --git a/0005-Work-around-openjpeg2-includes-issue.patch b/0005-Work-around-openjpeg2-includes-issue.patch new file mode 100644 index 000000000000..f44b5ee7fb62 --- /dev/null +++ b/0005-Work-around-openjpeg2-includes-issue.patch @@ -0,0 +1,25 @@ +From eed96a07bc528a6a30ae1ff317a4fb6f9e779e93 Mon Sep 17 00:00:00 2001 +From: Paul Gideon Dann <pdgiddie@gmail.com> +Date: Mon, 19 Nov 2018 15:04:47 +0000 +Subject: [PATCH 5/5] Work around openjpeg2 includes issue + +--- + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f3abde94..8ac4bc04 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -279,7 +279,7 @@ if(TIFF_FOUND) + set(ENABLE_LIBTIFF ON) + endif() + if(OpenJPEG_FOUND) +- include_directories(${OPENJPEG_INCLUDE_DIRS}) ++ include_directories(/usr/lib/openjpeg-2.3) + endif() + if(LCMS2_FOUND) + include_directories(${LCMS2_INCLUDE_DIR}) +-- +2.19.1 + @@ -2,7 +2,7 @@ # Maintainer: Paul Gideon Dann <pdgiddie_at_gmail.com> pkgname=poppler-qt-lcd -pkgver=0.67.0 +pkgver=0.71.0 pkgrel=1 pkgdesc="Poppler Qt bindings, with patches to allow subpixel rendering via Cairo" license=('GPL') @@ -16,12 +16,14 @@ source=(http://poppler.freedesktop.org/poppler-${pkgver}.tar.xz 0001-Cairo-backend-added-to-Qt5-wrapper.patch 0002-Setting-default-Qt5-backend-to-Cairo.patch 0003-Apply-subpixel-rendering-in-Cairo-Backend.patch - 0004-Don-t-build-the-main-poppler-library.patch) -md5sums=('bcfbdcaca2a1f72435e4aaa3c06664ca' - '153dfa85e66c0895685198df2aab23f4' - 'bbbfa1b57a77771bbf5c3cc8a139a598' - '5e2c5ea62d566a78d2f2a76437663095' - '302fad6e739a022fcd4fed159e3008e2') + 0004-Don-t-build-the-main-poppler-library.patch + 0005-Work-around-openjpeg2-includes-issue.patch) +md5sums=('b505011e49e922c83f3ffb57ab40bc28' + '9f02368dcbfe5443c685231e2d71006c' + 'e83270012cd0a839723f6eecdc577106' + 'a8e7a953f3d26f61189077ebc4eb8cc6' + '78dd2a6709fe4a25f73cf4972aaa1bda' + 'f25d93ed88065ecb31c099dd5de7ea25') build() { cd "${srcdir}/poppler-${pkgver}" @@ -32,8 +34,7 @@ build() { mkdir -p build cd build - cmake -DQT_QMAKE_EXECUTABLE=/usr/bin/qmake-qt5 \ - -DCMAKE_INSTALL_PREFIX=/usr \ + cmake -DCMAKE_INSTALL_PREFIX=/usr \ -DENABLE_CPP=OFF -DENABLE_UTILS=OFF \ -DWITH_GLIB=OFF \ .. |