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