Submitted by:            Douglas R. Reno <renodr at linuxfromscratch dot org>
Date:                    2026-05-12
Initial Package Version: 1.4.4
Upstream Status:         Pending
Origin:                  Upstream (PR #7919)
Description:             Fixes building Inkscape 1.4.4 with poppler 26.05 and
                         later because of a return type change when calling
                         gfx8bit->getEncoding().

diff -Naurp inkscape-1.4.4_2026-05-05_dcaf3e7d9e.orig/src/extension/internal/pdfinput/poppler-cairo-font-engine.cpp inkscape-1.4.4_2026-05-05_dcaf3e7d9e/src/extension/internal/pdfinput/poppler-cairo-font-engine.cpp
--- inkscape-1.4.4_2026-05-05_dcaf3e7d9e.orig/src/extension/internal/pdfinput/poppler-cairo-font-engine.cpp	2025-12-12 18:49:29.000000000 -0600
+++ inkscape-1.4.4_2026-05-05_dcaf3e7d9e/src/extension/internal/pdfinput/poppler-cairo-font-engine.cpp	2026-05-12 17:35:23.537593511 -0500
@@ -313,7 +313,11 @@ CairoFreeTypeFont *CairoFreeTypeFont::cr
 #else
     GfxFontLoc *fontLoc;
 #endif
+#if POPPLER_CHECK_VERSION(26, 5, 0)
+    const char * const *enc;
+#else
     char **enc;
+#endif
     const char *name;
 #if POPPLER_CHECK_VERSION(25, 7, 0)
     std::unique_ptr<FoFiType1C> ff1c;
@@ -385,7 +389,11 @@ CairoFreeTypeFont *CairoFreeTypeFont::cr
                 goto err2;
             }
 
+#if POPPLER_CHECK_VERSION(26, 5, 0)
+            enc = gfx8bit->getEncoding().data();
+#else
             enc = gfx8bit->getEncoding();
+#endif
 
             codeToGID.resize(256);
             for (i = 0; i < 256; ++i) {
@@ -677,7 +685,7 @@ CairoType3Font *CairoType3Font::create(G
 #endif
 
     std::vector<int> codeToGID;
-    char *name;
+    const char *name;
 
     Dict *charProcs = gfx8bit->getCharProcs();
     Ref ref = *gfxFont->getID();
@@ -694,7 +702,11 @@ CairoType3Font *CairoType3Font::create(G
 
     cairo_font_face_set_user_data(font_face, &type3_font_key, (void *)info, _free_type3_font_info);
 
+#if POPPLER_CHECK_VERSION(26, 5, 0)
+    const char * const *enc = gfx8bit->getEncoding().data();
+#else
     char **enc = gfx8bit->getEncoding();
+#endif
     codeToGID.resize(256);
     for (int i = 0; i < 256; ++i) {
         codeToGID[i] = 0;
