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>

Full log


View this message in rfc822 format

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: [bug#76757] [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





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.