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