]>
Commit | Line | Data |
---|---|---|
6d35269c JB |
1 | # NOTE: there is intel SSE optimization available but with no runtime detection; |
2 | # it's enabled based on compiler flags (-msse*, either explicit or implied by -march=) | |
35ee6d14 | 3 | # |
8a4e3b5c JB |
4 | # Conditional build: |
5 | %bcond_without tests # don't perform "make check" | |
6 | %bcond_without default_libpng # don't use this libpng as default system libpng | |
37fb7a19 | 7 | %bcond_without static_libs # static library |
8a4e3b5c | 8 | # |
8fd1819e | 9 | %define apng_version %{version} |
40d4fb99 | 10 | |
714c2522 | 11 | Summary: PNG library |
c09c3034 ER |
12 | Summary(de.UTF-8): PNG-Library |
13 | Summary(es.UTF-8): Biblioteca PNG | |
14 | Summary(fr.UTF-8): Librarie PNG | |
15 | Summary(pl.UTF-8): Biblioteka PNG | |
16 | Summary(pt_BR.UTF-8): Biblioteca PNG | |
17 | Summary(tr.UTF-8): PNG kitaplığı | |
714c2522 | 18 | Name: libpng |
8fd1819e | 19 | Version: 1.6.43 |
40d4fb99 | 20 | Release: 1 |
62e09fb4 | 21 | Epoch: 2 |
1b0fd02b | 22 | License: distributable |
714c2522 | 23 | Group: Libraries |
6606c31a | 24 | Source0: https://downloads.sourceforge.net/libpng/%{name}-%{version}.tar.xz |
8fd1819e | 25 | # Source0-md5: 22b8362d16c3724eba9c1fb8d187320a |
f27b8873 | 26 | Patch0: https://downloads.sourceforge.net/libpng-apng/%{name}-%{apng_version}-apng.patch.gz |
8fd1819e | 27 | # Patch0-md5: fc21268c9c583c5d2e7ead8a9ec17240 |
ac709a0a JB |
28 | Patch1: %{name}-pngminus.patch |
29 | Patch2: %{name}-drop-Llibdir.patch | |
bd250172 | 30 | URL: http://www.libpng.org/pub/png/libpng.html |
40d4fb99 | 31 | BuildRequires: rpmbuild(macros) >= 2.007 |
785c54df | 32 | BuildRequires: tar >= 1:1.22 |
7d2bdb5a | 33 | BuildRequires: xz >= 1:4.999.7 |
ae0ffb24 | 34 | BuildRequires: zlib-devel >= 1.2.9 |
2da42a2c | 35 | Provides: libpng(APNG) = 0.10 |
7f0d4dbb | 36 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
6b867543 | 37 | |
38 | %description | |
72f15a65 | 39 | The PNG library is a collection of routines used to create and |
40 | manipulate PNG format graphics files. The PNG format was designed as a | |
41 | replacement for GIF, with many improvements and extensions. | |
6b867543 | 42 | |
2bdf363b | 43 | %description -l de.UTF-8 |
72f15a65 | 44 | Die PNG-Library ist eine Sammlung von Routinen zum Erstellen und |
45 | Bearbeiten von Grafiken im PNG-Format. Das PNG-Format wurde als Ersatz | |
2bdf363b | 46 | für GIF entwickelt und enthält viele Verbesserungen und Erweiterungen. |
fe532919 | 47 | |
2bdf363b JR |
48 | %description -l es.UTF-8 |
49 | Esta biblioteca es una colección de rutinas para crear y manipular | |
50 | archivos gráficos en el formato PNG. Este formato fue proyectado para | |
0fc3dbd2 | 51 | substituir el |
52 | ||
2bdf363b JR |
53 | %description -l fr.UTF-8 |
54 | La librairie PNG est un ensemble de routines utilisées pour créer et | |
55 | manipuler des fichiers graphiques au format PNG. Le format PNG a été | |
56 | élaboré pour remplacer le GIF, avec de nombreuses améliorations et | |
fe532919 | 57 | extensions. |
58 | ||
2bdf363b JR |
59 | %description -l pl.UTF-8 |
60 | Biblioteki PNG są kolekcją form używanych do tworzenia i manipulowania | |
61 | plikami w formacie graficznym PNG. Format ten został stworzony jako | |
62 | zamiennik dla formatu GIF, z wieloma rozszerzeniami i nowościami. | |
4ef53418 | 63 | |
2bdf363b JR |
64 | %description -l pt_BR.UTF-8 |
65 | Esta biblioteca é uma coleção de rotinas para criar e manipular | |
66 | arquivos gráficos no formato PNG. Este formato foi projetado para | |
67 | substituir o formato GIF, com extensões e melhorias. | |
0fc3dbd2 | 68 | |
2bdf363b JR |
69 | %description -l tr.UTF-8 |
70 | PNG kitaplığı, PNG formatındaki resim dosyalarını işlemeye yönelik | |
71 | yordamları içerir. PNG, GIF formatının yerini almak üzere tasarlanmış | |
72 | bir resim formatıdır. | |
fe532919 | 73 | |
6b867543 | 74 | %package devel |
4ef53418 | 75 | Summary: Header files for libpng |
c09c3034 ER |
76 | Summary(de.UTF-8): libpng Headers |
77 | Summary(es.UTF-8): Archivos de inclusión y bibliotecas estáticas | |
78 | Summary(fr.UTF-8): en-têtes et bibliothèques statiques | |
79 | Summary(pl.UTF-8): Pliki nagłówkowe libpng | |
80 | Summary(pt_BR.UTF-8): Arquivos de inclusão e bibliotecas estáticas | |
81 | Summary(tr.UTF-8): başlık dosyaları ve statik kitaplıklar | |
714c2522 | 82 | Group: Development/Libraries |
6fc2747d | 83 | Requires: %{name} = %{epoch}:%{version}-%{release} |
9b72b791 | 84 | Requires: zlib-devel |
2da42a2c | 85 | Provides: libpng(APNG)-devel = 0.10 |
2cfb55ca | 86 | Conflicts: libpng < 1.0.15 |
6b867543 | 87 | |
88 | %description devel | |
4ef53418 JB |
89 | The header files are only needed for development of programs using the |
90 | PNG library. | |
6b867543 | 91 | |
2bdf363b | 92 | %description devel -l de.UTF-8 |
4ef53418 | 93 | Die Header-Dateien werden nur zur Entwicklung von Programmen mit der |
2bdf363b | 94 | PNG-Library benötigt. |
6b867543 | 95 | |
2bdf363b JR |
96 | %description devel -l es.UTF-8 |
97 | Archivos de inclusión y bibliotecas estáticas que son necesarios | |
0fc3dbd2 | 98 | solamente para el desarrollo de programas que usan la biblioteca PNG. |
99 | ||
2bdf363b | 100 | %description devel -l fr.UTF-8 |
72f15a65 | 101 | Fichiers d'en-tete et les librairies qui sont requis seulement pour le |
2bdf363b | 102 | développement avec la librairie PNG. |
6b867543 | 103 | |
2bdf363b JR |
104 | %description devel -l pl.UTF-8 |
105 | W pakiecie tym znajdują się pliki nagłówkowe, przeznaczone dla | |
106 | programistów używających bibliotek PNG. | |
0fc3dbd2 | 107 | |
2bdf363b JR |
108 | %description devel -l pt_BR.UTF-8 |
109 | Arquivos de inclusão e bibliotecas estáticas que são necessários | |
0fc3dbd2 | 110 | somente para o desenvolvimento de programas que usam a biblioteca PNG. |
111 | ||
2bdf363b JR |
112 | %description devel -l tr.UTF-8 |
113 | PNG kitaplığını kullanan programlar geliştirmek için gereken | |
114 | kitaplıklar ve başlık dosyaları. | |
6b867543 | 115 | |
c381bb48 | 116 | %package static |
00bce163 AM |
117 | Summary: Static PNG library |
118 | Summary(de.UTF-8): Statisch PNG Library | |
119 | Summary(pl.UTF-8): Biblioteka statyczna PNG | |
c09c3034 | 120 | Summary(pt_BR.UTF-8): Bibliotecas estáticas para desenvolvimento com libpng |
714c2522 | 121 | Group: Development/Libraries |
6fc2747d | 122 | Requires: %{name}-devel = %{epoch}:%{version}-%{release} |
2da42a2c | 123 | Provides: libpng(APNG)-static = 0.10 |
6b867543 | 124 | |
125 | %description static | |
00bce163 | 126 | Static PNG library. |
4ef53418 | 127 | |
2bdf363b | 128 | %description static -l de.UTF-8 |
00bce163 | 129 | Statisch PNG Library. |
6b867543 | 130 | |
2bdf363b | 131 | %description static -l pl.UTF-8 |
00bce163 | 132 | Biblioteka statyczna PNG. |
6b867543 | 133 | |
2bdf363b JR |
134 | %description static -l pt_BR.UTF-8 |
135 | Bibliotecas estáticas para desenvolvimento com libpng. | |
0fc3dbd2 | 136 | |
0f88fd3d | 137 | %package progs |
138 | Summary: libpng utility programs | |
c09c3034 | 139 | Summary(pl.UTF-8): Narzędzia do plików PNG |
0f88fd3d | 140 | Group: Applications/Graphics |
3591ed11 | 141 | Requires: %{name} = %{epoch}:%{version}-%{release} |
0f88fd3d | 142 | |
143 | %description progs | |
d6af8901 JB |
144 | This package contains utility programs to convert PNG files to and |
145 | from PNM files. | |
0f88fd3d | 146 | |
2bdf363b JR |
147 | %description progs -l pl.UTF-8 |
148 | Narzędzia do konwersji plików PNG z lub do plików PNM. | |
c381bb48 | 149 | |
6b867543 | 150 | %prep |
c64766dd | 151 | %setup -q |
133d32e3 | 152 | %patch0 -p1 |
8a4e3b5c | 153 | %patch1 -p1 |
ac709a0a | 154 | %patch2 -p1 |
0f88fd3d | 155 | |
6b867543 | 156 | %build |
6d35269c | 157 | %configure \ |
37fb7a19 | 158 | %{__enable_disable static_libs static} \ |
40d4fb99 JP |
159 | %ifarch %{arm} aarch64 |
160 | %ifarch %{arm_with_neon} | |
161 | --enable-arm-neon=yes \ | |
162 | %else | |
6d35269c JB |
163 | --enable-arm-neon=check \ |
164 | %endif | |
40d4fb99 | 165 | %endif |
6d35269c JB |
166 | %ifarch mipsel mips64el |
167 | --enable-mips-msa=check \ | |
168 | %endif | |
169 | %ifarch ppc ppc64 | |
170 | --enable-powerpc-vsx=check | |
171 | %endif | |
172 | ||
3f01bbdf | 173 | %{__make} |
0b50ec85 | 174 | |
7a3617f7 | 175 | %{__make} -C contrib/pngminus \ |
2dabdc19 | 176 | LIBPATH=%{_libdir} \ |
24540946 | 177 | CC="%{__cc}" \ |
0b500a84 AM |
178 | OPT_FLAGS="%{rpmcppflags} %{rpmcflags}" |
179 | ||
7a3617f7 | 180 | %{?with_tests:%{__make} -j1 check} |
6b867543 | 181 | |
182 | %install | |
183 | rm -rf $RPM_BUILD_ROOT | |
00bce163 | 184 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} |
6b867543 | 185 | |
e75b4e8f | 186 | %{__make} install \ |
3f01bbdf | 187 | DESTDIR=$RPM_BUILD_ROOT |
6b867543 | 188 | |
0f88fd3d | 189 | install contrib/pngminus/{png2pnm,pnm2png} $RPM_BUILD_ROOT%{_bindir} |
d5026e25 | 190 | install example.c $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} |
6b867543 | 191 | |
8a4e3b5c JB |
192 | %if %{without default_libpng} |
193 | %{__rm} $RPM_BUILD_ROOT%{_bindir}/{libpng-config,pn?2pn?} \ | |
37fb7a19 JP |
194 | $RPM_BUILD_ROOT%{_libdir}/libpng.{so,la} \ |
195 | %{?with_static_libs:$RPM_BUILD_ROOT%{_libdir}/libpng.a} \ | |
8a4e3b5c JB |
196 | $RPM_BUILD_ROOT%{_includedir}/png*.h \ |
197 | $RPM_BUILD_ROOT%{_pkgconfigdir}/libpng.pc \ | |
198 | $RPM_BUILD_ROOT%{_mandir}/man[35]/*png* | |
199 | %endif | |
200 | ||
83a00d5e JB |
201 | %clean |
202 | rm -rf $RPM_BUILD_ROOT | |
332660b0 | 203 | |
204 | %post -p /sbin/ldconfig | |
6b867543 | 205 | %postun -p /sbin/ldconfig |
206 | ||
207 | %files | |
e987a93d | 208 | %defattr(644,root,root,755) |
00bce163 | 209 | %doc ANNOUNCE CHANGES LICENSE README TODO |
d81fa4a7 JB |
210 | %attr(755,root,root) %{_libdir}/libpng16.so.*.*.* |
211 | %attr(755,root,root) %ghost %{_libdir}/libpng16.so.16 | |
6b867543 | 212 | |
213 | %files devel | |
969c9518 | 214 | %defattr(644,root,root,755) |
8a4e3b5c | 215 | %doc libpng-manual.txt |
d81fa4a7 JB |
216 | %attr(755,root,root) %{_bindir}/libpng16-config |
217 | %attr(755,root,root) %{_libdir}/libpng16.so | |
218 | %{_libdir}/libpng16.la | |
219 | %{_includedir}/libpng16 | |
220 | %{_pkgconfigdir}/libpng16.pc | |
8a4e3b5c JB |
221 | %{_examplesdir}/%{name}-%{version} |
222 | %if %{with default_libpng} | |
fa2428a4 | 223 | %attr(755,root,root) %{_bindir}/libpng-config |
fa2428a4 | 224 | %attr(755,root,root) %{_libdir}/libpng.so |
00bce163 | 225 | %{_libdir}/libpng.la |
fa2428a4 | 226 | %{_pkgconfigdir}/libpng.pc |
fa2428a4 | 227 | %{_includedir}/png*.h |
00bce163 AM |
228 | %{_mandir}/man3/libpng.3* |
229 | %{_mandir}/man3/libpngpf.3* | |
230 | %{_mandir}/man5/png.5* | |
8a4e3b5c | 231 | %endif |
6b867543 | 232 | |
37fb7a19 | 233 | %if %{with static_libs} |
6b867543 | 234 | %files static |
e987a93d | 235 | %defattr(644,root,root,755) |
d81fa4a7 | 236 | %{_libdir}/libpng16.a |
8a4e3b5c | 237 | %if %{with default_libpng} |
fa2428a4 | 238 | %{_libdir}/libpng.a |
8a4e3b5c | 239 | %endif |
37fb7a19 | 240 | %endif |
0f88fd3d | 241 | |
8a4e3b5c | 242 | %if %{with default_libpng} |
0f88fd3d | 243 | %files progs |
244 | %defattr(644,root,root,755) | |
00bce163 | 245 | %attr(755,root,root) %{_bindir}/png2pnm |
38b968e3 AM |
246 | %attr(755,root,root) %{_bindir}/pngfix |
247 | %attr(755,root,root) %{_bindir}/png-fix-itxt | |
00bce163 | 248 | %attr(755,root,root) %{_bindir}/pnm2png |
8a4e3b5c | 249 | %endif |