]>
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 | |
a0a957da | 5 | %bcond_without static_libs # static library |
9c3fbf92 | 6 | |
7e96a0d5 JB |
7 | Summary: Simple DirectMedia Layer 2 - Sample Image Loading Library |
8 | Summary(pl.UTF-8): Przykładowa biblioteka do ładowania obrazków dla SDL2 | |
9 | Summary(pt_BR.UTF-8): Simple DirectMedia Layer 2 - Biblioteca exemplo para carga de Imagens | |
10 | Name: SDL2_image | |
3ba31064 | 11 | Version: 2.6.3 |
1a81da4a | 12 | Release: 2 |
7e96a0d5 JB |
13 | License: Zlib-like |
14 | Group: Libraries | |
bba13cd2 | 15 | Source0: https://github.com/libsdl-org/SDL_image/releases/download/release-%{version}/%{name}-%{version}.tar.gz |
3ba31064 | 16 | # Source0-md5: 191c3eb49cc2dce30abff81398a92e81 |
bf31c657 | 17 | Patch0: %{name}-libjpeg.patch |
bba13cd2 JP |
18 | Patch1: relax-soname-pattern.patch |
19 | URL: https://github.com/libsdl-org/SDL_image | |
20 | BuildRequires: SDL2-devel >= 2.0.9 | |
7e96a0d5 JB |
21 | BuildRequires: autoconf |
22 | BuildRequires: automake | |
9c3fbf92 | 23 | %{?with_avif:BuildRequires: libavif-devel} |
7e96a0d5 | 24 | BuildRequires: libjpeg-devel >= 8 |
9c3fbf92 | 25 | %{?with_jxl:BuildRequires: libjxl-devel} |
bf31c657 | 26 | BuildRequires: libpng-devel >= 2:1.6.0 |
7e96a0d5 JB |
27 | BuildRequires: libtiff-devel >= 4 |
28 | BuildRequires: libtool >= 2:2 | |
bf31c657 | 29 | BuildRequires: libwebp-devel >= 0.6.0 |
7e96a0d5 | 30 | BuildRequires: pkgconfig >= 1:0.9.0 |
9c3fbf92 | 31 | BuildRequires: rpmbuild(macros) >= 1.527 |
bba13cd2 | 32 | Requires: SDL2 >= 2.0.9 |
9c3fbf92 | 33 | %{?with_avif:Suggests: libavif} |
7e96a0d5 | 34 | Suggests: libjpeg >= 8 |
9c3fbf92 | 35 | %{?with_jxl:Suggests: libjxl} |
7e96a0d5 | 36 | Suggests: libpng >= 2:1.6.0 |
7e96a0d5 | 37 | Suggests: libtiff >= 4 |
bf31c657 | 38 | Suggests: libwebp >= 0.6.0 |
7e96a0d5 JB |
39 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
40 | ||
41 | # NOTE: libraries dlopened by sonames detected at build time: | |
1a81da4a | 42 | # libavif.so.15 |
7e96a0d5 | 43 | # libjpeg.so.8 |
1a81da4a | 44 | # libjxl.so.0.8 |
bf31c657 | 45 | # libpng16.so.16 |
7e96a0d5 | 46 | # libtiff.so.5 |
bf31c657 | 47 | # libwebp.so.7 |
7e96a0d5 JB |
48 | |
49 | %description | |
50 | This is a simple library to load images of various formats as SDL2 | |
51 | surfaces. This library currently supports BMP, GIF, JPEG, LBM, PCX, | |
52 | PNG, PNM (PBM/PGM/PPM), TGA, TIFF, WebP, XCF and XPM formats. | |
53 | ||
54 | %description -l pl.UTF-8 | |
55 | Jest to prosta biblioteka służąca do ładowania różnego formatu | |
56 | obrazków jako powierzchni SDL2. W chwili obecnej biblioteka obsługuje | |
57 | następujące formaty: BMP, GIF, JPEG, LBM, PCX, PNG, PNM (PBM/PGM/PPM), | |
58 | TGA, TIFF, WebP, XCF oraz XPM. | |
59 | ||
60 | %description -l pt_BR.UTF-8 | |
61 | Simple DirectMedia Layer 2 - Biblioteca exemplo para carga de Imagens. | |
62 | ||
63 | %package devel | |
64 | Summary: Header files and more to develop SDL2_image applications | |
65 | Summary(pl.UTF-8): Pliki nagłówkowe do rozwijania aplikacji używających SDL2_image | |
66 | Summary(pt_BR.UTF-8): Bibliotecas e arquivos de inclusão para desenvolvimento de aplicações SDL2 | |
67 | Group: Development/Libraries | |
68 | Requires: %{name} = %{version}-%{release} | |
bba13cd2 | 69 | Requires: SDL2-devel >= 2.0.9 |
7e96a0d5 JB |
70 | |
71 | %description devel | |
72 | Header files and more to develop SDL2_image applications. | |
73 | ||
74 | %description devel -l pl.UTF-8 | |
75 | Pliki nagłówkowe do rozwijania aplikacji używających SDL2_image. | |
76 | ||
77 | %description devel -l pt_BR.UTF-8 | |
78 | Bibliotecas e arquivos de inclusão para desenvolvimento de aplicações | |
79 | SDL2. | |
80 | ||
81 | %package static | |
82 | Summary: Static SDL2_image libraries | |
83 | Summary(pl.UTF-8): Statyczne biblioteki SDL2_image | |
84 | Summary(pt_BR.UTF-8): Bibliotecas estáticas para desenvolvimento de aplicações SDL2 | |
85 | Group: Development/Libraries | |
86 | Requires: %{name}-devel = %{version}-%{release} | |
87 | ||
88 | %description static | |
89 | Statis SDL2_image libraries. | |
90 | ||
91 | %description static -l pl.UTF-8 | |
92 | Statyczne biblioteki SDL2_image. | |
93 | ||
94 | %description static -l pt_BR.UTF-8 | |
95 | Bibliotecas estáticas para desenvolvimento de aplicações SDL2. | |
96 | ||
97 | %prep | |
98 | %setup -q | |
bf31c657 | 99 | %patch0 -p1 |
bba13cd2 | 100 | %patch1 -p1 |
7e96a0d5 JB |
101 | |
102 | %build | |
103 | %{__libtoolize} | |
104 | %{__aclocal} | |
105 | %{__autoconf} | |
106 | %{__automake} | |
107 | %configure \ | |
a0a957da | 108 | %{__enable_disable static_libs static} \ |
bba13cd2 | 109 | --disable-stb-image \ |
9c3fbf92 | 110 | %{__enable_disable avif} \ |
bba13cd2 | 111 | --enable-avif-shared \ |
7e96a0d5 JB |
112 | --enable-bmp \ |
113 | --enable-gif \ | |
114 | --enable-jpg \ | |
115 | --enable-jpg-shared \ | |
9c3fbf92 | 116 | %{__enable_disable jxl} \ |
bba13cd2 | 117 | --enable-jxl-shared \ |
7e96a0d5 JB |
118 | --enable-lbm \ |
119 | --enable-pcx \ | |
120 | --enable-png \ | |
121 | --enable-png-shared \ | |
122 | --enable-pnm \ | |
bba13cd2 JP |
123 | --enable-qoi \ |
124 | --enable-svg \ | |
7e96a0d5 JB |
125 | --enable-tga \ |
126 | --enable-tif \ | |
127 | --enable-tif-shared \ | |
128 | --enable-webp \ | |
129 | --enable-webp-shared \ | |
130 | --enable-xcf \ | |
131 | --enable-xpm \ | |
132 | --enable-xv | |
133 | ||
134 | %{__make} | |
135 | ||
136 | %install | |
137 | rm -rf $RPM_BUILD_ROOT | |
138 | install -d $RPM_BUILD_ROOT%{_bindir} | |
139 | ||
140 | %{__make} install \ | |
141 | DESTDIR=$RPM_BUILD_ROOT | |
142 | ||
143 | install .libs/showimage $RPM_BUILD_ROOT%{_bindir}/sdl2show | |
144 | ||
145 | # obsoleted by pkg-config | |
146 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/lib*.la | |
147 | ||
148 | %clean | |
149 | rm -rf $RPM_BUILD_ROOT | |
150 | ||
151 | %post -p /sbin/ldconfig | |
152 | %postun -p /sbin/ldconfig | |
153 | ||
154 | %files | |
155 | %defattr(644,root,root,755) | |
bba13cd2 | 156 | %doc CHANGES.txt LICENSE.txt README.txt |
7e96a0d5 JB |
157 | %attr(755,root,root) %{_bindir}/sdl2show |
158 | %attr(755,root,root) %{_libdir}/libSDL2_image-2.0.so.*.*.* | |
159 | %attr(755,root,root) %ghost %{_libdir}/libSDL2_image-2.0.so.0 | |
160 | ||
161 | %files devel | |
162 | %defattr(644,root,root,755) | |
163 | %attr(755,root,root) %{_libdir}/libSDL2_image.so | |
bba13cd2 | 164 | %{_libdir}/cmake/SDL2_image |
7e96a0d5 JB |
165 | %{_includedir}/SDL2/SDL_image.h |
166 | %{_pkgconfigdir}/SDL2_image.pc | |
167 | ||
a0a957da | 168 | %if %{with static_libs} |
7e96a0d5 JB |
169 | %files static |
170 | %defattr(644,root,root,755) | |
171 | %{_libdir}/libSDL2_image.a | |
a0a957da | 172 | %endif |