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