From bdc2e1a66c748d7f05e2b14a0f20bc4899968a98 Mon Sep 17 00:00:00 2001 From: Nicolas PARLANT Date: Fri, 7 Nov 2025 14:55:38 +0100 Subject: [PATCH] app-office/dia: fix build with poppler-25.11 Closes: https://bugs.gentoo.org/965768 Signed-off-by: Nicolas PARLANT Part-of: https://github.com/gentoo/gentoo/pull/44524 Closes: https://github.com/gentoo/gentoo/pull/44524 Signed-off-by: Sam James --- app-office/dia/dia-0.98_pre20250913.ebuild | 1 + .../dia/files/dia-0.98-fix_poppler_2510.patch | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 app-office/dia/files/dia-0.98-fix_poppler_2510.patch diff --git a/app-office/dia/dia-0.98_pre20250913.ebuild b/app-office/dia/dia-0.98_pre20250913.ebuild index 0b77d26b9249..247d49809994 100644 --- a/app-office/dia/dia-0.98_pre20250913.ebuild +++ b/app-office/dia/dia-0.98_pre20250913.ebuild @@ -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() { diff --git a/app-office/dia/files/dia-0.98-fix_poppler_2510.patch b/app-office/dia/files/dia-0.98-fix_poppler_2510.patch new file mode 100644 index 000000000000..fa521d371759 --- /dev/null +++ b/app-office/dia/files/dia-0.98-fix_poppler_2510.patch @@ -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;