Thursday, December 05, 2024

fix print/scribus

Fix build with poppler-24.12.

Lightly tested by importing a PDF.

If there are no objections, I'll commit this right after the poppler
update.

Ciao,
Kili

Index: Makefile
===================================================================
RCS file: /cvs/ports/print/scribus/Makefile,v
diff -u -p -r1.92 Makefile
--- Makefile 29 Jul 2024 08:15:04 -0000 1.92
+++ Makefile 5 Dec 2024 19:04:44 -0000
@@ -3,6 +3,7 @@ DPB_PROPERTIES= parallel
COMMENT= desktop publishing program
DISTNAME= scribus-1.6.2
CATEGORIES= print
+REVISION= 0

HOMEPAGE= https://www.scribus.net/

Index: patches/patch-scribus_plugins_import_pdf_pdftextrecognition_h
===================================================================
RCS file: patches/patch-scribus_plugins_import_pdf_pdftextrecognition_h
diff -N patches/patch-scribus_plugins_import_pdf_pdftextrecognition_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-scribus_plugins_import_pdf_pdftextrecognition_h 5 Dec 2024 19:04:44 -0000
@@ -0,0 +1,24 @@
+Fix build with poppler-24.10.0.
+
+From upstream commmit 26429.
+
+Index: scribus/plugins/import/pdf/pdftextrecognition.h
+--- scribus/plugins/import/pdf/pdftextrecognition.h.orig
++++ scribus/plugins/import/pdf/pdftextrecognition.h
+@@ -16,7 +16,6 @@ for which a new license (GPL+exception) is in place.
+ #include "slaoutput.h"
+
+ #include <poppler/GfxState.h>
+-#include <poppler/CharCodeToUnicode.h>
+
+ /* PDF TextBox Framework */
+ /*
+@@ -143,7 +142,7 @@ class PdfTextOutputDev : public SlaOutputDev
+ {
+ public:
+ PdfTextOutputDev(ScribusDoc* doc, QList<PageItem*>* Elements, QStringList* importedColors, int flags);
+- virtual ~PdfTextOutputDev();
++ ~PdfTextOutputDev() override;
+
+ void updateFont(GfxState* state) override;
+
Index: patches/patch-scribus_plugins_import_pdf_slaoutput_cpp
===================================================================
RCS file: /cvs/ports/print/scribus/patches/patch-scribus_plugins_import_pdf_slaoutput_cpp,v
diff -u -p -r1.11 patch-scribus_plugins_import_pdf_slaoutput_cpp
--- patches/patch-scribus_plugins_import_pdf_slaoutput_cpp 24 Oct 2024 19:10:53 -0000 1.11
+++ patches/patch-scribus_plugins_import_pdf_slaoutput_cpp 5 Dec 2024 19:04:44 -0000
@@ -1,4 +1,6 @@
-Fix build with poppler-24.10.0. From upstream commits 26325 and 26327.
+Fix build with poppler-24.10.0.
+
+From upstream commits 26325, 26327, 26392 and 26394.

Index: scribus/plugins/import/pdf/slaoutput.cpp
--- scribus/plugins/import/pdf/slaoutput.cpp.orig
@@ -34,7 +36,76 @@ Index: scribus/plugins/import/pdf/slaout
LinkImportData::LinkImportData(Object *actionObj)
{
if (!actionObj->isDict())
-@@ -1078,6 +1082,30 @@ void SlaOutputDev::handleActions(PageItem* ite, AnnotW
+@@ -167,13 +171,8 @@ void AnoOutputDev::drawString(GfxState *state, POPPLER
+ int shade = 100;
+ currColorText = getColor(state->getFillColorSpace(), state->getFillColor(), &shade);
+ fontSize = state->getFontSize();
+-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 4, 0)
+ if (state->getFont() && state->getFont()->getName())
+ fontName = new GooString(state->getFont()->getName().value());
+-#else
+- if (state->getFont())
+- fontName = state->getFont()->getName()->copy();
+-

No comments:

Post a Comment