app-office/dia: fix build with poppler-25.11

Closes: https://bugs.gentoo.org/965768
Signed-off-by: Nicolas PARLANT <nicolas.parlant@parhuet.fr>
Part-of: https://github.com/gentoo/gentoo/pull/44524
Closes: https://github.com/gentoo/gentoo/pull/44524
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Nicolas PARLANT 2025-11-07 14:55:38 +01:00 committed by Sam James
parent 3e439610e8
commit bdc2e1a66c
No known key found for this signature in database
GPG Key ID: 738409F520DF9190
2 changed files with 19 additions and 0 deletions

View File

@ -53,6 +53,7 @@ PATCHES=(
"${WORKDIR}"/dia-0.98-patches/${PN}-0.98-revert_xpm_replacement.patch
"${WORKDIR}"/dia-0.98-patches/${PN}-0.98-use_gtkfontbutton.patch
"${WORKDIR}"/dia-0.98-patches/${PN}-0.98-deps_optional.patch
"${FILESDIR}"/${PN}-0.98-fix_poppler_2510.patch #965768
)
pkg_setup() {

View File

@ -0,0 +1,18 @@
fix compile with >=poppler-25.10
see https://bugs.gentoo.org/965768
reported https://gitlab.gnome.org/GNOME/dia/-/issues/572
--- a/plug-ins/pdf/pdf-import.cpp
+++ b/plug-ins/pdf/pdf-import.cpp
@@ -776,7 +776,11 @@ void
DiaOutputDev::drawString(GfxState *state, GooString *s)
{
Color text_color = this->fill_color;
- int len = s->getLength();
+#if POPPLER_VERSION_MAJOR > 25 || (POPPLER_VERSION_MAJOR == 25 && POPPLER_VERSION_MINOR >= 10)
+ int len = s->size();
+#else
+ int len = s->getLength();
+#endif
DiaObject *obj;
gchar *utf8 = NULL;
DiaFont *font;