Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 02 May 2026 12:33:09 +0000
From:      Gleb Popov <arrowd@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: b9ae6cf162f4 - main - editors/calligra: Fix build against newest Poppler
Message-ID:  <69f5ef05.37a68.2f0db8dd@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by arrowd:

URL: https://cgit.FreeBSD.org/ports/commit/?id=b9ae6cf162f48457dab7e272f8c5686726a9635a

commit b9ae6cf162f48457dab7e272f8c5686726a9635a
Author:     Gleb Popov <arrowd@FreeBSD.org>
AuthorDate: 2026-04-17 10:38:16 +0000
Commit:     Gleb Popov <arrowd@FreeBSD.org>
CommitDate: 2026-05-02 12:32:32 +0000

    editors/calligra: Fix build against newest Poppler
    
    Differential Revision:  https://reviews.freebsd.org/D56472
---
 .../patch-filters_karbon_pdf_SvgOutputDev.cpp      | 44 ++++++++++++++++++++++
 .../files/patch-filters_karbon_pdf_SvgOutputDev.h  | 14 +++++++
 2 files changed, 58 insertions(+)

diff --git a/editors/calligra/files/patch-filters_karbon_pdf_SvgOutputDev.cpp b/editors/calligra/files/patch-filters_karbon_pdf_SvgOutputDev.cpp
new file mode 100644
index 000000000000..973e62742bc2
--- /dev/null
+++ b/editors/calligra/files/patch-filters_karbon_pdf_SvgOutputDev.cpp
@@ -0,0 +1,44 @@
+--- filters/karbon/pdf/SvgOutputDev.cpp.orig	2026-04-09 04:19:06 UTC
++++ filters/karbon/pdf/SvgOutputDev.cpp
+@@ -386,7 +386,11 @@ QString SvgOutputDev::printStroke()
+     return stroke;
+ }
+ 
++#if POPPLER_VERSION_MACRO < QT_VERSION_CHECK(26, 4, 0)
+ void SvgOutputDev::drawString(GfxState *state, const GooString *s)
++#else
++void SvgOutputDev::drawString(GfxState *state, const std::string &s)
++#endif
+ {
+     int render = state->getRender();
+     // check for invisible text -- this is used by Acrobat Capture
+@@ -397,8 +401,10 @@ void SvgOutputDev::drawString(GfxState *state, const G
+     // ignore empty strings
+ #if POPPLER_VERSION_MACRO < QT_VERSION_CHECK(25, 10, 0)
+     if (s->getLength() == 0) {
+-#else
++#elif POPPLER_VERSION_MACRO < QT_VERSION_CHECK(26, 4, 0)
+     if (s->size() == 0) {
++#else
++    if (s.empty()) {
+ #endif
+         return;
+     }
+@@ -407,11 +413,15 @@ void SvgOutputDev::drawString(GfxState *state, const G
+ 
+     QString str;
+ 
+-    const char *p = s->c_str();
+ #if POPPLER_VERSION_MACRO < QT_VERSION_CHECK(25, 10, 0)
++    const char *p = s->c_str();
+     int len = s->getLength();
+-#else
++#elif POPPLER_VERSION_MACRO < QT_VERSION_CHECK(26, 4, 0)
++    const char *p = s->c_str();
+     int len = s->size();
++#else
++    const char *p = s.c_str();
++    int len = s.size();
+ #endif
+     CharCode code;
+     const Unicode *u = nullptr;
diff --git a/editors/calligra/files/patch-filters_karbon_pdf_SvgOutputDev.h b/editors/calligra/files/patch-filters_karbon_pdf_SvgOutputDev.h
new file mode 100644
index 000000000000..49b3fdbfae3f
--- /dev/null
+++ b/editors/calligra/files/patch-filters_karbon_pdf_SvgOutputDev.h
@@ -0,0 +1,14 @@
+--- filters/karbon/pdf/SvgOutputDev.h.orig	2026-04-09 04:19:06 UTC
++++ filters/karbon/pdf/SvgOutputDev.h
+@@ -44,7 +44,11 @@ class SvgOutputDev : public OutputDev (public)
+     void eoFill(GfxState *state) override;
+ 
+     // text
++#if POPPLER_VERSION_MACRO < QT_VERSION_CHECK(26, 4, 0)
+     void drawString(GfxState *state, const GooString *s) override;
++#else
++    void drawString(GfxState *state, const std::string &s) override;
++#endif
+ 
+     // images
+     void drawImage(GfxState *state,


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69f5ef05.37a68.2f0db8dd>