diff --git a/contrib/inkscape/patches/cpp20.patch b/contrib/inkscape/patches/cpp20.patch new file mode 100644 index 0000000000..ebb1a6a3c8 --- /dev/null +++ b/contrib/inkscape/patches/cpp20.patch @@ -0,0 +1,13 @@ +needed for string starts_with in poppler +-- +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -18,7 +18,7 @@ + # ----------------------------------------------------------------------------- + # 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... diff --git a/contrib/inkscape/patches/nodist-2geom.patch b/contrib/inkscape/patches/nodist-2geom.patch deleted file mode 100644 index eb53998bf6..0000000000 --- a/contrib/inkscape/patches/nodist-2geom.patch +++ /dev/null @@ -1,14 +0,0 @@ -we currently use the bundled 2geom instead of a system copy, so don't install -the actual library dev files --- ---- a/src/3rdparty/CMakeLists.txt -+++ b/src/3rdparty/CMakeLists.txt -@@ -6,7 +6,7 @@ - - if(WITH_INTERNAL_2GEOM) - set(2GEOM_BUILD_SHARED ${BUILD_SHARED_LIBS} CACHE BOOL "") -- add_subdirectory(2geom) -+ add_subdirectory(2geom EXCLUDE_FROM_ALL) - endif() - - if(WITH_INTERNAL_CAIRO) diff --git a/contrib/inkscape/patches/poppler-24.05.patch b/contrib/inkscape/patches/poppler-24.05.patch new file mode 100644 index 0000000000..9467c796b2 --- /dev/null +++ b/contrib/inkscape/patches/poppler-24.05.patch @@ -0,0 +1,66 @@ +Patch-Source: https://gitlab.com/inkscape/inkscape/-/merge_requests/6403 +-- +From 96ca7a6c215aa14336b52753f56244dc8796ec43 Mon Sep 17 00:00:00 2001 +From: Heiko Becker +Date: Fri, 3 May 2024 14:52:00 +0200 +Subject: [PATCH] Fix build with poppler >= 24.05.0 + +GooString::hasUnicodeMarkerLE and GooString::hasUnicodeMarker were +rename and moved to UTF.h [1][2] + +[1] https://gitlab.freedesktop.org/poppler/poppler/-/commit/98fabb298b0e8eaef9193bbce68c99c85473a314 +[2] https://gitlab.freedesktop.org/poppler/poppler/-/commit/1f06dca08c32ed18c3030530d98a0e30d41dd7a2 +--- + src/extension/internal/pdfinput/poppler-transition-api.h | 9 +++++++++ + src/extension/internal/pdfinput/poppler-utils.cpp | 6 ++++-- + 2 files changed, 13 insertions(+), 2 deletions(-) + +diff --git a/src/extension/internal/pdfinput/poppler-transition-api.h b/src/extension/internal/pdfinput/poppler-transition-api.h +index 58aa1ec921d..481aefadf46 100644 +--- a/src/extension/internal/pdfinput/poppler-transition-api.h ++++ b/src/extension/internal/pdfinput/poppler-transition-api.h +@@ -13,6 +13,15 @@ + #define SEEN_POPPLER_TRANSITION_API_H + + #include ++#include ++ ++#if POPPLER_CHECK_VERSION(24, 5, 0) ++#define _POPPLER_HAS_UNICODE_BOM(value) (hasUnicodeByteOrderMark(value->toStr())) ++#define _POPPLER_HAS_UNICODE_BOMLE(value) (hasUnicodeByteOrderMarkLE(value->toStr())) ++#else ++#define _POPPLER_HAS_UNICODE_BOM(value) (value->hasUnicodeMarker()) ++#define _POPPLER_HAS_UNICODE_BOMLE(value) (value->hasUnicodeMarkerLE()) ++#endif + + #if POPPLER_CHECK_VERSION(24, 3, 0) + #define _POPPLER_FUNCTION_TYPE_SAMPLED Function::Type::Sampled +diff --git a/src/extension/internal/pdfinput/poppler-utils.cpp b/src/extension/internal/pdfinput/poppler-utils.cpp +index 78d90c66c9d..c02815f64b9 100644 +--- a/src/extension/internal/pdfinput/poppler-utils.cpp ++++ b/src/extension/internal/pdfinput/poppler-utils.cpp +@@ -12,6 +12,8 @@ + + #include "poppler-utils.h" + ++#include ++ + #include "2geom/affine.h" + #include "GfxFont.h" + #include "GfxState.h" +@@ -563,10 +565,10 @@ std::string getDictString(Dict *dict, const char *key) + */ + std::string getString(const GooString *value) + { +- if (value->hasUnicodeMarker()) { ++ if (_POPPLER_HAS_UNICODE_BOM(value)) { + return g_convert(value->getCString () + 2, value->getLength () - 2, + "UTF-8", "UTF-16BE", NULL, NULL, NULL); +- } else if (value->hasUnicodeMarkerLE()) { ++ } else if (_POPPLER_HAS_UNICODE_BOMLE(value)) { + return g_convert(value->getCString () + 2, value->getLength () - 2, + "UTF-8", "UTF-16LE", NULL, NULL, NULL); + } +-- +GitLab + diff --git a/contrib/inkscape/template.py b/contrib/inkscape/template.py index bea698f473..07965d6397 100644 --- a/contrib/inkscape/template.py +++ b/contrib/inkscape/template.py @@ -1,11 +1,12 @@ pkgname = "inkscape" pkgver = "1.3.2" -pkgrel = 5 +pkgrel = 6 build_style = "cmake" configure_args = [ - "-D2GEOM_BUILD_SHARED=OFF", "-DBUILD_SHARED_LIBS=ON", "-DBUILD_TESTING=OFF", + "-DWITH_INTERNAL_2GEOM=OFF", + "-DWITH_INTERNAL_CAIRO=OFF", ] hostmakedepends = [ "cmake", @@ -15,7 +16,6 @@ "perl", "pkgconf", ] -# TODO: package lib2geom separately makedepends = [ "boost-devel", "double-conversion-devel", @@ -26,6 +26,7 @@ "gtk+3-devel", "gtkmm3.0-devel", "lcms2-devel", + "lib2geom-devel", "libcdr-devel", "libedit-readline-devel", "libjpeg-turbo-devel",