Index: poppler-glib.pc.cmake
--- poppler-glib.pc.cmake.orig	2020-07-11 18:39:45.000000000 +0200
+++ poppler-glib.pc.cmake	2020-07-13 09:00:32.090563000 +0200
@@ -8,5 +8,5 @@
 Requires: glib-2.0 >= @GLIB_REQUIRED@ gobject-2.0 >= @GLIB_REQUIRED@ cairo >= @CAIRO_VERSION@
 @PC_REQUIRES_PRIVATE@
 
-Libs: -L${libdir} -lpoppler-glib
+Libs: -L${libdir} -lpoppler-glib -lstdc++
 Cflags: -I${includedir}/poppler/glib
Index: poppler.pc.cmake
--- poppler.pc.cmake.orig	2020-07-11 18:39:45.000000000 +0200
+++ poppler.pc.cmake	2020-07-13 09:00:32.090740000 +0200
@@ -6,5 +6,5 @@
 Description: PDF rendering library
 Version: @POPPLER_VERSION@
 
-Libs: -L${libdir} -lpoppler
+Libs: -L${libdir} -lpoppler -lstdc++
 Cflags: -I${includedir}/poppler
Index: poppler/GlobalParams.cc
--- poppler/GlobalParams.cc.orig	2020-07-13 09:00:32.091236000 +0200
+++ poppler/GlobalParams.cc	2020-07-13 09:08:53.748187000 +0200
@@ -1057,7 +1057,7 @@
                        { "ZapfDingbats", "d050000l.pfb", nullptr },
                        { nullptr, nullptr, nullptr } };
 
-static const char *displayFontDirs[] = { "/usr/share/ghostscript/fonts", "/usr/local/share/ghostscript/fonts", "/usr/share/fonts/default/Type1", "/usr/share/fonts/default/ghostscript", "/usr/share/fonts/type1/gsfonts", nullptr };
+static const char *displayFontDirs[] = { "@l_prefix@/share/ghostscript/fonts", nullptr };
 
 void GlobalParams::setupBaseFonts(const char *dir)
 {
Index: poppler/JPEG2000Stream.cc
--- poppler/JPEG2000Stream.cc.orig	2020-07-11 18:39:45.000000000 +0200
+++ poppler/JPEG2000Stream.cc	2020-07-13 09:00:32.091645000 +0200
@@ -17,7 +17,7 @@
 
 #include "config.h"
 #include "JPEG2000Stream.h"
-#include <openjpeg.h>
+#include "openjpeg.h"
 
 #define OPENJPEG_VERSION_ENCODE(major, minor, micro) (((major)*10000) + ((minor)*100) + ((micro)*1))
 
Index: poppler/Lexer.cc
--- poppler/Lexer.cc.orig	2020-07-11 18:39:45.000000000 +0200
+++ poppler/Lexer.cc	2020-07-13 09:00:32.091884000 +0200
@@ -35,6 +35,10 @@
 #include "Error.h"
 #include "XRef.h"
 
+#ifndef LLONG_MAX
+#define LLONG_MAX LONG_MAX*2
+#endif
+
 //------------------------------------------------------------------------
 
 // A '1' in this array means the character is white space.  A '1' or
Index: poppler/PDFDoc.cc
--- poppler/PDFDoc.cc.orig	2020-07-11 18:39:45.000000000 +0200
+++ poppler/PDFDoc.cc	2020-07-13 09:00:32.092529000 +0200
@@ -105,6 +105,10 @@
     1024 // read this many bytes at end of file
          //   to look for 'startxref'
 
+#ifndef LLONG_MAX
+#define LLONG_MAX LONG_MAX*2
+#endif
+
 //------------------------------------------------------------------------
 // PDFDoc
 //------------------------------------------------------------------------
