3 %bcond_without avif # AV1 Image File Format support
4 %bcond_without jxl # JPEG XL support
6 Summary: Simple DirectMedia Layer 2 - Sample Image Loading Library
7 Summary(pl.UTF-8): Przykładowa biblioteka do ładowania obrazków dla SDL2
8 Summary(pt_BR.UTF-8): Simple DirectMedia Layer 2 - Biblioteca exemplo para carga de Imagens
14 Source0: https://github.com/libsdl-org/SDL_image/releases/download/release-%{version}/%{name}-%{version}.tar.gz
15 # Source0-md5: 191c3eb49cc2dce30abff81398a92e81
16 Patch0: %{name}-libjpeg.patch
17 Patch1: relax-soname-pattern.patch
18 URL: https://github.com/libsdl-org/SDL_image
19 BuildRequires: SDL2-devel >= 2.0.9
20 BuildRequires: autoconf
21 BuildRequires: automake
22 %{?with_avif:BuildRequires: libavif-devel}
23 BuildRequires: libjpeg-devel >= 8
24 %{?with_jxl:BuildRequires: libjxl-devel}
25 BuildRequires: libpng-devel >= 2:1.6.0
26 BuildRequires: libtiff-devel >= 4
27 BuildRequires: libtool >= 2:2
28 BuildRequires: libwebp-devel >= 0.6.0
29 BuildRequires: pkgconfig >= 1:0.9.0
30 BuildRequires: rpmbuild(macros) >= 1.527
31 Requires: SDL2 >= 2.0.9
32 %{?with_avif:Suggests: libavif}
33 Suggests: libjpeg >= 8
34 %{?with_jxl:Suggests: libjxl}
35 Suggests: libpng >= 2:1.6.0
36 Suggests: libtiff >= 4
37 Suggests: libwebp >= 0.6.0
38 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
40 # NOTE: libraries dlopened by sonames detected at build time:
49 This is a simple library to load images of various formats as SDL2
50 surfaces. This library currently supports BMP, GIF, JPEG, LBM, PCX,
51 PNG, PNM (PBM/PGM/PPM), TGA, TIFF, WebP, XCF and XPM formats.
53 %description -l pl.UTF-8
54 Jest to prosta biblioteka służąca do ładowania różnego formatu
55 obrazków jako powierzchni SDL2. W chwili obecnej biblioteka obsługuje
56 następujące formaty: BMP, GIF, JPEG, LBM, PCX, PNG, PNM (PBM/PGM/PPM),
57 TGA, TIFF, WebP, XCF oraz XPM.
59 %description -l pt_BR.UTF-8
60 Simple DirectMedia Layer 2 - Biblioteca exemplo para carga de Imagens.
63 Summary: Header files and more to develop SDL2_image applications
64 Summary(pl.UTF-8): Pliki nagłówkowe do rozwijania aplikacji używających SDL2_image
65 Summary(pt_BR.UTF-8): Bibliotecas e arquivos de inclusão para desenvolvimento de aplicações SDL2
66 Group: Development/Libraries
67 Requires: %{name} = %{version}-%{release}
68 Requires: SDL2-devel >= 2.0.9
71 Header files and more to develop SDL2_image applications.
73 %description devel -l pl.UTF-8
74 Pliki nagłówkowe do rozwijania aplikacji używających SDL2_image.
76 %description devel -l pt_BR.UTF-8
77 Bibliotecas e arquivos de inclusão para desenvolvimento de aplicações
81 Summary: Static SDL2_image libraries
82 Summary(pl.UTF-8): Statyczne biblioteki SDL2_image
83 Summary(pt_BR.UTF-8): Bibliotecas estáticas para desenvolvimento de aplicações SDL2
84 Group: Development/Libraries
85 Requires: %{name}-devel = %{version}-%{release}
88 Statis SDL2_image libraries.
90 %description static -l pl.UTF-8
91 Statyczne biblioteki SDL2_image.
93 %description static -l pt_BR.UTF-8
94 Bibliotecas estáticas para desenvolvimento de aplicações SDL2.
107 --disable-stb-image \
108 %{__enable_disable avif} \
109 --enable-avif-shared \
113 --enable-jpg-shared \
114 %{__enable_disable jxl} \
115 --enable-jxl-shared \
119 --enable-png-shared \
125 --enable-tif-shared \
127 --enable-webp-shared \
135 rm -rf $RPM_BUILD_ROOT
136 install -d $RPM_BUILD_ROOT%{_bindir}
139 DESTDIR=$RPM_BUILD_ROOT
141 install .libs/showimage $RPM_BUILD_ROOT%{_bindir}/sdl2show
143 # obsoleted by pkg-config
144 %{__rm} $RPM_BUILD_ROOT%{_libdir}/lib*.la
147 rm -rf $RPM_BUILD_ROOT
149 %post -p /sbin/ldconfig
150 %postun -p /sbin/ldconfig
153 %defattr(644,root,root,755)
154 %doc CHANGES.txt LICENSE.txt README.txt
155 %attr(755,root,root) %{_bindir}/sdl2show
156 %attr(755,root,root) %{_libdir}/libSDL2_image-2.0.so.*.*.*
157 %attr(755,root,root) %ghost %{_libdir}/libSDL2_image-2.0.so.0
160 %defattr(644,root,root,755)
161 %attr(755,root,root) %{_libdir}/libSDL2_image.so
162 %{_libdir}/cmake/SDL2_image
163 %{_includedir}/SDL2/SDL_image.h
164 %{_pkgconfigdir}/SDL2_image.pc
167 %defattr(644,root,root,755)
168 %{_libdir}/libSDL2_image.a