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