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