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