Hi, this fixes the build with poppler-0.85.0.
ok to commit after the poppler update? Ciao, Kili Index: Makefile =================================================================== RCS file: /cvs/ports/graphics/pdf2djvu/Makefile,v retrieving revision 1.37 diff -u -p -r1.37 Makefile --- Makefile 2 Jan 2020 20:33:43 -0000 1.37 +++ Makefile 15 Feb 2020 21:10:05 -0000 @@ -4,7 +4,7 @@ COMMENT = creates DjVu files from PDF f V = 0.9.14 DISTNAME = pdf2djvu-${V} -REVISION = 0 +REVISION = 1 CATEGORIES = graphics Index: patches/patch-pdf-backend_cc =================================================================== RCS file: /cvs/ports/graphics/pdf2djvu/patches/patch-pdf-backend_cc,v retrieving revision 1.4 diff -u -p -r1.4 patch-pdf-backend_cc --- patches/patch-pdf-backend_cc 2 Jan 2020 20:33:43 -0000 1.4 +++ patches/patch-pdf-backend_cc 15 Feb 2020 21:10:05 -0000 @@ -1,19 +1,30 @@ $OpenBSD: patch-pdf-backend_cc,v 1.4 2020/01/02 20:33:43 kili Exp $ -Fix build with poppler-0.83.0. +Fix build with poppler-0.83.0 and -0.85.0. Index: pdf-backend.cc --- pdf-backend.cc.orig +++ pdf-backend.cc -@@ -103,7 +103,7 @@ static void poppler_error_handler(void *data, ErrorCat +@@ -48,7 +48,7 @@ + * ====================== + */ + +-static void poppler_error_handler(void *data, ErrorCategory category, pdf::Offset pos, const char *message) ++static void poppler_error_handler(ErrorCategory category, pdf::Offset pos, const char *message) + { + std::string format; + const char *category_name = _("PDF error"); +@@ -103,8 +103,8 @@ static void poppler_error_handler(void *data, ErrorCat pdf::Environment::Environment() { - globalParams = new GlobalParams(); +- setErrorCallback(poppler_error_handler, nullptr); + globalParams = std::make_unique<GlobalParams>(); - setErrorCallback(poppler_error_handler, nullptr); ++ setErrorCallback(poppler_error_handler); } + void pdf::Environment::set_antialias(bool value) @@ -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) {