GNU bug report logs - #76757
[PATCH 0/5] gnu: Add sdl3-{image,ttf}.

Previous Next

Package: guix-patches;

Reported by: Nguyễn Gia Phong <mcsinyx <at> disroot.org>

Date: Wed, 5 Mar 2025 08:42:02 UTC

Severity: normal

Tags: moreinfo, patch

Done: Nguyễn Gia Phong <mcsinyx <at> disroot.org>

To reply to this bug, email your comments to 76757 AT debbugs.gnu.org.
There is no need to reopen the bug first.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#76757; Package guix-patches. (Wed, 05 Mar 2025 08:42:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Nguyễn Gia Phong <mcsinyx <at> disroot.org>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Wed, 05 Mar 2025 08:42:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Nguyễn Gia Phong <mcsinyx <at> disroot.org>
To: guix-patches <at> gnu.org
Cc: Nguyễn Gia Phong <mcsinyx <at> disroot.org>
Subject: [PATCH 0/5] gnu: Add sdl3-{image,ttf}.
Date: Wed,  5 Mar 2025 17:39:53 +0900
Latest release of SDL3_{image,ttf} wants the latest version of SDL3,
hence it is updated to 3.2.6.

PlutoVG is a dependency of PlutoSVG,
which is used by SDL3_ttf for color emoji rendering.

Nguyễn Gia Phong (5):
  gnu: sdl3: Update to 3.2.6.
  gnu: Add sdl3-image.
  gnu: Add plutovg.
  gnu: Add plutosvg.
  gnu: Add sdl3-ttf.

 gnu/local.mk                                  |  2 +
 gnu/packages/image.scm                        | 52 +++++++++++++++++++
 .../patches/plutosvg-unbundle-plutovg.patch   | 13 +++++
 .../patches/plutovg-unbundle-stb.patch        | 31 +++++++++++
 gnu/packages/sdl.scm                          | 46 +++++++++++++++-
 5 files changed, 142 insertions(+), 2 deletions(-)
 create mode 100644 gnu/packages/patches/plutosvg-unbundle-plutovg.patch
 create mode 100644 gnu/packages/patches/plutovg-unbundle-stb.patch


base-commit: 7b33214d80e3e07421626449415e14bf120d93c9
-- 
2.48.1





Information forwarded to guix-patches <at> gnu.org:
bug#76757; Package guix-patches. (Wed, 05 Mar 2025 08:45:01 GMT) Full text and rfc822 format available.

Message #8 received at 76757 <at> debbugs.gnu.org (full text, mbox):

From: Nguyễn Gia Phong <mcsinyx <at> disroot.org>
To: 76757 <at> debbugs.gnu.org
Cc: Nguyễn Gia Phong <mcsinyx <at> disroot.org>
Subject: [PATCH 1/5] gnu: sdl3: Update to 3.2.6.
Date: Wed,  5 Mar 2025 17:44:04 +0900
* gnu/packages/sdl.scm (sdl3): Update to 3.2.6.

Change-Id: I67b570738826979953d4ea5b975211b9e635875a
---
 gnu/packages/sdl.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/sdl.scm b/gnu/packages/sdl.scm
index 42fcf35d40fe..f6ada6ab1bba 100644
--- a/gnu/packages/sdl.scm
+++ b/gnu/packages/sdl.scm
@@ -151,7 +151,7 @@ (define-public sdl3
   (package
     (inherit sdl2)
     (name "sdl3")
-    (version "3.2.0")
+    (version "3.2.6")
     (source (origin
               (method git-fetch)
               (uri (git-reference
@@ -160,7 +160,7 @@ (define-public sdl3
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "11hrhvf74in0amdrmhcf11ll48pxqbidyqawr9hx2cgdwlzdjll1"))))
+                "0q8fz2qnsjd41dcsd29awx856y9v9ilran9cdfcfg6m7hwjgyhj8"))))
     (build-system cmake-build-system)
     (arguments
      (list
-- 
2.48.1





Information forwarded to guix-patches <at> gnu.org:
bug#76757; Package guix-patches. (Wed, 05 Mar 2025 08:46:03 GMT) Full text and rfc822 format available.

Message #11 received at 76757 <at> debbugs.gnu.org (full text, mbox):

From: Nguyễn Gia Phong <mcsinyx <at> disroot.org>
To: 76757 <at> debbugs.gnu.org
Cc: Nguyễn Gia Phong <mcsinyx <at> disroot.org>
Subject: [PATCH 2/5] gnu: Add sdl3-image.
Date: Wed,  5 Mar 2025 17:44:05 +0900
* gnu/packages/sdl.scm (sdl3-image): New variable.

Change-Id: I744f515aa7b4c814db86d21209ea31666b19ef3f
---
 gnu/packages/sdl.scm | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/gnu/packages/sdl.scm b/gnu/packages/sdl.scm
index f6ada6ab1bba..ceede7133c80 100644
--- a/gnu/packages/sdl.scm
+++ b/gnu/packages/sdl.scm
@@ -17,6 +17,7 @@
 ;;; Copyright © 2023 Evgeny Pisemsky <mail <at> pisemsky.site>
 ;;; Copyright © 2023, 2024 dan <i <at> dan.games>
 ;;; Copyright © 2025 Zheng Junjie <873216071 <at> qq.com>
+;;; Copyright © 2025 Nguyễn Gia Phong <mcsinyx <at> disroot.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -667,6 +668,27 @@ (define-public sdl2-gamecontrollerdb
 mappings intended for the use with SDL2's game controller functionality.")
       (license license:zlib))))
 
