]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_without fontconfig # fontconfig support | |
4 | %bcond_with libimagequant # LIQ quantization method support (breaks transparency in TrueColor->palette conversion) | |
5 | %bcond_with sse # SSE math on ix86 | |
6 | %bcond_without xpm # XPM support (requires X11 libs) | |
7 | %bcond_without tests # "make check" | |
8 | # | |
9 | %ifarch pentium3 pentium4 | |
10 | %define with_sse 1 | |
11 | %endif | |
12 | Summary: Library for PNG, JPEG creation | |
13 | Summary(es.UTF-8): Biblioteca para manipulación de imágenes | |
14 | Summary(pl.UTF-8): Biblioteka do tworzenia grafiki w formacie PNG, JPEG | |
15 | Summary(pt_BR.UTF-8): Biblioteca para manipulação de imagens | |
16 | Name: gd | |
17 | Version: 2.2.5 | |
18 | Release: 2 | |
19 | License: BSD-like | |
20 | Group: Libraries | |
21 | #Source0Download: https://github.com/libgd/libgd/releases | |
22 | Source0: https://github.com/libgd/libgd/releases/download/%{name}-%{version}/lib%{name}-%{version}.tar.xz | |
23 | # Source0-md5: 8d8d6a6189513ecee6e893b1fb109bf8 | |
24 | Patch0: %{name}-fontpath.patch | |
25 | Patch2: %{name}-loop.patch | |
26 | Patch3: %{name}-liq.patch | |
27 | URL: https://libgd.github.io/ | |
28 | BuildRequires: autoconf >= 2.54 | |
29 | BuildRequires: automake | |
30 | %{?with_fontconfig:BuildRequires: fontconfig-devel} | |
31 | BuildRequires: freetype-devel >= 1:2.1.10 | |
32 | BuildRequires: gettext-tools | |
33 | %{?with_libimagequant:BuildRequires: libimagequant-devel} | |
34 | BuildRequires: libjpeg-devel | |
35 | BuildRequires: libpng-devel >= 2:1.4.0 | |
36 | BuildRequires: libtiff-devel >= 4 | |
37 | BuildRequires: libtool >= 2:2 | |
38 | BuildRequires: libwebp-devel | |
39 | BuildRequires: pkgconfig | |
40 | BuildRequires: sed >= 4 | |
41 | BuildRequires: tar >= 1:1.22 | |
42 | %{?with_xpm:BuildRequires: xorg-lib-libXpm-devel} | |
43 | BuildRequires: xz | |
44 | BuildRequires: zlib-devel | |
45 | Requires: freetype >= 1:2.1.10 | |
46 | Provides: gd(gif) = %{version}-%{release} | |
47 | # versioned by php version rotate_from_php code comes from | |
48 | Provides: gd(imagerotate) = 5.2.0 | |
49 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
50 | ||
51 | %description | |
52 | gd is the image manipulating library. It was created to allow graphs, | |
53 | charts and the like to be generated on the fly for use on the World | |
54 | wide Web, but is useful for any application in which custom images are | |
55 | useful. It is not a paint program; it is a library. gd library creates | |
56 | PNG, JPEG, GIF and WBMP images. PNG is a more compact format, and full | |
57 | compression is available. JPEG works well with photographic images, | |
58 | and is still more compatible with the major Web browsers than even PNG | |
59 | is. WBMP is intended for wireless devices (not regular web browsers). | |
60 | ||
61 | %description -l es.UTF-8 | |
62 | Esta es la biblioteca gd para el manejo de imágenes. Fue creada para | |
63 | uso en la Web, creando gráficos automáticamente. Pero es útil para | |
64 | cualquier programa que necesite de imágenes personalizados. No es un | |
65 | programa de dibujo; es una biblioteca. | |
66 | ||
67 | %description -l pl.UTF-8 | |
68 | gd to biblioteka do obróbki obrazów. Została stworzona, aby umożliwić | |
69 | dynamiczne generowanie wykresów i podobnych rzeczy na potrzeby WWW, | |
70 | ale może być przydatna także dla każdej aplikacji tworzącej własne | |
71 | obrazy. Biblioteka ta pozwala na tworzenie plików graficznych w | |
72 | formatach PNG, JPEG, GIF i WBMP. PNG jest zwartym formatem z | |
73 | bezstratną kompresją. JPEG dobrze nadaje się do obrazów | |
74 | fotograficznych i jest obsługiwany nawet przez więcej przeglądarek WWW | |
75 | niż PNG. WBMP jest przeznaczony dla urządzeń bezprzewodowych (a nie | |
76 | zwykłych przeglądarek WWW). | |
77 | ||
78 | %description -l pt_BR.UTF-8 | |
79 | Esta é a biblioteca gd para manipulação de imagens. Ela foi criada | |
80 | para uso na Web, gerando gráficos automaticamente. Mas é útil para | |
81 | qualquer programa que precise de imagens personalizados. Não é um | |
82 | programa de desenho; é uma biblioteca. | |
83 | ||
84 | %package devel | |
85 | Summary: Development part of the GD library | |
86 | Summary(es.UTF-8): Archivos de inclusión y bibliotecas para desarrollar programas usando gd | |
87 | Summary(pl.UTF-8): Część biblioteki GD przeznaczona dla developerów | |
88 | Summary(pt_BR.UTF-8): Arquivos de inclusão e bibliotecas para desenvolver programas usando gd | |
89 | Group: Development/Libraries | |
90 | Requires: %{name} = %{version}-%{release} | |
91 | Requires: fontconfig-devel | |
92 | Requires: freetype-devel >= 1:2.1.10 | |
93 | %{?with_libimagequant:Requires: libimagequant-devel} | |
94 | Requires: libjpeg-devel | |
95 | Requires: libpng-devel | |
96 | Requires: libtiff-devel >= 4 | |
97 | Requires: libwebp-devel | |
98 | %{?with_xpm:Requires: xorg-lib-libXpm-devel} | |
99 | Requires: zlib-devel | |
100 | Provides: gd-devel(gif) = %{version}-%{release} | |
101 | Provides: gd-devel(imagerotate) = 5.2.0 | |
102 | ||
103 | %description devel | |
104 | This package contains the files needed for development of programs | |
105 | linked against GD. | |
106 | ||
107 | %description devel -l es.UTF-8 | |
108 | Este paquete contiene los archivos de inclusión y las bibliotecas | |
109 | necesarias para desarrollar programas usando gd. | |
110 | ||
111 | %description devel -l pl.UTF-8 | |
112 | Pakiet ten zawiera pliki potrzebne do rozwoju programów korzystających | |
113 | z biblioteki GD. | |
114 | ||
115 | %description devel -l pt_BR.UTF-8 | |
116 | Este pacote contém os arquivos de inclusão e as bibliotecas | |
117 | necessárias para desenvolver programas usando gd. | |
118 | ||
119 | %package static | |
120 | Summary: Static GD library | |
121 | Summary(pl.UTF-8): Statyczna biblioteka GD | |
122 | Summary(pt_BR.UTF-8): Bibliotecas estáticas para desenvolvimento com libgd | |
123 | Group: Development/Libraries | |
124 | Requires: %{name}-devel = %{version}-%{release} | |
125 | Provides: gd-static(gif) = %{version}-%{release} | |
126 | Provides: gd-static(imagerotate) = 5.2.0 | |
127 | ||
128 | %description static | |
129 | This package contains static gd library. | |
130 | ||
131 | %description static -l pl.UTF-8 | |
132 | Ten pakiet zawiera statyczną bibliotekę gd. | |
133 | ||
134 | %description static -l pt_BR.UTF-8 | |
135 | Este pacote contem bibliotecas estáticas para desenvolvimento com | |
136 | libgd. | |
137 | ||
138 | %package progs | |
139 | Summary: Utility programs that use libgd | |
140 | Summary(es.UTF-8): Programas utilitarios libgd | |
141 | Summary(pl.UTF-8): Narzędzia używające libgd | |
142 | Summary(pt_BR.UTF-8): Programas utilitários libgd | |
143 | Group: Applications/Graphics | |
144 | Requires: %{name} = %{version}-%{release} | |
145 | ||
146 | %description progs | |
147 | These are utility programs supplied with gd, the image manipulation | |
148 | library. The libgd-progs package contains a group of scripts for | |
149 | manipulating the graphics files in formats which are supported by the | |
150 | libgd library. | |
151 | ||
152 | %description progs -l pl.UTF-8 | |
153 | Ten pakiet zawiera programy używające biblioteki gd, służące do | |
154 | obróbki plików graficznych w formatach obsługiwanych przez libgd. | |
155 | ||
156 | %description progs -l pt_BR.UTF-8 | |
157 | Este pacote inclui vários utilitários para manipulação de arquivos gd | |
158 | para uso pelos programas que usam a libgd. | |
159 | ||
160 | %prep | |
161 | %setup -q -n libgd-%{version} | |
162 | %patch0 -p1 | |
163 | %patch2 -p1 | |
164 | %patch3 -p1 | |
165 | ||
166 | # hack to avoid inclusion of -s in --ldflags | |
167 | %{__sed} -i -e 's,@LDFLAGS@,,g' config/gdlib-config.in | |
168 | # disable error caused by subdir-objects warning in automake 1.14 | |
169 | %{__sed} -i -e '/AM_INIT_AUTOMAKE/s/-Werror//' configure.ac | |
170 | ||
171 | %build | |
172 | %{__libtoolize} | |
173 | %{__aclocal} | |
174 | %{__automake} | |
175 | %{__autoheader} | |
176 | %{__autoconf} | |
177 | %ifarch %{ix86} | |
178 | %if %{with sse} | |
179 | CFLAGS="%{rpmcflags} -msse -mfpmath=sse" | |
180 | %endif | |
181 | %endif | |
182 | %configure \ | |
183 | %{!?with_fontconfig:--without-fontconfig} \ | |
184 | %{!?with_libimagequant:--without-liq} \ | |
185 | %{!?with_xpm:--without-xpm} | |
186 | %{__make} | |
187 | ||
188 | %if %{with tests} | |
189 | %ifarch %{ix86} | |
190 | # https://github.com/libgd/libgd/issues/359 | |
191 | XFAIL_TESTS="$XFAIL_TESTS gdimagegrayscale/basic" | |
192 | %if %{without sse} | |
193 | # 387 arithmetic is inexact, https://github.com/libgd/libgd/issues/242 | |
194 | XFAIL_TESTS="$XFAIL_TESTS gdimagecopyresampled/bug00201 gdimagerotate/bug00067" | |
195 | %endif | |
196 | %endif | |
197 | export XFAIL_TESTS | |
198 | %{__make} check | |
199 | %endif | |
200 | ||
201 | %install | |
202 | rm -rf $RPM_BUILD_ROOT | |
203 | ||
204 | %{__make} install \ | |
205 | DESTDIR=$RPM_BUILD_ROOT | |
206 | ||
207 | %clean | |
208 | rm -rf $RPM_BUILD_ROOT | |
209 | ||
210 | %post -p /sbin/ldconfig | |
211 | %postun -p /sbin/ldconfig | |
212 | ||
213 | %files | |
214 | %defattr(644,root,root,755) | |
215 | %doc CONTRIBUTORS COPYING README.md | |
216 | %attr(755,root,root) %{_libdir}/libgd.so.*.*.* | |
217 | %attr(755,root,root) %ghost %{_libdir}/libgd.so.3 | |
218 | ||
219 | %files devel | |
220 | %defattr(644,root,root,755) | |
221 | %attr(755,root,root) %{_bindir}/gdlib-config | |
222 | %attr(755,root,root) %{_libdir}/libgd.so | |
223 | %{_libdir}/libgd.la | |
224 | %{_includedir}/entities.h | |
225 | %{_includedir}/gd*.h | |
226 | %{_pkgconfigdir}/gdlib.pc | |
227 | ||
228 | %files static | |
229 | %defattr(644,root,root,755) | |
230 | %{_libdir}/libgd.a | |
231 | ||
232 | %files progs | |
233 | %defattr(644,root,root,755) | |
234 | %attr(755,root,root) %{_bindir}/annotate | |
235 | %attr(755,root,root) %{_bindir}/bdftogd | |
236 | %attr(755,root,root) %{_bindir}/gd2copypal | |
237 | %attr(755,root,root) %{_bindir}/gd2togif | |
238 | %attr(755,root,root) %{_bindir}/gd2topng | |
239 | %attr(755,root,root) %{_bindir}/gdcmpgif | |
240 | %attr(755,root,root) %{_bindir}/gdparttopng | |
241 | %attr(755,root,root) %{_bindir}/gdtopng | |
242 | %attr(755,root,root) %{_bindir}/giftogd2 | |
243 | %attr(755,root,root) %{_bindir}/pngtogd | |
244 | %attr(755,root,root) %{_bindir}/pngtogd2 | |
245 | %attr(755,root,root) %{_bindir}/webpng |