---- SDL2_image-2.0.1/configure.in.orig 2016-01-03 06:52:28.000000000 +0100
-+++ SDL2_image-2.0.1/configure.in 2017-07-16 09:18:58.433858494 +0200
+--- SDL2_image-2.0.1/configure.ac.orig 2016-01-03 06:52:28.000000000 +0100
++++ SDL2_image-2.0.1/configure.ac 2017-07-16 09:18:58.433858494 +0200
@@ -180,10 +180,7 @@
- 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
- elif 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
+ else
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.0.5
+Version: 2.6.0
Release: 1
License: Zlib-like
Group: Libraries
-Source0: http://www.libsdl.org/projects/SDL_image/release/%{name}-%{version}.tar.gz
-# Source0-md5: f26f3a153360a8f09ed5220ef7b07aea
+Source0: https://github.com/libsdl-org/SDL_image/releases/download/release-%{version}/%{name}-%{version}.tar.gz
+# Source0-md5: 8e9c23d60d21aa3907737d6fcd8186bf
Patch0: %{name}-libjpeg.patch
-URL: http://www.libsdl.org/projects/SDL_image/
-BuildRequires: SDL2-devel >= 2.0.8
+Patch1: relax-soname-pattern.patch
+URL: https://github.com/libsdl-org/SDL_image
+BuildRequires: SDL2-devel >= 2.0.9
BuildRequires: autoconf
BuildRequires: automake
+BuildRequires: libavif-devel
BuildRequires: libjpeg-devel >= 8
+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
-Requires: SDL2 >= 2.0.8
+Requires: SDL2 >= 2.0.9
+Suggests: libavif
Suggests: libjpeg >= 8
+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.14
# libjpeg.so.8
+# libjxl.so.0.6
# libpng16.so.16
# libtiff.so.5
# libwebp.so.7
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.8
+Requires: SDL2-devel >= 2.0.9
%description devel
Header files and more to develop SDL2_image applications.
%prep
%setup -q
%patch0 -p1
+%patch1 -p1
%build
%{__libtoolize}
%{__autoconf}
%{__automake}
%configure \
+ --disable-stb-image \
+ --enable-avif \
+ --enable-avif-shared \
--enable-bmp \
--enable-gif \
--enable-jpg \
--enable-jpg-shared \
+ --enable-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 \
%files
%defattr(644,root,root,755)
-%doc CHANGES.txt COPYING.txt README.txt
+%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
--- /dev/null
+From e77f5ac322b24fbcde94a55ed99ba61755c983eb Mon Sep 17 00:00:00 2001
+From: Jan Palus <jpalus@fastmail.com>
+Date: Sun, 10 Jul 2022 18:02:46 +0200
+Subject: [PATCH] autotools: relax soname pattern for dynamic loading
+
+SDL makes assumption that each dynamically loaded library must have
+SONAME matching pattern <libname>.so.<digit>+ hence it discards any file
+that has two (or more) digits after ".so". in practice however SONAME
+might be in the form of ie <libname>.so.<major>.<minor>.
+
+as a solution keep requirement for dynamically loaded files to be named
+<libname>.so.* but consider all the possibilities and prefer the shortest
+one.
+
+Fixes: #289
+From: libsdl-org/SDL#5901
+---
+ configure.ac | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index ca1013a..9cff1e7 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -67,6 +67,11 @@ AC_CHECK_TOOL(RC,[windres],[:])
+ AC_PROG_INSTALL
+ AC_PROG_MAKE_SET
+ PKG_PROG_PKG_CONFIG
++AC_PROG_AWK
++
++if test -z "$AWK"; then
++ AC_MSG_ERROR([*** Required awk tool not found!])
++fi
+
+ case "$host" in
+ *-*-beos*)
+@@ -132,7 +137,7 @@ find_lib()
+ host_lib_path="$ac_default_prefix/$base_libdir $ac_default_prefix/$base_bindir /usr/$base_libdir /usr/local/$base_libdir"
+ fi
+ for path in $env_lib_path $gcc_bin_path $gcc_lib_path $host_lib_path; do
+- lib=[`ls -- $path/$1 2>/dev/null | sed -e '/\.so\..*\./d' -e 's,.*/,,' | sort | tail -1`]
++ lib=[`ls -- $path/$1 2>/dev/null | sed -e 's,.*/,,' | $AWK '{print length() " " $0;}' | sort -n -r | tail -1 | sed 's/^[0-9]\+ //'`]
+ if test x$lib != x; then
+ echo $lib
+ return
+--
+2.37.0
+