Hi,

this fixes inkscape with poppler-24.05.0. Tested some weeks ago by
importing some PDFs. To be committed right after the poppler update.

ok?

Ciao,
        Kili

Index: Makefile
===================================================================
RCS file: /cvs/ports/graphics/inkscape/Makefile,v
diff -u -p -r1.110 Makefile
--- Makefile    6 May 2024 12:23:34 -0000       1.110
+++ Makefile    24 May 2024 20:45:48 -0000
@@ -2,7 +2,7 @@ COMMENT =       SVG vector drawing application
 
 VERSION =      1.3.2
 DISTNAME =     inkscape-${VERSION}
-REVISION =     0
+REVISION =     1
 
 CATEGORIES =   graphics
 
Index: patches/patch-CMakeLists_txt
===================================================================
RCS file: /cvs/ports/graphics/inkscape/patches/patch-CMakeLists_txt,v
diff -u -p -r1.4 patch-CMakeLists_txt
--- patches/patch-CMakeLists_txt        23 May 2022 17:43:04 -0000      1.4
+++ patches/patch-CMakeLists_txt        24 May 2024 20:45:48 -0000
@@ -9,6 +9,15 @@ CMake Warning (dev) at /usr/local/share/
 Index: CMakeLists.txt
 --- CMakeLists.txt.orig
 +++ CMakeLists.txt
+@@ -18,7 +18,7 @@ message("Binary Dir: ${CMAKE_CURRENT_BINARY_DIR}")
+ # 
-----------------------------------------------------------------------------
+ # CMake Configuration
+ # 
-----------------------------------------------------------------------------
+-set(CMAKE_CXX_STANDARD 17)
++set(CMAKE_CXX_STANDARD 20)
+ set(CMAKE_CXX_STANDARD_REQUIRED ON)
+ # set(CMAKE_CXX_EXTENSIONS OFF) # enforces -std=c++17 instead of -std=gnu++17
+                                 # TODO: build currently fails with it as we 
actually depend on GNU compiler extensions...
 @@ -65,7 +65,8 @@ if(APPLE)
      SET(CMAKE_MACOSX_RPATH TRUE)
      SET(CMAKE_INSTALL_RPATH 
"@loader_path/${INKSCAPE_INSTALL_LIBDIR_RELATIVE_TO_BINDIR}")
Index: patches/patch-src_extension_internal_pdfinput_poppler-utils_cpp
===================================================================
RCS file: patches/patch-src_extension_internal_pdfinput_poppler-utils_cpp
diff -N patches/patch-src_extension_internal_pdfinput_poppler-utils_cpp
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_extension_internal_pdfinput_poppler-utils_cpp     24 May 
2024 20:45:48 -0000
@@ -0,0 +1,24 @@
+Index: src/extension/internal/pdfinput/poppler-utils.cpp
+--- src/extension/internal/pdfinput/poppler-utils.cpp.orig
++++ src/extension/internal/pdfinput/poppler-utils.cpp
+@@ -16,6 +16,7 @@
+ #include "GfxFont.h"
+ #include "GfxState.h"
+ #include "PDFDoc.h"
++#include "UTF.h"
+ #include "libnrtype/font-factory.h"
+ 
+ /**
+@@ -563,10 +564,10 @@ std::string getDictString(Dict *dict, const char *key)
+  */
+ std::string getString(const GooString *value)
+ {
+-    if (value->hasUnicodeMarker()) {
++    if (hasUnicodeByteOrderMark(value->toStr())) {
+         return g_convert(value->getCString () + 2, value->getLength () - 2,
+                          "UTF-8", "UTF-16BE", NULL, NULL, NULL);
+-    } else if (value->hasUnicodeMarkerLE()) {
++    } else if (hasUnicodeByteOrderMarkLE(value->toStr())) {
+         return g_convert(value->getCString () + 2, value->getLength () - 2,
+                          "UTF-8", "UTF-16LE", NULL, NULL, NULL);
+     }

Reply via email to