#
# Conditional build:
-%bcond_without xpm # without XPM support (requires X11 libs)
+%bcond_without fontconfig # without fontconfig support
+%bcond_without xpm # without XPM support (requires X11 libs)
#
Summary: Library for PNG, JPEG creation
Summary(es): Biblioteca para manipulación de imágenes
Summary(pl): Biblioteka do tworzenia grafiki w formacie PNG, JPEG
Summary(pt_BR): Biblioteca para manipulação de imagens
Name: gd
-Version: 2.0.28
-Release: 2
+Version: 2.0.33
+Release: 8
License: BSD-like
Group: Libraries
Source0: http://www.boutell.com/gd/http/%{name}-%{version}.tar.gz
-# Source0-md5: 14bf0b840b309ae8a29934a7a0743fd3
+# Source0-md5: be0a6d326cd8567e736fbc75df0a5c45
Patch0: %{name}-fontpath.patch
-Patch1: %{name}-no_ldflags_in_gdlib-config.patch
+Patch1: %{name}-rotate_from_php.patch
+Patch2: %{name}-graphviz.patch
+Patch3: %{name}-SetAAPixel.patch
+Patch4: %{name}-security.patch
URL: http://www.boutell.com/gd/
-%{?with_xpm:BuildRequires: XFree86-devel}
BuildRequires: autoconf >= 2.54
BuildRequires: automake
+%{?with_fontconfig:BuildRequires: fontconfig-devel}
BuildRequires: freetype-devel >= 2.0
+BuildRequires: gettext-devel
BuildRequires: libpng-devel
BuildRequires: libjpeg-devel
BuildRequires: libtiff-devel
BuildRequires: libtool >= 1:1.4.3
+%{?with_xpm:BuildRequires: xorg-lib-libXpm}
BuildRequires: zlib-devel
-%{!?with_xpm:BuildConflicts: XFree86-devel}
Provides: gd(gif) = %{version}-%{release}
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
Summary(pt_BR): Arquivos de inclusão e bibliotecas para desenvolver programas usando gd
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
-%{?with_xpm:Requires: XFree86-devel}
+Requires: fontconfig-devel
Requires: freetype-devel >= 2.0
Requires: libjpeg-devel
Requires: libpng-devel
+%{?with_xpm:Requires: xorg-lib-libXpm}
Requires: zlib-devel
Provides: gd-devel(gif) = %{version}-%{release}
%setup -q
%patch0 -p1
%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+%patch4 -p1
+
+# hack to avoid inclusion of -s in --ldflags
+%{__perl} -pi -e 's,\@LDFLAGS\@,,g' config/gdlib-config.in
%build
%{__libtoolize}
%{__automake}
%{__autoheader}
%{__autoconf}
-%configure
+%configure \
+ %{!?with_fontconfig:--without-fontconfig} \
+ %{!?with_xpm:--without-xpm}
%{__make}
%install
%files progs
%defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/[!g]*
-%attr(755,root,root) %{_bindir}/gd[!l]*
+%attr(755,root,root) %{_bindir}/*
+%exclude %{_bindir}/gdlib-config