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: patch

To reply to this bug, email your comments to 76757 AT debbugs.gnu.org.

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





This bug report was last modified 5 days ago.

Previous Next


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