Subject: [PATCH 2/5] gnu: lunasvg: Make compatible with plutovg 1.0.0.

From: Nguyễn Gia Phong <[email-masked]>
Date: Thu, 3 Apr 2025 15:38:20 +0900

* gnu/packages/patches/lunasvg-plutovg-1.0.0.patch: New file.
* gnu/packages/cpp.scm (lunasvg): [patches]: Add patch.
* gnu/local.mk (dist_patch_DATA): Register patch.

References: https://github.com/sammycage/lunasvg/commit/472cead775098c16d211d2d018aa4445543da6af
Change-Id: Ice3d36a312b1b0f57c1f41841fddfc65b9d83593
---
The dependency bump takes place right after the packaged release
without any change to the callers.

 gnu/local.mk                                  |  1 +
 gnu/packages/cpp.scm                          |  3 +-
 .../patches/lunasvg-plutovg-1.0.0.patch       | 31 +++++++++++++++++++
 3 files changed, 34 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/lunasvg-plutovg-1.0.0.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index f0b0a9593f59..31f37bfcb866 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1823,6 +1823,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/lua-5.4-liblua-so.patch			\
   %D%/packages/patches/lugaru-fix-sound.patch			\
   %D%/packages/patches/luit-posix.patch				\
+  %D%/packages/patches/lunasvg-plutovg-1.0.0.patch		\
   %D%/packages/patches/lxc-no-static-bin.patch	\
   %D%/packages/patches/mactelnet-remove-init.patch		\
   %D%/packages/patches/mailutils-variable-lookup.patch		\
diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index 86d60f3a9baa..ba1eeb64a90f 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -561,7 +561,8 @@ (define-public lunasvg
              (commit (string-append "v" version))))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "14ppk3k6sdbf3lwhv2gjqy32vwa7ck9jcj9xfk0fxwfqbvbp6608"))))
+        (base32 "14ppk3k6sdbf3lwhv2gjqy32vwa7ck9jcj9xfk0fxwfqbvbp6608"))
+       (patches (search-patches "lunasvg-plutovg-1.0.0.patch"))))
     (build-system cmake-build-system)
     (inputs (list plutovg))
     (arguments
diff --git a/gnu/packages/patches/lunasvg-plutovg-1.0.0.patch b/gnu/packages/patches/lunasvg-plutovg-1.0.0.patch
new file mode 100644
index 000000000000..e8c3ae2e43c2
--- /dev/null
+++ b/gnu/packages/patches/lunasvg-plutovg-1.0.0.patch
@@ -0,0 +1,31 @@
+commit 472cead775098c16d211d2d018aa4445543da6af
+Author: Samuel Ugochukwu <[email-masked]>
+Date:   2025-03-17 09:43:58 +0100
+
+    Bump plutovg version to 1.0.0
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 08cee283b43f..b72d704667d7 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -6,7 +6,7 @@ set(LUNASVG_VERSION_MICRO 1)
+ 
+ project(lunasvg LANGUAGES CXX VERSION ${LUNASVG_VERSION_MAJOR}.${LUNASVG_VERSION_MINOR}.${LUNASVG_VERSION_MICRO})
+ 
+-find_package(plutovg 0.0.4 QUIET)
++find_package(plutovg 1.0.0 QUIET)
+ if(NOT plutovg_FOUND)
+     add_subdirectory(plutovg)
+ endif()
+diff --git a/meson.build b/meson.build
+index a243219f9059..d6707d541024 100644
+--- a/meson.build
++++ b/meson.build
+@@ -7,7 +7,7 @@ project('lunasvg', 'cpp',
+ 
+ plutovg_dep = dependency('plutovg',
+     required: true,
+-    version: '>=0.0.4',
++    version: '>=1.0.0',
+     fallback: ['plutovg', 'plutovg_dep']
+ )
-- 
2.49.0