]>
Commit | Line | Data |
---|---|---|
9c3fbf92 JP |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without avif # AV1 Image File Format support | |
4 | %bcond_without jxl # JPEG XL support | |
5 | ||
7e96a0d5 JB |
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 | |
9 | Name: SDL2_image | |
bba13cd2 | 10 | Version: 2.6.0 |
c2e294a4 | 11 | Release: 1 |
7e96a0d5 JB |
12 | License: Zlib-like |
13 | Group: Libraries | |
bba13cd2 JP |
14 | Source0: https://github.com/libsdl-org/SDL_image/releases/download/release-%{version}/%{name}-%{version}.tar.gz |
15 | # Source0-md5: 8e9c23d60d21aa3907737d6fcd8186bf | |
bf31c657 | 16 | Patch0: %{name}-libjpeg.patch |
bba13cd2 JP |
17 | Patch1: relax-soname-pattern.patch |
18 | URL: https://github.com/libsdl-org/SDL_image | |
19 | BuildRequires: SDL2-devel >= 2.0.9 | |
7e96a0d5 JB |
20 | BuildRequires: autoconf |
21 | BuildRequires: automake | |
9c3fbf92 | 22 | %{?with_avif:BuildRequires: libavif-devel} |
7e96a0d5 | 23 | BuildRequires: libjpeg-devel >= 8 |
9c3fbf92 | 24 | %{?with_jxl:BuildRequires: libjxl-devel} |
bf31c657 | 25 | BuildRequires: libpng-devel >= 2:1.6.0 |
7e96a0d5 JB |
26 | BuildRequires: libtiff-devel >= 4 |
27 | BuildRequires: libtool >= 2:2 | |
bf31c657 | 28 | BuildRequires: libwebp-devel >= 0.6.0 |
7e96a0d5 | 29 | BuildRequires: pkgconfig >= 1:0.9.0 |
9c3fbf92 | 30 | BuildRequires: rpmbuild(macros) >= 1.527 |
bba13cd2 | 31 | Requires: SDL2 >= 2.0.9 |
9c3fbf92 | 32 | %{?with_avif:Suggests: libavif} |
7e96a0d5 | 33 | Suggests: libjpeg >= 8 |
9c3fbf92 | 34 | %{?with_jxl:Suggests: libjxl} |
7e96a0d5 | 35 | Suggests: libpng >= 2:1.6.0 |
7e96a0d5 | 36 | Suggests: libtiff >= 4 |
bf31c657 | 37 | Suggests: libwebp >= 0.6.0 |
7e96a0d5 JB |
38 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
39 | ||
40 | # NOTE: libraries dlopened by sonames detected at build time: | |
bba13cd2 | 41 | # libavif.so.14 |
7e96a0d5 | 42 | # libjpeg.so.8 |
bba13cd2 | 43 | # libjxl.so.0.6 |
bf31c657 | 44 | # libpng16.so.16 |
7e96a0d5 | 45 | # libtiff.so.5 |
bf31c657 | 46 | # libwebp.so.7 |
7e96a0d5 JB |
47 | |
48 | %description | |
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. | |
52 | ||
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. | |
58 | ||
59 | %description -l pt_BR.UTF-8 | |
60 | Simple DirectMedia Layer 2 - Biblioteca exemplo para carga de Imagens. | |
61 | ||
62 | %package devel | |
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} | |
bba13cd2 | 68 | Requires: SDL2-devel >= 2.0.9 |
7e96a0d5 JB |
69 | |
70 | %description devel | |
71 | Header files and more to develop SDL2_image applications. | |
72 | ||
73 | %description devel -l pl.UTF-8 | |
74 | Pliki nagłówkowe do rozwijania aplikacji używających SDL2_image. | |
75 | ||
76 | %description devel -l pt_BR.UTF-8 | |
77 | Bibliotecas e arquivos de inclusão para desenvolvimento de aplicações | |
78 | SDL2. | |
79 | ||
80 | %package static | |
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} | |
86 | ||
87 | %description static | |
88 | Statis SDL2_image libraries. | |
89 | ||
90 | %description static -l pl.UTF-8 | |
91 | Statyczne biblioteki SDL2_image. | |
92 | ||
93 | %description static -l pt_BR.UTF-8 | |
94 | Bibliotecas estáticas para desenvolvimento de aplicações SDL2. | |
95 | ||
96 | %prep | |
97 | %setup -q | |
bf31c657 | 98 | %patch0 -p1 |
bba13cd2 | 99 | %patch1 -p1 |
7e96a0d5 JB |
100 | |
101 | %build | |
102 | %{__libtoolize} | |
103 | %{__aclocal} | |
104 | %{__autoconf} | |
105 | %{__automake} | |
106 | %configure \ | |
bba13cd2 | 107 | --disable-stb-image \ |
9c3fbf92 | 108 | %{__enable_disable avif} \ |
bba13cd2 | 109 | --enable-avif-shared \ |
7e96a0d5 JB |
110 | --enable-bmp \ |
111 | --enable-gif \ | |
112 | --enable-jpg \ | |
113 | --enable-jpg-shared \ | |
9c3fbf92 | 114 | %{__enable_disable jxl} \ |
bba13cd2 | 115 | --enable-jxl-shared \ |
7e96a0d5 JB |
116 | --enable-lbm \ |
117 | --enable-pcx \ | |
118 | --enable-png \ | |
119 | --enable-png-shared \ | |
120 | --enable-pnm \ | |
bba13cd2 JP |
121 | --enable-qoi \ |
122 | --enable-svg \ | |
7e96a0d5 JB |
123 | --enable-tga \ |
124 | --enable-tif \ | |
125 | --enable-tif-shared \ | |
126 | --enable-webp \ | |
127 | --enable-webp-shared \ | |
128 | --enable-xcf \ | |
129 | --enable-xpm \ | |
130 | --enable-xv | |
131 | ||
132 | %{__make} | |
133 | ||
134 | %install | |
135 | rm -rf $RPM_BUILD_ROOT | |
136 | install -d $RPM_BUILD_ROOT%{_bindir} | |
137 | ||
138 | %{__make} install \ | |
139 | DESTDIR=$RPM_BUILD_ROOT | |
140 | ||
141 | install .libs/showimage $RPM_BUILD_ROOT%{_bindir}/sdl2show | |
142 | ||
143 | # obsoleted by pkg-config | |
144 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/lib*.la | |
145 | ||
146 | %clean | |
147 | rm -rf $RPM_BUILD_ROOT | |
148 | ||
149 | %post -p /sbin/ldconfig | |
150 | %postun -p /sbin/ldconfig | |
151 | ||
152 | %files | |
153 | %defattr(644,root,root,755) | |
bba13cd2 | 154 | %doc CHANGES.txt LICENSE.txt README.txt |
7e96a0d5 JB |
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 | |
158 | ||
159 | %files devel | |
160 | %defattr(644,root,root,755) | |
161 | %attr(755,root,root) %{_libdir}/libSDL2_image.so | |
bba13cd2 | 162 | %{_libdir}/cmake/SDL2_image |
7e96a0d5 JB |
163 | %{_includedir}/SDL2/SDL_image.h |
164 | %{_pkgconfigdir}/SDL2_image.pc | |
165 | ||
166 | %files static | |
167 | %defattr(644,root,root,755) | |
168 | %{_libdir}/libSDL2_image.a |