]>
Commit | Line | Data |
---|---|---|
74b560a3 ER |
1 | # TODO |
2 | # - perhaps should rename .spec to libgd and put programs to "gd" and libs to "libgd" package to match upstream project name? | |
0fe9ae1e | 3 | # |
f50b7aa0 | 4 | # Conditional build: |
2d7c1ea5 JB |
5 | %bcond_without fontconfig # without fontconfig support |
6 | %bcond_without xpm # without XPM support (requires X11 libs) | |
74b560a3 | 7 | |
a8cb6661 | 8 | Summary: Library for PNG, JPEG creation |
276f8082 ER |
9 | Summary(es.UTF-8): Biblioteca para manipulación de imágenes |
10 | Summary(pl.UTF-8): Biblioteka do tworzenia grafiki w formacie PNG, JPEG | |
11 | Summary(pt_BR.UTF-8): Biblioteca para manipulação de imagens | |
bf525458 | 12 | Name: gd |
74b560a3 ER |
13 | Version: 2.1.0 |
14 | Release: 0.rc1.1 | |
f5fd6f82 | 15 | License: BSD-like |
bf525458 | 16 | Group: Libraries |
74b560a3 ER |
17 | Source0: https://bitbucket.org/libgd/gd-libgd/downloads/lib%{name}-%{version}-rc1.tar.xz |
18 | # Source0-md5: 5dcd61ada3dea83e59f9fb972bccae55 | |
f0e7dffb | 19 | Patch0: %{name}-fontpath.patch |
e2fa0ae5 | 20 | Patch1: %{name}-rotate_from_php.patch |
0f4482da AM |
21 | Patch2: %{name}-2.0.33-BoxBound.patch |
22 | Patch3: %{name}-2.0.35-AALineThick.patch | |
23 | Patch4: %{name}-2.0.35-overflow.patch | |
24 | Patch5: %{name}-2.0.35-security3.patch | |
25 | Patch6: %{name}-loop.patch | |
e2fa0ae5 | 26 | URL: http://www.libgd.org/ |
91cfdb36 | 27 | BuildRequires: autoconf >= 2.54 |
b2f653fd | 28 | BuildRequires: automake |
2d7c1ea5 | 29 | %{?with_fontconfig:BuildRequires: fontconfig-devel} |
96d1fc3c | 30 | BuildRequires: freetype-devel >= 2.0 |
b099b9cd | 31 | BuildRequires: gettext-devel |
c0a00bcf | 32 | BuildRequires: libjpeg-devel |
0f4482da | 33 | BuildRequires: libpng-devel >= 2:1.4.0 |
2aa7d3df | 34 | BuildRequires: libtiff-devel |
6e5b17d6 | 35 | BuildRequires: libtool >= 1:1.4.3 |
74b560a3 | 36 | BuildRequires: tar >= 1:1.22 |
ab0e31ee | 37 | %{?with_xpm:BuildRequires: xorg-lib-libXpm-devel} |
74b560a3 | 38 | BuildRequires: xz |
96d1fc3c | 39 | BuildRequires: zlib-devel |
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 |
0fe9ae1e JB |
86 | Requires: freetype-devel >= 2.0 |
87 | Requires: libjpeg-devel | |
bd2f5b37 | 88 | Requires: libpng-devel |
ab0e31ee | 89 | %{?with_xpm:Requires: xorg-lib-libXpm-devel} |
bd2f5b37 | 90 | Requires: zlib-devel |
f0e7dffb | 91 | Provides: gd-devel(gif) = %{version}-%{release} |
04a4831a | 92 | Provides: gd-devel(imagerotate) = 5.2.0 |
cb954d5c | 93 | |
94 | %description devel | |
ad076400 | 95 | This package contains the files needed for development of programs |
96 | linked against GD. | |
cb954d5c | 97 | |
0a1333ac JR |
98 | %description devel -l es.UTF-8 |
99 | Este paquete contiene los archivos de inclusión y las bibliotecas | |
b2f4bbcd | 100 | necesarias para desarrollar programas usando gd. |
101 | ||
0a1333ac JR |
102 | %description devel -l pl.UTF-8 |
103 | Pakiet ten zawiera pliki potrzebne do rozwoju programów korzystających | |
76d4466d | 104 | z biblioteki GD. |
10511b86 | 105 | |
0a1333ac JR |
106 | %description devel -l pt_BR.UTF-8 |
107 | Este pacote contém os arquivos de inclusão e as bibliotecas | |
108 | necessárias para desenvolver programas usando gd. | |
b2f4bbcd | 109 | |
e4dcaf92 | 110 | %package static |
76d4466d | 111 | Summary: Static GD library |
276f8082 ER |
112 | Summary(pl.UTF-8): Statyczna biblioteka GD |
113 | Summary(pt_BR.UTF-8): Bibliotecas estáticas para desenvolvimento com libgd | |
76d4466d | 114 | Group: Development/Libraries |
f50b7aa0 | 115 | Requires: %{name}-devel = %{version}-%{release} |
f0e7dffb | 116 | Provides: gd-static(gif) = %{version}-%{release} |
04a4831a | 117 | Provides: gd-static(imagerotate) = 5.2.0 |
cb954d5c | 118 | |
777cca0f | 119 | %description static |
0fe9ae1e | 120 | This package contains static gd library. |
b2f4bbcd | 121 | |
0a1333ac JR |
122 | %description static -l pl.UTF-8 |
123 | Ten pakiet zawiera statyczną bibliotekę gd. | |
e4dcaf92 | 124 | |
0a1333ac JR |
125 | %description static -l pt_BR.UTF-8 |
126 | Este pacote contem bibliotecas estáticas para desenvolvimento com | |
b2f4bbcd | 127 | libgd. |
128 | ||
e81f3f85 | 129 | %package progs |
130 | Summary: Utility programs that use libgd | |
276f8082 ER |
131 | Summary(es.UTF-8): Programas utilitarios libgd |
132 | Summary(pl.UTF-8): Narzędzia używające libgd | |
133 | Summary(pt_BR.UTF-8): Programas utilitários libgd | |
e81f3f85 | 134 | Group: Applications/Graphics |
f50b7aa0 | 135 | Requires: %{name} = %{version}-%{release} |
e81f3f85 | 136 | |
137 | %description progs | |
0fe9ae1e | 138 | These are utility programs supplied with gd, the image manipulation |
26e69c10 | 139 | library. The libgd-progs package contains a group of scripts for |
140 | manipulating the graphics files in formats which are supported by the | |
141 | libgd library. | |
b2f4bbcd | 142 | |
0a1333ac JR |
143 | %description progs -l pl.UTF-8 |
144 | Ten pakiet zawiera programy używające biblioteki gd, służące do | |
145 | obróbki plików graficznych w formatach obsługiwanych przez libgd. | |
e81f3f85 | 146 | |
0a1333ac JR |
147 | %description progs -l pt_BR.UTF-8 |
148 | Este pacote inclui vários utilitários para manipulação de arquivos gd | |
b2f4bbcd | 149 | para uso pelos programas que usam a libgd. |
150 | ||
e4dcaf92 | 151 | %prep |
74b560a3 | 152 | %setup -q -n lib%{name}-%{version}-rc1 |
f0e7dffb | 153 | %patch0 -p1 |
74b560a3 ER |
154 | #%patch1 -p1 needs refreshing, is there a point? |
155 | cd src | |
156 | #%patch2 -p1 check | |
157 | #%patch3 -p1 check | |
158 | #%patch4 -p1 check | |
159 | #%patch5 -p1 check | |
160 | #%patch6 -p1 check if still needed | |
161 | cd - | |
11a3aa5c | 162 | |
6eb2ae1b | 163 | # hack to avoid inclusion of -s in --ldflags |
74b560a3 | 164 | %{__sed} -i~ -e 's,@LDFLAGS@,,g' config/gdlib-config.in |
5c31e4cb | 165 | |
76b282ae | 166 | # png_check_sig was replaced by png_sig_cmp in libpng |
74b560a3 | 167 | #%{__sed} -i~ -e 's/if (!png_check_sig (sig, 8))/if (png_sig_cmp(sig, 0, 8))/g' src/gd_png.c |
76b282ae | 168 | |
e4dcaf92 | 169 | %build |
dfe01bee | 170 | %{__libtoolize} |
6de95af7 | 171 | %{__aclocal} |
1b927a19 | 172 | %{__automake} |
f0e7dffb | 173 | %{__autoheader} |
1b927a19 | 174 | %{__autoconf} |
2d7c1ea5 JB |
175 | %configure \ |
176 | %{!?with_fontconfig:--without-fontconfig} \ | |
177 | %{!?with_xpm:--without-xpm} | |
b7b66453 | 178 | %{__make} |
1bb411e9 | 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) |
74b560a3 | 194 | %doc COPYING ChangeLog NEWS |
04a4831a | 195 | %attr(755,root,root) %{_libdir}/libgd.so.*.*.* |
45d93025 | 196 | %attr(755,root,root) %ghost %{_libdir}/libgd.so.2 |
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 | |
e4dcaf92 | 205 | |
b2f653fd | 206 | %files static |
207 | %defattr(644,root,root,755) | |
04a4831a | 208 | %{_libdir}/libgd.a |
e81f3f85 | 209 | |
210 | %files progs | |
211 | %defattr(644,root,root,755) | |
45d93025 JB |
212 | %attr(755,root,root) %{_bindir}/annotate |
213 | %attr(755,root,root) %{_bindir}/bdftogd | |
214 | %attr(755,root,root) %{_bindir}/gd2copypal | |
215 | %attr(755,root,root) %{_bindir}/gd2togif | |
216 | %attr(755,root,root) %{_bindir}/gd2topng | |
217 | %attr(755,root,root) %{_bindir}/gdcmpgif | |
218 | %attr(755,root,root) %{_bindir}/gdparttopng | |
219 | %attr(755,root,root) %{_bindir}/gdtopng | |
220 | %attr(755,root,root) %{_bindir}/giftogd2 | |
221 | %attr(755,root,root) %{_bindir}/pngtogd | |
222 | %attr(755,root,root) %{_bindir}/pngtogd2 | |
223 | %attr(755,root,root) %{_bindir}/webpng |