[packages/SDL3_image] - SDL3_image 3.2.4 based on SDL2_image

qboosh qboosh at pld-linux.org
Wed Mar 19 21:01:14 CET 2025


commit 4c4df8cadfeabe48375706c86cda83480abe9627
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Wed Mar 19 20:52:45 2025 +0100

    - SDL3_image 3.2.4 based on SDL2_image

 SDL2_image-libjpeg.patch |  14 ----
 SDL2_image.spec          | 172 -----------------------------------------------
 SDL3_image.spec          | 128 +++++++++++++++++++++++++++++++++++
 3 files changed, 128 insertions(+), 186 deletions(-)
---
diff --git a/SDL2_image.spec b/SDL2_image.spec
deleted file mode 100644
index 968ba58..0000000
--- a/SDL2_image.spec
+++ /dev/null
@@ -1,172 +0,0 @@
-#
-# Conditional build:
-%bcond_without	avif		# AV1 Image File Format support
-%bcond_without	jxl		# JPEG XL support
-%bcond_without	static_libs	# static library
-
-Summary:	Simple DirectMedia Layer 2 - Sample Image Loading Library
-Summary(pl.UTF-8):	Przykładowa biblioteka do ładowania obrazków dla SDL2
-Summary(pt_BR.UTF-8):	Simple DirectMedia Layer 2 - Biblioteca exemplo para carga de Imagens
-Name:		SDL2_image
-Version:	2.8.8
-Release:	1
-License:	Zlib-like
-Group:		Libraries
-#Source0Download: https://github.com/libsdl-org/SDL_image/releases
-Source0:	https://github.com/libsdl-org/SDL_image/releases/download/release-%{version}/%{name}-%{version}.tar.gz
-# Source0-md5:	ec3e249988c0ff1ab4e828e7edc5d39c
-Patch0:		%{name}-libjpeg.patch
-URL:		https://github.com/libsdl-org/SDL_image
-BuildRequires:	SDL2-devel >= 2.0.9
-BuildRequires:	autoconf
-BuildRequires:	automake
-%{?with_avif:BuildRequires:	libavif-devel >= 0.9.3}
-BuildRequires:	libjpeg-devel >= 8
-%{?with_jxl:BuildRequires:	libjxl-devel}
-BuildRequires:	libpng-devel >= 2:1.6.0
-BuildRequires:	libtiff-devel >= 4
-BuildRequires:	libtool >= 2:2
-BuildRequires:	libwebp-devel >= 0.6.0
-BuildRequires:	pkgconfig >= 1:0.9.0
-BuildRequires:	rpmbuild(macros) >= 1.527
-Requires:	SDL2 >= 2.0.9
-%{?with_avif:Suggests:	libavif >= 0.9.3}
-Suggests:	libjpeg >= 8
-%{?with_jxl:Suggests:	libjxl}
-Suggests:	libpng >= 2:1.6.0
-Suggests:	libtiff >= 4
-Suggests:	libwebp >= 0.6.0
-BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-
-# NOTE: libraries dlopened by sonames detected at build time:
-# libavif.so.16
-# libjpeg.so.8
-# libjxl.so.0.11
-# libpng16.so.16
-# libtiff.so.5
-# libwebp.so.7
-
-%description
-This is a simple library to load images of various formats as SDL3
-surfaces. This library currently supports AVIF, BMP, GIF, JPEG,
-JPEG-XL, LBM, PCX, PNG, PNM (PBM/PGM/PPM), QOI, TGA, TIFF, WebP, XCF
-and XPM formats.
-
-%description -l pl.UTF-8
-Jest to prosta biblioteka służąca do ładowania różnego formatu
-obrazków jako powierzchni SDL3. W chwili obecnej biblioteka obsługuje
-następujące formaty: AVIF, BMP, GIF, JPEG, JPEG-XL, LBM, PCX, PNG, PNM
-(PBM/PGM/PPM), QOI, TGA, TIFF, WebP, XCF oraz XPM.
-
-%description -l pt_BR.UTF-8
-Simple DirectMedia Layer 2 - Biblioteca exemplo para carga de Imagens.
-
-%package devel
-Summary:	Header files and more to develop SDL2_image applications
-Summary(pl.UTF-8):	Pliki nagłówkowe do rozwijania aplikacji używających SDL2_image
-Summary(pt_BR.UTF-8):	Bibliotecas e arquivos de inclusão para desenvolvimento de aplicações SDL2
-Group:		Development/Libraries
-Requires:	%{name} = %{version}-%{release}
-Requires:	SDL2-devel >= 2.0.9
-
-%description devel
-Header files and more to develop SDL2_image applications.
-
-%description devel -l pl.UTF-8
-Pliki nagłówkowe do rozwijania aplikacji używających SDL2_image.
-
-%description devel -l pt_BR.UTF-8
-Bibliotecas e arquivos de inclusão para desenvolvimento de aplicações
-SDL2.
-
-%package static
-Summary:	Static SDL2_image libraries
-Summary(pl.UTF-8):	Statyczne biblioteki SDL2_image
-Summary(pt_BR.UTF-8):	Bibliotecas estáticas para desenvolvimento de aplicações SDL2
-Group:		Development/Libraries
-Requires:	%{name}-devel = %{version}-%{release}
-
-%description static
-Statis SDL2_image libraries.
-
-%description static -l pl.UTF-8
-Statyczne biblioteki SDL2_image.
-
-%description static -l pt_BR.UTF-8
-Bibliotecas estáticas para desenvolvimento de aplicações SDL2.
-
-%prep
-%setup -q
-%patch -P0 -p1
-
-%build
-%{__libtoolize}
-%{__aclocal}
-%{__autoconf}
-%{__automake}
-%configure \
-	%{__enable_disable static_libs static} \
-	--disable-stb-image \
-	%{__enable_disable avif} \
-	--enable-avif-shared \
-	--enable-bmp \
-	--enable-gif \
-	--enable-jpg \
-	--enable-jpg-shared \
-	%{__enable_disable jxl} \
-	--enable-jxl-shared \
-	--enable-lbm \
-	--enable-pcx \
-	--enable-png \
-	--enable-png-shared \
-	--enable-pnm \
-	--enable-qoi \
-	--enable-svg \
-	--enable-tga \
-	--enable-tif \
-	--enable-tif-shared \
-	--enable-webp \
-	--enable-webp-shared \
-	--enable-xcf \
-	--enable-xpm \
-	--enable-xv
-
-%{__make}
-
-%install
-rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_bindir}
-
-%{__make} install \
-	DESTDIR=$RPM_BUILD_ROOT
-
-install .libs/showimage $RPM_BUILD_ROOT%{_bindir}/sdl2show
-
-# obsoleted by pkg-config
-%{__rm} $RPM_BUILD_ROOT%{_libdir}/lib*.la
-
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-%post	-p /sbin/ldconfig
-%postun	-p /sbin/ldconfig
-
-%files
-%defattr(644,root,root,755)
-%doc CHANGES.txt LICENSE.txt README.txt
-%attr(755,root,root) %{_bindir}/sdl2show
-%attr(755,root,root) %{_libdir}/libSDL2_image-2.0.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libSDL2_image-2.0.so.0
-
-%files devel
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libSDL2_image.so
-%{_libdir}/cmake/SDL2_image
-%{_includedir}/SDL2/SDL_image.h
-%{_pkgconfigdir}/SDL2_image.pc
-
-%if %{with static_libs}
-%files static
-%defattr(644,root,root,755)
-%{_libdir}/libSDL2_image.a
-%endif
diff --git a/SDL3_image.spec b/SDL3_image.spec
new file mode 100644
index 0000000..561131c
--- /dev/null
+++ b/SDL3_image.spec
@@ -0,0 +1,128 @@
+#
+# Conditional build:
+%bcond_without	avif		# AV1 Image File Format support
+%bcond_without	jxl		# JPEG XL support
+
+Summary:	Simple DirectMedia Layer 3 - Sample Image Loading Library
+Summary(pl.UTF-8):	Przykładowa biblioteka do ładowania obrazków dla SDL3
+Summary(pt_BR.UTF-8):	Simple DirectMedia Layer 3 - Biblioteca exemplo para carga de Imagens
+Name:		SDL3_image
+Version:	3.2.4
+Release:	1
+License:	Zlib-like
+Group:		Libraries
+#Source0Download: https://github.com/libsdl-org/SDL_image/releases
+Source0:	https://github.com/libsdl-org/SDL_image/releases/download/release-%{version}/%{name}-%{version}.tar.gz
+# Source0-md5:	42d93037a22c5a5bb3b1eacbef072b2f
+URL:		https://github.com/libsdl-org/SDL_image
+BuildRequires:	SDL3-devel >= 3.2.6
+BuildRequires:	cmake >= 3.16
+%{?with_avif:BuildRequires:	libavif-devel >= 1.0}
+BuildRequires:	libjpeg-devel >= 8
+%{?with_jxl:BuildRequires:	libjxl-devel}
+BuildRequires:	libpng-devel >= 2:1.6.0
+BuildRequires:	libtiff-devel >= 4
+BuildRequires:	libwebp-devel >= 0.6.0
+BuildRequires:	pkgconfig >= 1:0.9.0
+BuildRequires:	rpmbuild(macros) >= 1.605
+Requires:	SDL3 >= 3.2.6
+%{?with_avif:Suggests:	libavif >= 1.0}
+Suggests:	libjpeg >= 8
+%{?with_jxl:Suggests:	libjxl}
+Suggests:	libpng >= 2:1.6.0
+Suggests:	libtiff >= 4
+Suggests:	libwebp >= 0.6.0
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+# NOTE: libraries dlopened by sonames detected at build time:
+# libavif.so.16
+# libjpeg.so.8
+# libjxl.so.0.11
+# libpng16.so.16
+# libtiff.so.5
+# libwebp.so.7
+# libwebpdemux.so.2
+
+%description
+This is a simple library to load images of various formats as SDL3
+surfaces. This library currently supports AVIF, BMP, GIF, JPEG,
+JPEG-XL, LBM, PCX, PNG, PNM (PBM/PGM/PPM), QOI, TGA, TIFF, WebP, XCF
+and XPM formats.
+
+%description -l pl.UTF-8
+Jest to prosta biblioteka służąca do ładowania różnego formatu
+obrazków jako powierzchni SDL3. W chwili obecnej biblioteka obsługuje
+następujące formaty: AVIF, BMP, GIF, JPEG, JPEG-XL, LBM, PCX, PNG, PNM
+(PBM/PGM/PPM), QOI, TGA, TIFF, WebP, XCF oraz XPM.
+
+%description -l pt_BR.UTF-8
+Simple DirectMedia Layer 3 - Biblioteca exemplo para carga de Imagens.
+
+%package devel
+Summary:	Header files and more to develop SDL3_image applications
+Summary(pl.UTF-8):	Pliki nagłówkowe do rozwijania aplikacji używających SDL3_image
+Summary(pt_BR.UTF-8):	Bibliotecas e arquivos de inclusão para desenvolvimento de aplicações SDL3
+Group:		Development/Libraries
+Requires:	%{name} = %{version}-%{release}
+Requires:	SDL3-devel >= 3.2.6
+
+%description devel
+Header files and more to develop SDL3_image applications.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe do rozwijania aplikacji używających SDL3_image.
+
+%description devel -l pt_BR.UTF-8
+Bibliotecas e arquivos de inclusão para desenvolvimento de aplicações
+SDL3.
+
+%prep
+%setup -q
+
+%build
+%cmake -B build \
+	-DSDLIMAGE_INSTALL_MAN=ON \
+	%{!?with_avif:-DSDLIMAGE_AVIF=OFF} \
+	%{?with_jxl:-DSDLIMAGE_JXL=ON} \
+	-DSDLIMAGE_STRICT=ON \
+
+%{__make} -C build
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT%{_bindir}
+
+%{__make} -C build install \
+	DESTDIR=$RPM_BUILD_ROOT
+
+install build/showanim $RPM_BUILD_ROOT%{_bindir}/sdl3-showanim
+install build/showimage $RPM_BUILD_ROOT%{_bindir}/sdl3-showimage
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post	-p /sbin/ldconfig
+%postun	-p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%doc CHANGES.txt LICENSE.txt README.md
+%attr(755,root,root) %{_bindir}/sdl3-showanim
+%attr(755,root,root) %{_bindir}/sdl3-showimage
+%attr(755,root,root) %{_libdir}/libSDL3_image.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libSDL3_image.so.0
+
+%files devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libSDL3_image.so
+%{_libdir}/cmake/SDL3_image
+%{_includedir}/SDL3_image
+%{_pkgconfigdir}/sdl3-image.pc
+%{_mandir}/man3/IMG_Animation.3type*
+%{_mandir}/man3/IMG_FreeAnimation.3*
+%{_mandir}/man3/IMG_Load*.3*
+%{_mandir}/man3/IMG_Read*.3*
+%{_mandir}/man3/IMG_Save*.3*
+%{_mandir}/man3/IMG_Version.3*
+%{_mandir}/man3/IMG_is*.3*
+%{_mandir}/man3/SDL_IMAGE_*.3*
diff --git a/SDL2_image-libjpeg.patch b/SDL2_image-libjpeg.patch
deleted file mode 100644
index 28b5a6b..0000000
--- a/SDL2_image-libjpeg.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- SDL2_image-2.8.3/configure.ac.orig	2024-12-21 18:43:41.349424582 +0100
-+++ SDL2_image-2.8.3/configure.ac	2024-12-21 18:47:22.204894772 +0100
-@@ -411,10 +411,7 @@ if test x$enable_jpg = xyes; then
-                     jpg_lib=[`find_lib "libjpeg*.dll"`]
-                     ;;
-                 *)
--                    jpg_lib=[`find_lib "libjpeg[0-9]*.so.*"`]
--                    if test x$jpg_lib = x; then
--                        jpg_lib=[`find_lib "libjpeg.so.*"`]
--                    fi
-+                    jpg_lib=[`find_lib "libjpeg.so.*"`]
-                     ;;
-             esac
- 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/SDL3_image.git/commitdiff/4c4df8cadfeabe48375706c86cda83480abe9627



More information about the pld-cvs-commit mailing list