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