Hi,

this fixes the build of scribus with poppler-21.03.0. Based on
upstream svn.

Ciao,
        Kili


Index: patches/patch-scribus_plugins_import_pdf_slaoutput_cpp
===================================================================
RCS file: 
/cvs/ports/print/scribus/patches/patch-scribus_plugins_import_pdf_slaoutput_cpp,v
retrieving revision 1.2
diff -u -p -r1.2 patch-scribus_plugins_import_pdf_slaoutput_cpp
--- patches/patch-scribus_plugins_import_pdf_slaoutput_cpp      21 Mar 2020 
19:48:55 -0000      1.2
+++ patches/patch-scribus_plugins_import_pdf_slaoutput_cpp      7 Mar 2021 
17:54:47 -0000
@@ -5,6 +5,8 @@ Fix build with newer poppler, from archl
 
 Fix for poppler-0.86.x from svn r23478.
 
+Fix for poppler-21.03.x from svn r24537 and r24538.
+
 Index: scribus/plugins/import/pdf/slaoutput.cpp
 --- scribus/plugins/import/pdf/slaoutput.cpp.orig
 +++ scribus/plugins/import/pdf/slaoutput.cpp
@@ -321,7 +323,29 @@ Index: scribus/plugins/import/pdf/slaout
  }
  
  void SlaOutputDev::startPage(int pageNum, GfxState *, XRef *)
-@@ -3705,7 +3805,7 @@ QString SlaOutputDev::getAnnotationColor(const AnnotCo
+@@ -2208,8 +2308,11 @@ GBool SlaOutputDev::patchMeshShadedFill(GfxState *stat
+       return gTrue;
+ }
+ 
+-GBool SlaOutputDev::tilingPatternFill(GfxState *state, Gfx * /*gfx*/, Catalog 
*cat, Object *str, POPPLER_CONST_070 double *pmat, int paintType, int 
tilingType, Dict *resDict, POPPLER_CONST_070 double *mat, POPPLER_CONST_070 
double *bbox, int x0, int y0, int x1, int y1, double xStep, double yStep)
++bool SlaOutputDev::tilingPatternFill(GfxState *state, Gfx * /*gfx*/, Catalog 
*cat, GfxTilingPattern *tPat, const double *mat, int x0, int y0, int x1, int 
y1, double xStep, double yStep)
+ {
++      const double *bbox = tPat->getBBox();
++      const double *pmat = tPat->getMatrix();
++      Dict *resDict = tPat->getResDict();
+       PDFRectangle box;
+       Gfx *gfx;
+       QString id;
+@@ -2238,7 +2341,7 @@ GBool SlaOutputDev::tilingPatternFill(GfxState *state,
+ 
+       gfx = new Gfx(pdfDoc, this, resDict, &box, nullptr);
+       inPattern++;
+-      gfx->display(str);
++      gfx->display(tPat->getContentStream());
+       inPattern--;
+       gElements = m_groupStack.pop();
+       m_doc->m_Selection->clear();
+@@ -3705,7 +3808,7 @@ QString SlaOutputDev::getAnnotationColor(const AnnotCo
        return fNam;
  }
  
@@ -330,7 +354,7 @@ Index: scribus/plugins/import/pdf/slaout
  {
        if (! path)
                return QString();
-@@ -3715,7 +3815,7 @@ QString SlaOutputDev::convertPath(GfxPath *path)
+@@ -3715,7 +3818,7 @@ QString SlaOutputDev::convertPath(GfxPath *path)
  
        for (int i = 0; i < path->getNumSubpaths(); ++i)
        {
@@ -339,7 +363,7 @@ Index: scribus/plugins/import/pdf/slaout
                if (subpath->getNumPoints() > 0)
                {
                        output += QString("M %1 
%2").arg(subpath->getX(0)).arg(subpath->getY(0));
-@@ -3917,6 +4017,46 @@ QString SlaOutputDev::UnicodeParsedString(POPPLER_CONS
+@@ -3917,6 +4020,46 @@ QString SlaOutputDev::UnicodeParsedString(POPPLER_CONS
                        u = s1->getChar(i) & 0xff;
                        ++i;
                }
Index: patches/patch-scribus_plugins_import_pdf_slaoutput_h
===================================================================
RCS file: 
/cvs/ports/print/scribus/patches/patch-scribus_plugins_import_pdf_slaoutput_h,v
retrieving revision 1.2
diff -u -p -r1.2 patch-scribus_plugins_import_pdf_slaoutput_h
--- patches/patch-scribus_plugins_import_pdf_slaoutput_h        21 Mar 2020 
19:48:55 -0000      1.2
+++ patches/patch-scribus_plugins_import_pdf_slaoutput_h        7 Mar 2021 
17:54:47 -0000
@@ -2,6 +2,8 @@ $OpenBSD: patch-scribus_plugins_import_p
 
 Fix for poppler-0.86.x from svn r23478.
 
+Fix for poppler-21.03.x from svn r24537 and r24538.
+
 Index: scribus/plugins/import/pdf/slaoutput.h
 --- scribus/plugins/import/pdf/slaoutput.h.orig
 +++ scribus/plugins/import/pdf/slaoutput.h
@@ -27,6 +29,15 @@ Index: scribus/plugins/import/pdf/slaout
        static GBool annotations_callback(Annot *annota, void *user_data);
        bool handleTextAnnot(Annot* annota, double xCoor, double yCoor, double 
width, double height);
        bool handleLinkAnnot(Annot* annota, double xCoor, double yCoor, double 
width, double height);
+@@ -189,7 +195,7 @@ class SlaOutputDev : public OutputDev (public)
+       void stroke(GfxState *state) override;
+       void fill(GfxState *state) override;
+       void eoFill(GfxState *state) override;
+-      GBool tilingPatternFill(GfxState *state, Gfx *gfx, Catalog *cat, Object 
*str, POPPLER_CONST_070 double *pmat, int paintType, int tilingType, Dict 
*resDict, POPPLER_CONST_070 double *mat, POPPLER_CONST_070 double *bbox, int 
x0, int y0, int x1, int y1, double xStep, double yStep) override;
++      bool tilingPatternFill(GfxState *state, Gfx *gfx, Catalog *cat, 
GfxTilingPattern *tPat, const double *mat, int x0, int y0, int x1, int y1, 
double xStep, double yStep) override;
+       GBool functionShadedFill(GfxState * /*state*/, GfxFunctionShading * 
/*shading*/) override { qDebug() << "Function Shaded Fill";  return gFalse; }
+       GBool axialShadedFill(GfxState *state, GfxAxialShading *shading, double 
tMin, double tMax) override;
+       GBool axialShadedSupportExtend(GfxState *state, GfxAxialShading 
*shading)  override { return (shading->getExtend0() == shading->getExtend1()); }
 @@ -229,7 +235,7 @@ class SlaOutputDev : public OutputDev (public)
  
        //----- image drawing

Reply via email to