]> git.pld-linux.org Git - packages/gd.git/blob - gd.spec
- updated to 2.3.0 (upstream fixes for CVE-2018-5711 CVE-2018-14553 CVE-2018-1000222...
[packages/gd.git] / gd.spec
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_without  raqm            # RAQM complex text layout support
6 %bcond_with     sse             # SSE math on ix86
7 %bcond_without  xpm             # XPM support (requires X11 libs)
8 %bcond_without  tests           # "make check"
9 #
10 %ifarch pentium3 pentium4
11 %define with_sse        1
12 %endif
13 Summary:        Library for PNG, JPEG creation
14 Summary(es.UTF-8):      Biblioteca para manipulación de imágenes
15 Summary(pl.UTF-8):      Biblioteka do tworzenia grafiki w formacie PNG, JPEG
16 Summary(pt_BR.UTF-8):   Biblioteca para manipulação de imagens
17 Name:           gd
18 Version:        2.3.0
19 Release:        1
20 License:        BSD-like
21 Group:          Libraries
22 #Source0Download: https://github.com/libgd/libgd/releases
23 Source0:        https://github.com/libgd/libgd/releases/download/%{name}-%{version}/lib%{name}-%{version}.tar.xz
24 # Source0-md5:  44e052abf0914bf1b93ceb1af564766f
25 Patch0:         %{name}-fontpath.patch
26 Patch1:         %{name}-missing.patch
27 Patch2:         %{name}-loop.patch
28 URL:            https://libgd.github.io/
29 BuildRequires:  autoconf >= 2.54
30 BuildRequires:  automake
31 %{?with_fontconfig:BuildRequires:       fontconfig-devel}
32 BuildRequires:  freetype-devel >= 1:2.1.10
33 BuildRequires:  gettext-tools
34 %{?with_libimagequant:BuildRequires:    libimagequant-devel}
35 BuildRequires:  libjpeg-devel
36 BuildRequires:  libpng-devel >= 2:1.4.0
37 %{?with_raqm:BuildRequires:     libraqm-devel}
38 BuildRequires:  libtiff-devel >= 4
39 BuildRequires:  libtool >= 2:2
40 BuildRequires:  libwebp-devel
41 BuildRequires:  pkgconfig
42 BuildRequires:  sed >= 4
43 BuildRequires:  tar >= 1:1.22
44 %{?with_xpm:BuildRequires:      xorg-lib-libXpm-devel}
45 BuildRequires:  xz
46 BuildRequires:  zlib-devel
47 Requires:       freetype >= 1:2.1.10
48 Provides:       gd(gif) = %{version}-%{release}
49 # versioned by php version rotate_from_php code comes from
50 Provides:       gd(imagerotate) = 5.2.0
51 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
52
53 %description
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
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).
62
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
67 programa de dibujo; es una biblioteca.
68
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
74 formatach PNG, JPEG, GIF i WBMP. PNG jest zwartym formatem z
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).
79
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.
85
86 %package devel
87 Summary:        Development part of the GD library
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
91 Group:          Development/Libraries
92 Requires:       %{name} = %{version}-%{release}
93 Requires:       fontconfig-devel
94 Requires:       freetype-devel >= 1:2.1.10
95 %{?with_libimagequant:Requires: libimagequant-devel}
96 Requires:       libjpeg-devel
97 Requires:       libpng-devel
98 %{?with_raqm:Requires:  libraqm-devel}
99 Requires:       libtiff-devel >= 4
100 Requires:       libwebp-devel
101 %{?with_xpm:Requires:   xorg-lib-libXpm-devel}
102 Requires:       zlib-devel
103 Provides:       gd-devel(gif) = %{version}-%{release}
104 Provides:       gd-devel(imagerotate) = 5.2.0
105
106 %description devel
107 This package contains the files needed for development of programs
108 linked against GD.
109
110 %description devel -l es.UTF-8
111 Este paquete contiene los archivos de inclusión y las bibliotecas
112 necesarias para desarrollar programas usando gd.
113
114 %description devel -l pl.UTF-8
115 Pakiet ten zawiera pliki potrzebne do rozwoju programów korzystających
116 z biblioteki GD.
117
118 %description devel -l pt_BR.UTF-8
119 Este pacote contém os arquivos de inclusão e as bibliotecas
120 necessárias para desenvolver programas usando gd.
121
122 %package static
123 Summary:        Static GD library
124 Summary(pl.UTF-8):      Statyczna biblioteka GD
125 Summary(pt_BR.UTF-8):   Bibliotecas estáticas para desenvolvimento com libgd
126 Group:          Development/Libraries
127 Requires:       %{name}-devel = %{version}-%{release}
128 Provides:       gd-static(gif) = %{version}-%{release}
129 Provides:       gd-static(imagerotate) = 5.2.0
130
131 %description static
132 This package contains static gd library.
133
134 %description static -l pl.UTF-8
135 Ten pakiet zawiera statyczną bibliotekę gd.
136
137 %description static -l pt_BR.UTF-8
138 Este pacote contem bibliotecas estáticas para desenvolvimento com
139 libgd.
140
141 %package progs
142 Summary:        Utility programs that use libgd
143 Summary(es.UTF-8):      Programas utilitarios libgd
144 Summary(pl.UTF-8):      Narzędzia używające libgd
145 Summary(pt_BR.UTF-8):   Programas utilitários libgd
146 Group:          Applications/Graphics
147 Requires:       %{name} = %{version}-%{release}
148
149 %description progs
150 These are utility programs supplied with gd, the image manipulation
151 library. The libgd-progs package contains a group of scripts for
152 manipulating the graphics files in formats which are supported by the
153 libgd library.
154
155 %description progs -l pl.UTF-8
156 Ten pakiet zawiera programy używające biblioteki gd, służące do
157 obróbki plików graficznych w formatach obsługiwanych przez libgd.
158
159 %description progs -l pt_BR.UTF-8
160 Este pacote inclui vários utilitários para manipulação de arquivos gd
161 para uso pelos programas que usam a libgd.
162
163 %prep
164 %setup -q -n libgd-%{version}
165 %patch0 -p1
166 %patch1 -p1
167 %patch2 -p1
168
169 chmod 755 config/getlib.sh
170 # hack to avoid inclusion of -s in --ldflags
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
174
175 %build
176 %{__libtoolize}
177 %{__aclocal} -I m4
178 %{__automake}
179 %{__autoheader}
180 %{__autoconf}
181 %ifarch %{ix86}
182 %if %{with sse}
183 CFLAGS="%{rpmcflags} -msse -mfpmath=sse"
184 %endif
185 %endif
186 %configure \
187         %{!?with_fontconfig:--without-fontconfig} \
188         %{!?with_libimagequant:--without-liq} \
189         %{!?with_raqm:--without-raqm} \
190         %{!?with_xpm:--without-xpm}
191 %{__make}
192
193 %if %{with tests}
194 %ifarch %{ix86}
195 # https://github.com/libgd/libgd/issues/359
196 XFAIL_TESTS="$XFAIL_TESTS gdimagegrayscale/basic"
197 %if %{without sse}
198 # 387 arithmetic is inexact, https://github.com/libgd/libgd/issues/242
199 XFAIL_TESTS="$XFAIL_TESTS gdimagecopyresampled/bug00201"
200 %endif
201 %endif
202 %if %{with raqm}
203 # https://github.com/libgd/libgd/issues/613
204 XFAIL_TESTS="$XFAIL_TESTS gdimagestringft/gdimagestringft_bbox"
205 %endif
206 export XFAIL_TESTS
207 %{__make} check
208 %endif
209
210 %install
211 rm -rf $RPM_BUILD_ROOT
212
213 %{__make} install \
214         DESTDIR=$RPM_BUILD_ROOT
215
216 %clean
217 rm -rf $RPM_BUILD_ROOT
218
219 %post   -p /sbin/ldconfig
220 %postun -p /sbin/ldconfig
221
222 %files
223 %defattr(644,root,root,755)
224 %doc CONTRIBUTORS COPYING README.md
225 %attr(755,root,root) %{_libdir}/libgd.so.*.*.*
226 %attr(755,root,root) %ghost %{_libdir}/libgd.so.3
227
228 %files devel
229 %defattr(644,root,root,755)
230 %attr(755,root,root) %{_libdir}/libgd.so
231 %{_libdir}/libgd.la
232 %{_includedir}/entities.h
233 %{_includedir}/gd*.h
234 %{_pkgconfigdir}/gdlib.pc
235
236 %files static
237 %defattr(644,root,root,755)
238 %{_libdir}/libgd.a
239
240 %files progs
241 %defattr(644,root,root,755)
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.065255 seconds and 4 git commands to generate.