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