+(define-public sdl3-image
+  (package (inherit sdl2-image)
+    (name "sdl3-image")
+    (version "3.2.4")
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        (string-append "https://www.libsdl.org/projects/SDL_image/release/"
+                       "SDL3_image-" version ".tar.gz"))
+       (sha256
+        (base32 "10n1rxyswchd8vppalh2bl3ah5fww5chd5cdvnhds7r60invs9d7"))))
+    (build-system cmake-build-system)
+    (arguments '(#:configure-flags '("-DSDLIMAGE_AVIF_SHARED=OFF"
+                                     "-DSDLIMAGE_TIF_SHARED=OFF"
+                                     "-DSDLIMAGE_WEBP_SHARED=OFF"
+                                     "-DSDLIMAGE_TESTS=ON")))
+    (propagated-inputs
+     (list sdl3 libavif libjpeg-turbo libpng libtiff libwebp))
+    (properties '((upstream-name . "SDL3_image")))))
+
 (define-public guile-sdl
   (package
     (name "guile-sdl")
-- 
2.48.1





Information forwarded to guix-patches <at> gnu.org:
bug#76757; Package guix-patches. (Wed, 05 Mar 2025 08:46:03 GMT) Full text and rfc822 format available.

Message #14 received at 76757 <at> debbugs.gnu.org (full text, mbox):

From: Nguyễn Gia Phong <mcsinyx <at> disroot.org>
To: 76757 <at> debbugs.gnu.org
Cc: Nguyễn Gia Phong <mcsinyx <at> disroot.org>
Subject: [PATCH 3/5] gnu: Add plutovg.
Date: Wed,  5 Mar 2025 17:44:06 +0900
* gnu/packages/image.scm (plutovg): New variable.
* gnu/packages/patches/plutovg-unbundle-stb.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register patch.

Change-Id: I5b4be1c85c9ceb3ca991cf336b808367c9f832eb
---
 gnu/local.mk                                  |  1 +
 gnu/packages/image.scm                        | 26 ++++++++++++++++
 .../patches/plutovg-unbundle-stb.patch        | 31 +++++++++++++++++++
 3 files changed, 58 insertions(+)
 create mode 100644 gnu/packages/patches/plutovg-unbundle-stb.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index a7a3238669d2..a8c3631ada0a 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1991,6 +1991,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/plasma-framework-fix-KF5PlasmaMacros.cmake.patch \
   %D%/packages/patches/plasp-fix-normalization.patch \
   %D%/packages/patches/plasp-include-iostream.patch \
+  %D%/packages/patches/plutovg-unbundle-stb.patch		\
   %D%/packages/patches/pocketfft-cpp-prefer-preprocessor-if.patch			\
   %D%/packages/patches/pokerth-boost.patch			\
   %D%/packages/patches/ppsspp-disable-upgrade-and-gold.patch		\
diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
index 5d294176277e..12c9eb01bc07 100644
--- a/gnu/packages/image.scm
+++ b/gnu/packages/image.scm
@@ -39,6 +39,7 @@
 ;;; Copyright © 2023-2024 Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
 ;;; Copyright © 2023, 2025 Artyom V. Poptsov <poptsov.artyom <at> gmail.com>
 ;;; Copyright © 2024 chris <chris <at> bumblehead.com>
+;;; Copyright © 2025 Nguyễn Gia Phong <mcsinyx <at> disroot.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -96,6 +97,7 @@ (define-module (gnu packages image)
   #:use-module (gnu packages qt)
   #:use-module (gnu packages ragel)
   #:use-module (gnu packages sphinx)
+  #:use-module (gnu packages stb)
   #:use-module (gnu packages swig)
   #:use-module (gnu packages textutils)
   #:use-module (gnu packages video)
@@ -2849,6 +2851,30 @@ (define-public phockup
 @file{unknown}.")
     (license license:expat)))
 
+(define-public plutovg
+  (package
+    (name "plutovg")
+    (version "0.0.13")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/sammycage/plutovg")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256 (base32 "0y2w0qhs89bnh440z1xj65vg4c71rlwinxgs3p8bvh2fmbi7lqff"))
+       (patches (search-patches "plutovg-unbundle-stb.patch"))
+       (snippet '(begin
+                   (delete-file "source/plutovg-stb-image.h")
+                   (delete-file "source/plutovg-stb-image-write.h")
+                   (delete-file "source/plutovg-stb-truetype.h")))))
+    (build-system meson-build-system)
+    (inputs (list stb-image stb-image-write stb-truetype))
+    (home-page "https://github.com/sammycage/plutovg")
+    (synopsis "Tiny 2D vector graphics library in C")
+    (description "PlutoVG is a standalone 2D vector graphics library in C.")
+    (license license:expat)))
+
 (define-public spng
   (package
    (name "spng")
diff --git a/gnu/packages/patches/plutovg-unbundle-stb.patch b/gnu/packages/patches/plutovg-unbundle-stb.patch
new file mode 100644
index 000000000000..13ea69c76bed
--- /dev/null
+++ b/gnu/packages/patches/plutovg-unbundle-stb.patch
@@ -0,0 +1,31 @@
+diff --git a/source/plutovg-font.c b/source/plutovg-font.c
+index 2e67033cb4b3..7d2dc4b7bdec 100644
+--- a/source/plutovg-font.c
++++ b/source/plutovg-font.c
+@@ -6,7 +6,7 @@
+ 
+ #define STBTT_STATIC
+ #define STB_TRUETYPE_IMPLEMENTATION
+-#include "plutovg-stb-truetype.h"
++#include "stb_truetype.h"
+ 
+ static int plutovg_text_iterator_length(const void* data, int length, plutovg_text_encoding_t encoding)
+ {
+diff --git a/source/plutovg-surface.c b/source/plutovg-surface.c
+index 79263cec4d66..cc2cb524b57a 100644
+--- a/source/plutovg-surface.c
++++ b/source/plutovg-surface.c
+@@ -3,11 +3,11 @@
+ 
+ #define STB_IMAGE_WRITE_STATIC
+ #define STB_IMAGE_WRITE_IMPLEMENTATION
+-#include "plutovg-stb-image-write.h"
++#include "stb_image_write.h"
+ 
+ #define STB_IMAGE_STATIC
+ #define STB_IMAGE_IMPLEMENTATION
+-#include "plutovg-stb-image.h"
++#include "stb_image.h"
+ 
+ static plutovg_surface_t* plutovg_surface_create_uninitialized(int width, int height)
+ {
-- 
2.48.1





Information forwarded to guix-patches <at> gnu.org:
bug#76757; Package guix-patches. (Wed, 05 Mar 2025 08:48:01 GMT) Full text and rfc822 format available.

Message #17 received at 76757 <at> debbugs.gnu.org (full text, mbox):

From: Nguyễn Gia Phong <mcsinyx <at> disroot.org>
To: 76757 <at> debbugs.gnu.org
Cc: Nguyễn Gia Phong <mcsinyx <at> disroot.org>
Subject: [PATCH 4/5] gnu: Add plutosvg.
Date: Wed,  5 Mar 2025 17:44:07 +0900
* gnu/packages/image.scm (plutosvg): New variable.
* gnu/packages/patches/plutosvg-unbundle-plutovg.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register patch.

Change-Id: Idd65e613df38fece4e742af06661ba1ee74ac6a2
---
 gnu/local.mk                                  |  1 +
 gnu/packages/image.scm                        | 26 +++++++++++++++++++
 .../patches/plutosvg-unbundle-plutovg.patch   | 13 ++++++++++
 3 files changed, 40 insertions(+)
 create mode 100644 gnu/packages/patches/plutosvg-unbundle-plutovg.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index a8c3631ada0a..b36324bee9fb 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1991,6 +1991,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/plasma-framework-fix-KF5PlasmaMacros.cmake.patch \
   %D%/packages/patches/plasp-fix-normalization.patch \
   %D%/packages/patches/plasp-include-iostream.patch \
+  %D%/packages/patches/plutosvg-unbundle-plutovg.patch		\
   %D%/packages/patches/plutovg-unbundle-stb.patch		\
   %D%/packages/patches/pocketfft-cpp-prefer-preprocessor-if.patch			\
   %D%/packages/patches/pokerth-boost.patch			\
diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
index 12c9eb01bc07..d8aa3f53dc9e 100644
--- a/gnu/packages/image.scm
+++ b/gnu/packages/image.scm
@@ -2875,6 +2875,32 @@ (define-public plutovg
     (description "PlutoVG is a standalone 2D vector graphics library in C.")
     (license license:expat)))
 
+(define-public plutosvg
+  (package
+    (name "plutosvg")
+    (version "0.0.6")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/sammycage/plutosvg")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256 (base32 "16r6m36p1ji02gaan5i79c83nyznydw09q8blhyr9q8g7ra4g706"))
+       (patches (search-patches "plutosvg-unbundle-plutovg.patch"))))
+    (build-system meson-build-system)
+    (native-inputs (list pkg-config))
+    ;; plutosvg/plutosvg.h includes plutovg/plutovg.h
+    (propagated-inputs (list plutovg))
+    (home-page "https://github.com/sammycage/plutosvg")
+    (synopsis "Tiny SVG rendering library in C")
+    (description "PlutoSVG is a compact and efficient SVG rendering library
+written in C.  It is specifically designed for parsing and rendering
+SVG documents embedded in OpenType fonts, providing an optimal balance
+between speed and minimal memory usage.  It is also suitable
+for rendering scalable icons.")
+    (license license:expat)))
+
 (define-public spng
   (package
    (name "spng")
diff --git a/gnu/packages/patches/plutosvg-unbundle-plutovg.patch b/gnu/packages/patches/plutosvg-unbundle-plutovg.patch
new file mode 100644
index 000000000000..bcdbd83b7321
--- /dev/null
+++ b/gnu/packages/patches/plutosvg-unbundle-plutovg.patch
@@ -0,0 +1,13 @@
+diff --git a/source/plutosvg.h b/source/plutosvg.h
+index 03a79b542b7c..064ef70b6bf3 100644
+--- a/source/plutosvg.h
++++ b/source/plutosvg.h
+@@ -23,7 +23,7 @@
+ #ifndef PLUTOSVG_H
+ #define PLUTOSVG_H
+ 
+-#include <plutovg.h>
++#include <plutovg/plutovg.h>
+ 
+ #if !defined(PLUTOSVG_BUILD_STATIC) && (defined(_WIN32) || defined(__CYGWIN__))
+ #define PLUTOSVG_EXPORT __declspec(dllexport)
-- 
2.48.1





Information forwarded to guix-patches <at> gnu.org:
bug#76757; Package guix-patches. (Wed, 05 Mar 2025 08:49:02 GMT) Full text and rfc822 format available.

Message #20 received at 76757 <at> debbugs.gnu.org (full text, mbox):

From: Nguyễn Gia Phong <mcsinyx <at> disroot.org>
To: 76757 <at> debbugs.gnu.org
Cc: Nguyễn Gia Phong <mcsinyx <at> disroot.org>
Subject: [PATCH 5/5] gnu: Add sdl3-ttf.
Date: Wed,  5 Mar 2025 17:44:08 +0900
* gnu/packages/sdl.scm (sdl3-ttf): New variable.

Change-Id: Ic0597ad96c75a4fa720a888b1f3eea84db6c368c
---
 gnu/packages/sdl.scm | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/gnu/packages/sdl.scm b/gnu/packages/sdl.scm
index ceede7133c80..1b1ce0cbd29d 100644
--- a/gnu/packages/sdl.scm
+++ b/gnu/packages/sdl.scm
@@ -689,6 +689,26 @@ (define-public sdl3-image
      (list sdl3 libavif libjpeg-turbo libpng libtiff libwebp))
     (properties '((upstream-name . "SDL3_image")))))
 
+(define-public sdl3-ttf
+  (package (inherit sdl2-ttf)
+    (name "sdl3-ttf")
+    (version "3.2.0")
+    (source (origin
+             (method url-fetch)
+             (uri
+              (string-append "https://www.libsdl.org/projects/SDL_ttf/release/"
+                             "SDL3_ttf-" version ".tar.gz"))
+             (sha256
+              (base32
+               "0qpb08qh9f9fazhlj2gh1ni0j53cqhfcn0nlb3vdzmn7nzpisx4s"))))
+    (build-system cmake-build-system)
+    (arguments '(#:configure-flags '()
+                 #:tests? #f))          ;no check target
+    (propagated-inputs (list sdl3))
+    (inputs (list freetype harfbuzz plutosvg))
+    (native-inputs '())
+    (properties '((upstream-name . "SDL3_ttf")))))
+
 (define-public guile-sdl
   (package
     (name "guile-sdl")
-- 
2.48.1





Information forwarded to guix-patches <at> gnu.org:
bug#76757; Package guix-patches. (Wed, 02 Apr 2025 06:48:02 GMT) Full text and rfc822 format available.

Message #23 received at 76757 <at> debbugs.gnu.org (full text, mbox):

From: Z572 <zhengjunjie <at> iscas.ac.cn>
To: guix-patches--- via <guix-patches <at> gnu.org>
Cc: Nguyễn Gia Phong <mcsinyx <at> disroot.org>,
 76757 <at> debbugs.gnu.org
Subject: Re: [bug#76757] [PATCH 1/5] gnu: sdl3: Update to 3.2.6.
Date: Wed, 02 Apr 2025 14:47:16 +0800
[Message part 1 (text/plain, inline)]
guix-patches--- via <guix-patches <at> gnu.org> writes:

> * gnu/packages/sdl.scm (sdl3): Update to 3.2.6.
>
> Change-Id: I67b570738826979953d4ea5b975211b9e635875a
> ---
>  gnu/packages/sdl.scm | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/gnu/packages/sdl.scm b/gnu/packages/sdl.scm
> index 42fcf35d40fe..f6ada6ab1bba 100644
> --- a/gnu/packages/sdl.scm
> +++ b/gnu/packages/sdl.scm
> @@ -151,7 +151,7 @@ (define-public sdl3
>    (package
>      (inherit sdl2)
>      (name "sdl3")
> -    (version "3.2.0")
> +    (version "3.2.6")
>      (source (origin
>                (method git-fetch)
>                (uri (git-reference
> @@ -160,7 +160,7 @@ (define-public sdl3
>                (file-name (git-file-name name version))
>                (sha256
>                 (base32
> -                "11hrhvf74in0amdrmhcf11ll48pxqbidyqawr9hx2cgdwlzdjll1"))))
> +                "0q8fz2qnsjd41dcsd29awx856y9v9ilran9cdfcfg6m7hwjgyhj8"))))
>      (build-system cmake-build-system)
>      (arguments
>       (list

We already have 3.2.8
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#76757; Package guix-patches. (Wed, 02 Apr 2025 06:49:01 GMT) Full text and rfc822 format available.

Message #26 received at 76757 <at> debbugs.gnu.org (full text, mbox):

From: Z572 <zhengjunjie <at> iscas.ac.cn>
To: guix-patches--- via <guix-patches <at> gnu.org>
Cc: Nguyễn Gia Phong <mcsinyx <at> disroot.org>,
 76757 <at> debbugs.gnu.org
Subject: Re: [bug#76757] [PATCH 2/5] gnu: Add sdl3-image.
Date: Wed, 02 Apr 2025 14:48:37 +0800
[Message part 1 (text/plain, inline)]
guix-patches--- via <guix-patches <at> gnu.org> writes:

> * gnu/packages/sdl.scm (sdl3-image): New variable.
>
> Change-Id: I744f515aa7b4c814db86d21209ea31666b19ef3f
> ---
>  gnu/packages/sdl.scm | 22 ++++++++++++++++++++++
>  1 file changed, 22 insertions(+)
>
> diff --git a/gnu/packages/sdl.scm b/gnu/packages/sdl.scm
> index f6ada6ab1bba..ceede7133c80 100644
> --- a/gnu/packages/sdl.scm
> +++ b/gnu/packages/sdl.scm
> @@ -17,6 +17,7 @@
>  ;;; Copyright © 2023 Evgeny Pisemsky <mail <at> pisemsky.site>
>  ;;; Copyright © 2023, 2024 dan <i <at> dan.games>
>  ;;; Copyright © 2025 Zheng Junjie <873216071 <at> qq.com>
> +;;; Copyright © 2025 Nguyễn Gia Phong <mcsinyx <at> disroot.org>
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -667,6 +668,27 @@ (define-public sdl2-gamecontrollerdb
>  mappings intended for the use with SDL2's game controller functionality.")
>        (license license:zlib))))
>  
> +(define-public sdl3-image
> +  (package (inherit sdl2-image)
> +    (name "sdl3-image")
> +    (version "3.2.4")
> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri
> +        (string-append "https://www.libsdl.org/projects/SDL_image/release/"
> +                       "SDL3_image-" version ".tar.gz"))
> +       (sha256
> +        (base32 "10n1rxyswchd8vppalh2bl3ah5fww5chd5cdvnhds7r60invs9d7"))))
> +    (build-system cmake-build-system)
> +    (arguments '(#:configure-flags '("-DSDLIMAGE_AVIF_SHARED=OFF"
> +                                     "-DSDLIMAGE_TIF_SHARED=OFF"
> +                                     "-DSDLIMAGE_WEBP_SHARED=OFF"

why set them? What happens if you don't set it?

> +                                     "-DSDLIMAGE_TESTS=ON")))
> +    (propagated-inputs
> +     (list sdl3 libavif libjpeg-turbo libpng libtiff libwebp))
> +    (properties '((upstream-name . "SDL3_image")))))
> +
>  (define-public guile-sdl
>    (package
>      (name "guile-sdl")
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#76757; Package guix-patches. (Wed, 02 Apr 2025 06:50:02 GMT) Full text and rfc822 format available.

Message #29 received at 76757 <at> debbugs.gnu.org (full text, mbox):

From: Z572 <zhengjunjie <at> iscas.ac.cn>
To: guix-patches--- via <guix-patches <at> gnu.org>
Cc: Nguyễn Gia Phong <mcsinyx <at> disroot.org>,
 76757 <at> debbugs.gnu.org
Subject: Re: [bug#76757] [PATCH 3/5] gnu: Add plutovg.
Date: Wed, 02 Apr 2025 14:49:31 +0800
[Message part 1 (text/plain, inline)]
guix-patches--- via <guix-patches <at> gnu.org> writes:

> * gnu/packages/image.scm (plutovg): New variable.
> * gnu/packages/patches/plutovg-unbundle-stb.patch: New file.
> * gnu/local.mk (dist_patch_DATA): Register patch.
>
> Change-Id: I5b4be1c85c9ceb3ca991cf336b808367c9f832eb
> ---
>  gnu/local.mk                                  |  1 +
>  gnu/packages/image.scm                        | 26 ++++++++++++++++
>  .../patches/plutovg-unbundle-stb.patch        | 31 +++++++++++++++++++
>  3 files changed, 58 insertions(+)
>  create mode 100644 gnu/packages/patches/plutovg-unbundle-stb.patch
>
> diff --git a/gnu/local.mk b/gnu/local.mk
> index a7a3238669d2..a8c3631ada0a 100644
> --- a/gnu/local.mk
> +++ b/gnu/local.mk
> @@ -1991,6 +1991,7 @@ dist_patch_DATA =						\
>    %D%/packages/patches/plasma-framework-fix-KF5PlasmaMacros.cmake.patch \
>    %D%/packages/patches/plasp-fix-normalization.patch \
>    %D%/packages/patches/plasp-include-iostream.patch \
> +  %D%/packages/patches/plutovg-unbundle-stb.patch		\
>    %D%/packages/patches/pocketfft-cpp-prefer-preprocessor-if.patch			\
>    %D%/packages/patches/pokerth-boost.patch			\
>    %D%/packages/patches/ppsspp-disable-upgrade-and-gold.patch		\
> diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
> index 5d294176277e..12c9eb01bc07 100644
> --- a/gnu/packages/image.scm
> +++ b/gnu/packages/image.scm
> @@ -39,6 +39,7 @@
>  ;;; Copyright © 2023-2024 Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
>  ;;; Copyright © 2023, 2025 Artyom V. Poptsov <poptsov.artyom <at> gmail.com>
>  ;;; Copyright © 2024 chris <chris <at> bumblehead.com>
> +;;; Copyright © 2025 Nguyễn Gia Phong <mcsinyx <at> disroot.org>
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -96,6 +97,7 @@ (define-module (gnu packages image)
>    #:use-module (gnu packages qt)
>    #:use-module (gnu packages ragel)
>    #:use-module (gnu packages sphinx)
> +  #:use-module (gnu packages stb)
>    #:use-module (gnu packages swig)
>    #:use-module (gnu packages textutils)
>    #:use-module (gnu packages video)
> @@ -2849,6 +2851,30 @@ (define-public phockup
>  @file{unknown}.")
>      (license license:expat)))
>  
> +(define-public plutovg

There is already a package for this in (gnu packages cpp), please improve it

> +  (package
> +    (name "plutovg")
> +    (version "0.0.13")
> +    (source
> +     (origin
> +       (method git-fetch)
> +       (uri (git-reference
> +             (url "https://github.com/sammycage/plutovg")
> +             (commit (string-append "v" version))))
> +       (file-name (git-file-name name version))
> +       (sha256 (base32 "0y2w0qhs89bnh440z1xj65vg4c71rlwinxgs3p8bvh2fmbi7lqff"))
> +       (patches (search-patches "plutovg-unbundle-stb.patch"))
> +       (snippet '(begin
> +                   (delete-file "source/plutovg-stb-image.h")
> +                   (delete-file "source/plutovg-stb-image-write.h")
> +                   (delete-file "source/plutovg-stb-truetype.h")))))
> +    (build-system meson-build-system)
> +    (inputs (list stb-image stb-image-write stb-truetype))
> +    (home-page "https://github.com/sammycage/plutovg")
> +    (synopsis "Tiny 2D vector graphics library in C")
> +    (description "PlutoVG is a standalone 2D vector graphics library in C.")
> +    (license license:expat)))
> +
>  (define-public spng
>    (package
>     (name "spng")
> diff --git a/gnu/packages/patches/plutovg-unbundle-stb.patch b/gnu/packages/patches/plutovg-unbundle-stb.patch
> new file mode 100644
> index 000000000000..13ea69c76bed
> --- /dev/null
> +++ b/gnu/packages/patches/plutovg-unbundle-stb.patch
> @@ -0,0 +1,31 @@
> +diff --git a/source/plutovg-font.c b/source/plutovg-font.c
> +index 2e67033cb4b3..7d2dc4b7bdec 100644
> +--- a/source/plutovg-font.c
> ++++ b/source/plutovg-font.c
> +@@ -6,7 +6,7 @@
> + 
> + #define STBTT_STATIC
> + #define STB_TRUETYPE_IMPLEMENTATION
> +-#include "plutovg-stb-truetype.h"
> ++#include "stb_truetype.h"
> + 
> + static int plutovg_text_iterator_length(const void* data, int length, plutovg_text_encoding_t encoding)
> + {
> +diff --git a/source/plutovg-surface.c b/source/plutovg-surface.c
> +index 79263cec4d66..cc2cb524b57a 100644
> +--- a/source/plutovg-surface.c
> ++++ b/source/plutovg-surface.c
> +@@ -3,11 +3,11 @@
> + 
> + #define STB_IMAGE_WRITE_STATIC
> + #define STB_IMAGE_WRITE_IMPLEMENTATION
> +-#include "plutovg-stb-image-write.h"
> ++#include "stb_image_write.h"
> + 
> + #define STB_IMAGE_STATIC
> + #define STB_IMAGE_IMPLEMENTATION
> +-#include "plutovg-stb-image.h"
> ++#include "stb_image.h"
> + 
> + static plutovg_surface_t* plutovg_surface_create_uninitialized(int width, int height)
> + {
[signature.asc (application/pgp-signature, inline)]

Added tag(s) moreinfo. Request was from Ludovic Courtès <ludo <at> gnu.org> to control <at> debbugs.gnu.org. (Wed, 02 Apr 2025 14:43:04 GMT) Full text and rfc822 format available.

Information forwarded to code <at> greghogan.com, guix-patches <at> gnu.org:
bug#76757; Package guix-patches. (Thu, 03 Apr 2025 06:46:01 GMT) Full text and rfc822 format available.

Message #34 received at 76757 <at> debbugs.gnu.org (full text, mbox):

From: Nguyễn Gia Phong <mcsinyx <at> disroot.org>
To: 76757 <at> debbugs.gnu.org
Cc: Nguyễn Gia Phong <mcsinyx <at> disroot.org>,
 zhengjunjie <at> iscas.ac.cn
Subject: [PATCH 2/5] gnu: lunasvg: Make compatible with plutovg 1.0.0.
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 <sammycageagle <at> gmail.com>
+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





Information forwarded to guix-patches <at> gnu.org:
bug#76757; Package guix-patches. (Thu, 03 Apr 2025 06:52:02 GMT) Full text and rfc822 format available.

Message #37 received at 76757 <at> debbugs.gnu.org (full text, mbox):

From: Nguyễn Gia Phong <mcsinyx <at> disroot.org>
To: 76757 <at> debbugs.gnu.org
Cc: Nguyễn Gia Phong <mcsinyx <at> disroot.org>,
 zhengjunjie <at> iscas.ac.cn
Subject: [PATCH 5/5] gnu: Add sdl3-image.
Date: Thu,  3 Apr 2025 15:38:26 +0900
* gnu/packages/sdl.scm (sdl3-image): New variable.

Change-Id: I744f515aa7b4c814db86d21209ea31666b19ef3f
---
On 2025-04-02 at 14:49, Z572 wrote:
> > +    (arguments '(#:configure-flags '("-DSDLIMAGE_AVIF_SHARED=OFF"
> > +                                     "-DSDLIMAGE_TIF_SHARED=OFF"
> > +                                     "-DSDLIMAGE_WEBP_SHARED=OFF"
>
> why set them? What happens if you don't set it?

Tests would fail to dynamically look up the shared libraries somehow.
I assume the same happens to non-tests too.

Since the linked libraries in Guix are shared object,
this does not risks linking to them statically.
I added a brief comment above the flags.

 gnu/packages/sdl.scm | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/gnu/packages/sdl.scm b/gnu/packages/sdl.scm
index ebc27596d8f1..71f94bf11b22 100644
--- a/gnu/packages/sdl.scm
+++ b/gnu/packages/sdl.scm
@@ -713,6 +713,29 @@ (define-public sdl3-gfx
     (license license:zlib)
     (properties '((upstream-name . "SDL3_gfx")))))
 
+(define-public sdl3-image
+  (package (inherit sdl2-image)
+    (name "sdl3-image")
+    (version "3.2.4")
+    (source
+     (origin
+      (method url-fetch)
+      (uri
+       (string-append "https://www.libsdl.org/projects/SDL_image/release/"
+                      "SDL3_image-" version ".tar.gz"))
+      (sha256
+       (base32 "10n1rxyswchd8vppalh2bl3ah5fww5chd5cdvnhds7r60invs9d7"))))
+    (build-system cmake-build-system)
+    (arguments
+     ;; Link the libraries instead of dlopening them.
+     '(#:configure-flags '("-DSDLIMAGE_AVIF_SHARED=OFF"
+                           "-DSDLIMAGE_TIF_SHARED=OFF"
+                           "-DSDLIMAGE_WEBP_SHARED=OFF"
+                           "-DSDLIMAGE_TESTS=ON")))
+    (propagated-inputs
+     (list sdl3 libavif libjpeg-turbo libpng libtiff libwebp))
+    (properties '((upstream-name . "SDL3_image")))))
+
 (define-public sdl3-ttf
   (package (inherit sdl2-ttf)
     (name "sdl3-ttf")
-- 
2.49.0





Information forwarded to guix-patches <at> gnu.org:
bug#76757; Package guix-patches. (Thu, 03 Apr 2025 06:54:02 GMT) Full text and rfc822 format available.

Message #40 received at 76757 <at> debbugs.gnu.org (full text, mbox):

From: Nguyễn Gia Phong <mcsinyx <at> disroot.org>
To: <76757 <at> debbugs.gnu.org>
Cc: zhengjunjie <at> iscas.ac.cn
Subject: Re: [PATCH 5/5] gnu: Add sdl3-image.
Date: Thu, 03 Apr 2025 15:53:22 +0900
[Message part 1 (text/plain, inline)]
Oh no I forgot to mark these as v2.

Does Change-ID salvage it somehow or should I resend?
[signature.asc (application/pgp-signature, inline)]

Reply sent to Nguyễn Gia Phong <mcsinyx <at> disroot.org>:
You have taken responsibility. (Tue, 27 May 2025 04:40:02 GMT) Full text and rfc822 format available.

Notification sent to Nguyễn Gia Phong <mcsinyx <at> disroot.org>:
bug acknowledged by developer. (Tue, 27 May 2025 04:40:02 GMT) Full text and rfc822 format available.

Message #45 received at 76757-done <at> debbugs.gnu.org (full text, mbox):

From: Nguyễn Gia Phong <mcsinyx <at> disroot.org>
To: <76757-done <at> debbugs.gnu.org>
Subject: Re: [PATCH 0/5] gnu: Add sdl3-{image,ttf}.
Date: Tue, 27 May 2025 13:39:29 +0900
[Message part 1 (text/plain, inline)]
Some patches in this patchset got bounced by GNU's mail server.
I will take this as an opportunity to try out Codeberg.
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 23 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.