[Buildroot] [PATCH 4/8] package/sdl3_image: bump to version 3.4.4

Alsey Coleman Miller <[email protected]>
Newsgroups net.busybox.buildroot
Message-ID <[email protected]>
3.1.1 is a prerelease. 3.4.4 is the current release, and the option
names changed with it: PNG is now SDLIMAGE_PNG_LIBPNG, with
SDLIMAGE_BACKEND_STB selecting the built-in decoder used when no helper
library is available.

Build the optional format backends according to the image libraries
already in the configuration - AVIF, JPEG, TIFF, WEBP and JXL alongside
the existing PNG - rather than PNG alone. VENDORED stays off so the
copies of those libraries carried in the tarball are not used, and
DEPS_SHARED off so they are linked rather than dlopen()ed.

The formats SDL3_image decodes by itself (BMP, GIF, LBM, PCX, PNM, QOI,
SVG, TGA, XCF, XPM, XV) need no helper and are always available.

Signed-off-by: Alsey Coleman Miller <[email protected]>
---
 package/sdl3_image/Config.in       | 10 ++++-
 package/sdl3_image/sdl3_image.hash |  4 +-
 package/sdl3_image/sdl3_image.mk   | 62 ++++++++++++++++++++++++++++--
 3 files changed, 68 insertions(+), 8 deletions(-)

diff --git a/package/sdl3_image/Config.in b/package/sdl3_image/Config.in
index 9b9c4f0d74..b93d40c1e7 100644
--- a/package/sdl3_image/Config.in
+++ b/package/sdl3_image/Config.in
@@ -3,7 +3,13 @@ config BR2_PACKAGE_SDL3_IMAGE
 	depends on BR2_PACKAGE_SDL3
 	help
 	  SDL3_image is an image file loading library. It loads images
-	  as SDL surfaces, and supports the following formats: BMP,
-	  GIF, JPEG, LBM, PCX, PNG, PNM, TGA, TIFF, XCF, XPM, XV.
+	  as SDL surfaces, and supports the following formats: AVIF,
+	  BMP, GIF, JPEG, JXL, LBM, PCX, PNG, PNM, QOI, SVG, TGA, TIFF,
+	  WEBP, XCF, XPM, XV.
+
+	  The formats needing a helper library are built according to
+	  the image libraries enabled in the configuration (jpeg,
+	  libpng, tiff, webp, libjxl, libavif); the rest are decoded by
+	  SDL3_image itself and are always available.
 
 	  http://www.libsdl.org/projects/SDL_image/
diff --git a/package/sdl3_image/sdl3_image.hash b/package/sdl3_image/sdl3_image.hash
index 83f5e7eaf1..c7ddbdc43b 100644
--- a/package/sdl3_image/sdl3_image.hash
+++ b/package/sdl3_image/sdl3_image.hash
@@ -1,3 +1,3 @@
 # Locally calculated
-sha256  d5685f220d5ae99439d710d808d8c478c6ccfaac539876929239b875a6723792  SDL3_image-3.1.1.tar.gz
-sha256  7826eca0a0f7e591f38dd844e207a200aac81a59b20d8a30c3af8c6282af13e6  LICENSE.txt
+sha256  29751304a13d25ac513f24305fa25b06a6edd9607718c90129b8350d35fc5573  SDL3_image-3.4.4.tar.gz
+sha256  e36997fe492c48e7ed873065cc3a694f38e8189a328d3709099ffdc9a8843f4c  LICENSE.txt
diff --git a/package/sdl3_image/sdl3_image.mk b/package/sdl3_image/sdl3_image.mk
index fadb870b6f..ac3e375551 100644
--- a/package/sdl3_image/sdl3_image.mk
+++ b/package/sdl3_image/sdl3_image.mk
@@ -4,19 +4,73 @@
 #
 ################################################################################
 
