]> git.pld-linux.org Git - packages/SDL2_image.git/commitdiff
up to 2.6.0 auto/th/SDL2_image-2.6.0-1
authorJan Palus <atler@pld-linux.org>
Sun, 10 Jul 2022 19:04:14 +0000 (21:04 +0200)
committerJan Palus <atler@pld-linux.org>
Sun, 10 Jul 2022 19:04:14 +0000 (21:04 +0200)
- project moved to github
- patch to fix dynamic loading of libjxl (from
  https://github.com/libsdl-org/SDL_image/pull/290)

SDL2_image-libjpeg.patch
SDL2_image.spec
relax-soname-pattern.patch [new file with mode: 0644]

index 7557cbdb4013dc0ca9f88f551931e50a893e1a11..d1911848306046cd54bacd6539e7002bc2eb3517 100644 (file)
@@ -1,14 +1,14 @@
---- 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
index 224a0dc60f4b4ba8a376a3e2c1c86ee23ea266b4..3b1761a006c46a2c98fa87d2fa7bdd84074e3f22 100644 (file)
@@ -2,32 +2,39 @@ 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.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
@@ -52,7 +59,7 @@ Summary(pl.UTF-8):    Pliki nagłówkowe do rozwijania aplikacji używających SDL2
 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.
@@ -83,6 +90,7 @@ Bibliotecas estáticas para desenvolvimento de aplicações SDL2.
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
 
 %build
 %{__libtoolize}
@@ -90,15 +98,22 @@ Bibliotecas estáticas para desenvolvimento de aplicações SDL2.
 %{__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 \
@@ -130,7 +145,7 @@ rm -rf $RPM_BUILD_ROOT
 
 %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
@@ -138,6 +153,7 @@ rm -rf $RPM_BUILD_ROOT
 %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
 
diff --git a/relax-soname-pattern.patch b/relax-soname-pattern.patch
new file mode 100644 (file)
index 0000000..f846025
--- /dev/null
@@ -0,0 +1,48 @@
+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
+
This page took 0.231284 seconds and 4 git commands to generate.