Hi,
the diff below would fix the build of libreoffice after the update
of poppler to 0.72.0
(https://marc.info/?l=openbsd-ports&m=154594206203586&w=2).
ok (after the commit of the poppler update in a few days)?
Ciao,
Kili
Index: patches/patch-sdext_source_pdfimport_xpdfwrapper_pdfioutdev_gpl_cxx
===================================================================
RCS file: patches/patch-sdext_source_pdfimport_xpdfwrapper_pdfioutdev_gpl_cxx
diff -N patches/patch-sdext_source_pdfimport_xpdfwrapper_pdfioutdev_gpl_cxx
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-sdext_source_pdfimport_xpdfwrapper_pdfioutdev_gpl_cxx 29 Dec
2018 19:17:53 -0000
@@ -0,0 +1,106 @@
+$OpenBSD$
+
+Fix with newer poppler. From archlinux.
+
+Index: sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
+--- sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx.orig
++++ sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
+@@ -514,7 +514,7 @@ void PDFOutDev::printPath( GfxPath* pPath )
+ PDFOutDev::PDFOutDev( PDFDoc* pDoc ) :
+ m_pDoc( pDoc ),
+ m_aFontMap(),
+- m_pUtf8Map( new UnicodeMap("UTF-8", gTrue, &mapUTF8) ),
++ m_pUtf8Map( new UnicodeMap("UTF-8", true, &mapUTF8) ),
+ m_bSkipImages(false)
+ {
+ }
+@@ -555,7 +555,7 @@ void PDFOutDev::processLink(Link* link, Catalog*)
+ LinkAction* pAction = link->getAction();
+ if (pAction && pAction->getKind() == actionURI)
+ {
+- const char* pURI =
static_cast<LinkURI*>(pAction)->getURI()->getCString();
++ const char* pURI = static_cast<LinkURI*>(pAction)->getURI()->c_str();
+
+ std::vector<char> aEsc( lcl_escapeLineFeeds(pURI) );
+
+@@ -578,7 +578,11 @@ void PDFOutDev::restoreState(GfxState*)
+ printf( "restoreState\n" );
+ }
+
++#if POPPLER_CHECK_VERSION(0, 70, 0)
++void PDFOutDev::setDefaultCTM(const double *pMat)
++#else
+ void PDFOutDev::setDefaultCTM(double *pMat)
++#endif
+ {
+ assert(pMat);
+
+@@ -753,7 +757,7 @@ void PDFOutDev::updateFont(GfxState *state)
+
+ aFont = it->second;
+
+- std::vector<char> aEsc(
lcl_escapeLineFeeds(aFont.familyName.getCString()) );
++ std::vector<char> aEsc(
lcl_escapeLineFeeds(aFont.familyName.c_str()) );
+ printf( " %d %d %d %d %f %d %s",
+ aFont.isEmbedded,
+ aFont.isBold,
+@@ -939,11 +943,11 @@ void PDFOutDev::endTextObject(GfxState*)
+ }
+
+ void PDFOutDev::drawImageMask(GfxState* pState, Object*, Stream* str,
+- int width, int height, GBool invert,
++ int width, int height, bool invert,
+ #if POPPLER_CHECK_VERSION(0, 12, 0)
+- GBool /*interpolate*/,
++ bool /*interpolate*/,
+ #endif
+- GBool /*inlineImg*/ )
++ bool /*inlineImg*/ )
+ {
+ if (m_bSkipImages)
+ return;
+@@ -972,9 +976,9 @@ void PDFOutDev::drawImageMask(GfxState* pState, Object
+ void PDFOutDev::drawImage(GfxState*, Object*, Stream* str,
+ int width, int height, GfxImageColorMap* colorMap,
+ #if POPPLER_CHECK_VERSION(0, 12, 0)
+- GBool /*interpolate*/,
++ bool /*interpolate*/,
+ #endif
+- int* maskColors, GBool /*inlineImg*/ )
++ int* maskColors, bool /*inlineImg*/ )
+ {
+ if (m_bSkipImages)
+ return;
+@@ -1023,13 +1027,13 @@ void PDFOutDev::drawMaskedImage(GfxState*, Object*, St
+ int width, int height,
+ GfxImageColorMap* colorMap,
+ #if POPPLER_CHECK_VERSION(0, 12, 0)
+- GBool /*interpolate*/,
++ bool /*interpolate*/,
+ #endif
+ Stream* maskStr,
+ int maskWidth, int maskHeight,
+- GBool maskInvert
++ bool maskInvert
+ #if POPPLER_CHECK_VERSION(0, 12, 0)
+- , GBool /*maskInterpolate*/
++ , bool /*maskInterpolate*/
+ #endif
+ )
+ {
+@@ -1045,13 +1049,13 @@ void PDFOutDev::drawSoftMaskedImage(GfxState*, Object*
+ int width, int height,
+ GfxImageColorMap* colorMap,
+ #if POPPLER_CHECK_VERSION(0, 12, 0)
+- GBool /*interpolate*/,
++ bool /*interpolate*/,
+ #endif
+ Stream* maskStr,
+ int maskWidth, int maskHeight,
+ GfxImageColorMap* maskColorMap
+ #if POPPLER_CHECK_VERSION(0, 12, 0)
+- , GBool /*maskInterpolate*/
++ , bool /*maskInterpolate*/
+ #endif
+ )
+ {
Index: patches/patch-sdext_source_pdfimport_xpdfwrapper_pdfioutdev_gpl_hxx
===================================================================
RCS file: patches/patch-sdext_source_pdfimport_xpdfwrapper_pdfioutdev_gpl_hxx
diff -N patches/patch-sdext_source_pdfimport_xpdfwrapper_pdfioutdev_gpl_hxx
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-sdext_source_pdfimport_xpdfwrapper_pdfioutdev_gpl_hxx 29 Dec
2018 19:17:53 -0000
@@ -0,0 +1,89 @@
+$OpenBSD$
+
+Fix with newer poppler. From archlinux.
+
+Index: sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx
+--- sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx.orig
++++ sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx
+@@ -151,22 +151,26 @@ namespace pdfi
+
+ // Does this device use upside-down coordinates?
+ // (Upside-down means (0,0) is the top left corner of the page.)
+- virtual GBool upsideDown() override { return gTrue; }
++ virtual bool upsideDown() override { return true; }
+
+ // Does this device use drawChar() or drawString()?
+- virtual GBool useDrawChar() override { return gTrue; }
++ virtual bool useDrawChar() override { return true; }
+
+ // Does this device use beginType3Char/endType3Char? Otherwise,
+ // text in Type 3 fonts will be drawn with drawChar/drawString.
+- virtual GBool interpretType3Chars() override { return gFalse; }
++ virtual bool interpretType3Chars() override { return false; }
+
+ // Does this device need non-text content?
+- virtual GBool needNonText() override { return gTrue; }
++ virtual bool needNonText() override { return true; }
+
+ //----- initialization and control
+
+ // Set default transform matrix.
++#if POPPLER_CHECK_VERSION(0, 70, 0)
++ virtual void setDefaultCTM(const double *ctm) override;
++#else
+ virtual void setDefaultCTM(double *ctm) override;
++#endif
+
+ // Start a page.
+ virtual void startPage(int pageNum, GfxState *state
+@@ -233,40 +237,40 @@ namespace pdfi
+
+ //----- image drawing
+ virtual void drawImageMask(GfxState *state, Object *ref, Stream *str,
+- int width, int height, GBool invert,
++ int width, int height, bool invert,
+ #if POPPLER_CHECK_VERSION(0, 12, 0)
+- GBool interpolate,
++ bool interpolate,
+ #endif
+- GBool inlineImg) override;
++ bool inlineImg) override;
+ virtual void drawImage(GfxState *state, Object *ref, Stream *str,
+ int width, int height, GfxImageColorMap
*colorMap,
+ #if POPPLER_CHECK_VERSION(0, 12, 0)
+- GBool interpolate,
++ bool interpolate,
+ #endif
+- int *maskColors, GBool inlineImg) override;
++ int *maskColors, bool inlineImg) override;
+ virtual void drawMaskedImage(GfxState *state, Object *ref, Stream
*str,
+ int width, int height,
+ GfxImageColorMap *colorMap,
+ #if POPPLER_CHECK_VERSION(0, 12, 0)
+- GBool interpolate,
++ bool interpolate,
+ #endif
+ Stream *maskStr, int maskWidth, int
maskHeight,
+- GBool maskInvert
++ bool maskInvert
+ #if POPPLER_CHECK_VERSION(0, 12, 0)
+- , GBool maskInterpolate
++ , bool maskInterpolate
+ #endif
+ ) override;
+ virtual void drawSoftMaskedImage(GfxState *state, Object *ref, Stream
*str,
+ int width, int height,
+ GfxImageColorMap *colorMap,
+ #if POPPLER_CHECK_VERSION(0, 12, 0)
+- GBool interpolate,
++ bool interpolate,
+ #endif
+ Stream *maskStr,
+ int maskWidth, int maskHeight,
+ GfxImageColorMap *maskColorMap
+ #if POPPLER_CHECK_VERSION(0, 12, 0)
+- , GBool maskInterpolate
++ , bool maskInterpolate
+ #endif
+ ) override;
+
Index: patches/patch-sdext_source_pdfimport_xpdfwrapper_wrapper_gpl_cxx
===================================================================
RCS file: patches/patch-sdext_source_pdfimport_xpdfwrapper_wrapper_gpl_cxx
diff -N patches/patch-sdext_source_pdfimport_xpdfwrapper_wrapper_gpl_cxx
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-sdext_source_pdfimport_xpdfwrapper_wrapper_gpl_cxx 29 Dec
2018 19:17:53 -0000
@@ -0,0 +1,25 @@
+$OpenBSD$
+
+Fix with newer poppler. From archlinux.
+
+Index: sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx
+--- sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx.orig
++++ sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx
+@@ -69,7 +69,7 @@ int main(int argc, char **argv)
+
+ // read config file
+ globalParams = new GlobalParams();
+- globalParams->setErrQuiet(gTrue);
++ globalParams->setErrQuiet(true);
+ #if defined(_MSC_VER)
+ globalParams->setupBaseFonts(nullptr);
+ #endif
+@@ -143,7 +143,7 @@ int main(int argc, char **argv)
+ i,
+ PDFI_OUTDEV_RESOLUTION,
+ PDFI_OUTDEV_RESOLUTION,
+- 0, gTrue, gTrue, gTrue);
++ 0, true, true, true);
+ rDoc.processLinks(&aOutDev, i);
+ }
+