$OpenBSD: patch-src_extension_internal_pdfinput_pdf-parser_cpp,v 1.17 2020/01/02 20:32:58 kili Exp $

Fix build with poppler-0.76. From archlinux.

And with poppler-0.83.0.

Index: src/extension/internal/pdfinput/pdf-parser.cpp
--- src/extension/internal/pdfinput/pdf-parser.cpp.orig
+++ src/extension/internal/pdfinput/pdf-parser.cpp
@@ -272,7 +272,7 @@ class ClipHistoryEntry { (public)
     ClipHistoryEntry *save();
     ClipHistoryEntry *restore();
     GBool hasSaves() { return saved != NULL; }
-    void setClip(GfxPath *newClipPath, GfxClipType newClipType = clipNormal);
+    void setClip(const GfxPath *newClipPath, GfxClipType newClipType = clipNormal);
     GfxPath *getClipPath() { return clipPath; }
     GfxClipType getClipType() { return clipType; }
 
@@ -426,7 +426,7 @@ void PdfParser::parse(Object *obj, GBool topLevel) {
 	error(errInternal, -1, "Weird page contents");
     	return;
   }
-  parser = new Parser(xref, new Lexer(xref, obj), gFalse);
+  parser = new Parser(xref, obj, gFalse);
   go(topLevel);
   delete parser;
   parser = NULL;
@@ -2414,7 +2414,7 @@ void PdfParser::doShowText(GooString *s) {
   int wMode;
   double riseX, riseY;
   CharCode code;
-  Unicode *u = NULL;
+  const Unicode *u = NULL;
   double x, y, dx, dy, tdx, tdy;
   double originX, originY, tOriginX, tOriginY;
   double oldCTM[6], newCTM[6];
@@ -3394,7 +3394,7 @@ ClipHistoryEntry::~ClipHistoryEntry()
     }
 }
 
-void ClipHistoryEntry::setClip(GfxPath *clipPathA, GfxClipType clipTypeA) {
+void ClipHistoryEntry::setClip(const GfxPath *clipPathA, GfxClipType clipTypeA) {
     // Free previous clip path
     if (clipPath) {
         delete clipPath;