-SDL3_IMAGE_VERSION = 3.1.1
+SDL3_IMAGE_VERSION = 3.4.4
 SDL3_IMAGE_SITE = https://www.libsdl.org/projects/SDL_image/release
 SDL3_IMAGE_SOURCE = SDL3_image-$(SDL3_IMAGE_VERSION).tar.gz
 SDL3_IMAGE_LICENSE = Zlib
 SDL3_IMAGE_LICENSE_FILES = LICENSE.txt
+SDL3_IMAGE_CPE_ID_VENDOR = libsdl
+SDL3_IMAGE_CPE_ID_PRODUCT = sdl_image
 SDL3_IMAGE_INSTALL_STAGING = YES
-SDL3_IMAGE_DEPENDENCIES = sdl3
+SDL3_IMAGE_DEPENDENCIES = sdl3 host-pkgconf
+
+# VENDORED would build the copies of libpng and friends carried in the
+# tarball; DEPS_SHARED would dlopen them at runtime instead of linking, which
+# leaves nothing in the ELF for Buildroot to see.
+SDL3_IMAGE_CONF_OPTS = \
+	-DSDLIMAGE_VENDORED=OFF \
+	-DSDLIMAGE_DEPS_SHARED=OFF \
+	-DSDLIMAGE_STRICT=ON \
+	-DSDLIMAGE_SAMPLES=OFF \
+	-DSDLIMAGE_TESTS=OFF \
+	-DSDLIMAGE_INSTALL_MAN=OFF
+
+ifeq ($(BR2_PACKAGE_LIBAVIF),y)
+SDL3_IMAGE_DEPENDENCIES += libavif
+SDL3_IMAGE_CONF_OPTS += \
+	-DSDLIMAGE_AVIF=ON \
+	-DSDLIMAGE_AVIF_SAVE=OFF
+else
+SDL3_IMAGE_CONF_OPTS += -DSDLIMAGE_AVIF=OFF
+endif
+
+# Without jpeg, JPEG support falls back to the bundled stb_image decoder
+# rather than being dropped.
+ifeq ($(BR2_PACKAGE_JPEG),y)
+SDL3_IMAGE_DEPENDENCIES += jpeg
+SDL3_IMAGE_CONF_OPTS += \
+	-DSDLIMAGE_BACKEND_STB=OFF \
+	-DSDLIMAGE_JPG=ON
+else
+SDL3_IMAGE_CONF_OPTS += -DSDLIMAGE_BACKEND_STB=ON
+endif
 
 ifeq ($(BR2_PACKAGE_LIBPNG),y)
 SDL3_IMAGE_DEPENDENCIES += libpng
-SDL3_IMAGE_CONF_OPTS += -DSDLIMAGE_PNG=ON
+SDL3_IMAGE_CONF_OPTS += -DSDLIMAGE_PNG_LIBPNG=ON
+else
+SDL3_IMAGE_CONF_OPTS += -DSDLIMAGE_PNG_LIBPNG=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_TIFF),y)
+SDL3_IMAGE_DEPENDENCIES += tiff
+SDL3_IMAGE_CONF_OPTS += -DSDLIMAGE_TIF=ON
+else
+SDL3_IMAGE_CONF_OPTS += -DSDLIMAGE_TIF=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_WEBP_DEMUX)$(BR2_PACKAGE_WEBP_MUX),yy)
+SDL3_IMAGE_DEPENDENCIES += webp
+SDL3_IMAGE_CONF_OPTS += -DSDLIMAGE_WEBP=ON
+else
+SDL3_IMAGE_CONF_OPTS += -DSDLIMAGE_WEBP=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_LIBJXL),y)
+SDL3_IMAGE_DEPENDENCIES += libjxl
+SDL3_IMAGE_CONF_OPTS += -DSDLIMAGE_JXL=ON
 else
-SDL3_IMAGE_CONF_OPTS += -DSDLIMAGE_PNG=OFF
+SDL3_IMAGE_CONF_OPTS += -DSDLIMAGE_JXL=OFF
 endif
 
 $(eval $(cmake-package))
-- 
2.47.3

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.