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