Unbreak the build with poppler-0.83.0.

To be committed right after poppler.

ok?

Index: patches/patch-pdf-backend_cc
===================================================================
RCS file: patches/patch-pdf-backend_cc
diff -N patches/patch-pdf-backend_cc
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-pdf-backend_cc        16 Dec 2019 21:13:08 -0000
@@ -0,0 +1,31 @@
+$OpenBSD$
+
+Fix build with poppler-0.83.0.
+
+Index: pdf-backend.cc
+--- pdf-backend.cc.orig
++++ pdf-backend.cc
+@@ -103,7 +103,7 @@ static void poppler_error_handler(void *data, ErrorCat
+ 
+ pdf::Environment::Environment()
+ {
+-  globalParams = new GlobalParams();
++  globalParams = std::make_unique<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 <poppler/SplashOutputDev.c>. */
+-  pdf::gfx::Subpath *subpath;
+-  pdf::gfx::Path *path = state->getPath();
++  const pdf::gfx::Path *path = state->getPath();
+   int n_subpaths = path->getNumSubpaths();
+   for (int i = 0; i < n_subpaths; i++)
+   {
+-    subpath = path->getSubpath(i);
++    const pdf::gfx::Subpath *subpath = path->getSubpath(i);
+     if (subpath->getNumPoints() > 0)
+     {
+       double x1, y1, x2, y2, x3, y3;

Reply via email to