Hi,

this lets editors/calligra build with poppler-23.05.

ok?

Ciao,
        Kili

Index: Makefile
===================================================================
RCS file: /cvs/ports/editors/calligra/Makefile,v
retrieving revision 1.56
diff -u -p -r1.56 Makefile
--- Makefile    24 Apr 2023 11:40:37 -0000      1.56
+++ Makefile    16 Jul 2023 21:51:13 -0000
@@ -3,7 +3,7 @@ HOMEPAGE =      https://www.calligra.org
 VERSION =      3.2.1
 DISTNAME =     calligra-${VERSION}
 CATEGORIES =   editors
-REVISION =     10
+REVISION =     11
 
 SHARED_LIBS =   RtfReader                 51.0 # 0.0
 SHARED_LIBS +=  basicflakes               50.0 # 0.0
Index: patches/patch-filters_karbon_pdf_Pdf2OdgImport_cpp
===================================================================
RCS file: patches/patch-filters_karbon_pdf_Pdf2OdgImport_cpp
diff -N patches/patch-filters_karbon_pdf_Pdf2OdgImport_cpp
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-filters_karbon_pdf_Pdf2OdgImport_cpp  16 Jul 2023 21:51:13 
-0000
@@ -0,0 +1,15 @@
+Fix build with poppler-23.05.
+
+--- filters/karbon/pdf/Pdf2OdgImport.cpp.orig
++++ filters/karbon/pdf/Pdf2OdgImport.cpp
+@@ -86,8 +86,8 @@ KoFilter::ConversionStatus Pdf2OdgImport::convert(cons
+     if (! globalParams)
+         return KoFilter::NotImplemented;
+ 
+-    GooString * fname = new 
GooString(QFile::encodeName(m_chain->inputFile()).data());
+-    PDFDoc * pdfDoc = new PDFDoc(fname, 0, 0, 0);
++    PDFDoc * pdfDoc = new 
PDFDoc(std::make_unique<GooString>(QFile::encodeName(m_chain->inputFile()).data()),
++                               std::nullopt, std::nullopt, 0);
+     if (! pdfDoc) {
+ #ifdef HAVE_POPPLER_PRE_0_83
+         delete globalParams;
Index: patches/patch-filters_karbon_pdf_PdfImport_cpp
===================================================================
RCS file: patches/patch-filters_karbon_pdf_PdfImport_cpp
diff -N patches/patch-filters_karbon_pdf_PdfImport_cpp
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-filters_karbon_pdf_PdfImport_cpp      16 Jul 2023 21:51:13 
-0000
@@ -0,0 +1,15 @@
+Fix build with poppler-23.05.
+
+--- filters/karbon/pdf/PdfImport.cpp.orig
++++ filters/karbon/pdf/PdfImport.cpp
+@@ -73,8 +73,8 @@ KoFilter::ConversionStatus PdfImport::convert(const QB
+     if (! globalParams)
+         return KoFilter::NotImplemented;
+ 
+-    GooString * fname = new 
GooString(QFile::encodeName(m_chain->inputFile()).data());
+-    PDFDoc * pdfDoc = new PDFDoc(fname, 0, 0, 0);
++    PDFDoc * pdfDoc = new 
PDFDoc(std::make_unique<GooString>(QFile::encodeName(m_chain->inputFile()).data()),
++                               std::nullopt, std::nullopt, 0);
+     if (! pdfDoc) {
+ #ifdef HAVE_POPPLER_PRE_0_83
+         delete globalParams;
Index: patches/patch-filters_karbon_pdf_SvgOutputDev_cpp
===================================================================
RCS file: patches/patch-filters_karbon_pdf_SvgOutputDev_cpp
diff -N patches/patch-filters_karbon_pdf_SvgOutputDev_cpp
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-filters_karbon_pdf_SvgOutputDev_cpp   16 Jul 2023 21:51:13 
-0000
@@ -0,0 +1,13 @@
+Fix build with poppler-23.05.
+
+--- filters/karbon/pdf/SvgOutputDev.cpp.orig
++++ filters/karbon/pdf/SvgOutputDev.cpp
+@@ -410,7 +410,7 @@ void SvgOutputDev::drawString(GfxState * state, const 
+     if (s->getLength() == 0)
+         return;
+ 
+-    GfxFont * font = state->getFont();
++    GfxFont * font = state->getFont().get();
+ 
+     QString str;
+ 

Reply via email to