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