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