+#
+# Conditional build:
+%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.1
-Release: 5
+Version: 2.0.33
+Release: 8
License: BSD-like
Group: Libraries
-Source0: http://www.boutell.com/ftp-materials/boutell/gd/%{name}-%{version}.tar.gz
-Patch0: %{name}-ac_am.patch
+Source0: http://www.boutell.com/gd/http/%{name}-%{version}.tar.gz
+# Source0-md5: be0a6d326cd8567e736fbc75df0a5c45
+Patch0: %{name}-fontpath.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/
-BuildRequires: autoconf
+BuildRequires: autoconf >= 2.54
BuildRequires: automake
-BuildRequires: libtool
-BuildRequires: zlib-devel
+%{?with_fontconfig:BuildRequires: fontconfig-devel}
+BuildRequires: freetype-devel >= 2.0
+BuildRequires: gettext-devel
BuildRequires: libpng-devel
BuildRequires: libjpeg-devel
BuildRequires: libtiff-devel
-BuildRequires: freetype-devel >= 2.0
-BuildRequires: pkgconfig
+BuildRequires: libtool >= 1:1.4.3
+%{?with_xpm:BuildRequires: xorg-lib-libXpm}
+BuildRequires: zlib-devel
+Provides: gd(gif) = %{version}-%{release}
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-%define shlibver %(echo %{version} | cut -f-2 -d.)
-
%description
-gd library creates PNG, JPEG and WBMP images, not GIF images. This is
-a good thing. PNG is a more compact format, and full compression is
-available. JPEG works well with photographic images, and is still more
-compatible with the major Web browsers than even PNG is. WBMP is
-intended for wireless devices (not regular web browsers). Existing
-code will need modification to call or gdImageJpeg instead of
-gdImageGif.
-
-This library allows you to easily create and manipulate PNG, JPEG
-image files from your C programs.
+gd is the image manipulating library. It was created to allow graphs,
+charts and the like to be generated on the fly for use on the World
+wide Web, but is useful for any application in which custom images are
+useful. It is not a paint program; it is a library. gd library creates
+PNG, JPEG, GIF and WBMP images. PNG is a more compact format, and full
+compression is available. JPEG works well with photographic images,
+and is still more compatible with the major Web browsers than even PNG
+is. WBMP is intended for wireless devices (not regular web browsers).
%description -l es
Esta es la biblioteca gd para el manejo de imágenes. Fue creada para
programa de dibujo; es una biblioteca.
%description -l pl
-Biblioteka pozwalaj±ca na proste tworzenie i manipulowanie plikami
-graficznymi w formacie PNG, JPEG i WBMP, ale nie GIF.
+gd to biblioteka do obróbki obrazów. Zosta³a stworzona, aby umo¿liwiæ
+dynamiczne generowanie wykresów i podobnych rzeczy na potrzeby WWW,
+ale mo¿e byæ przydatna tak¿e dla ka¿dej aplikacji tworz±cej w³asne
+obrazy. Biblioteka ta pozwala na tworzenie plików graficznych w
+formatach PNG, JPEG, GIF i WBMP. PNG jest zwartym formatem z
+bezstratn± kompresj±. JPEG dobrze nadaje siê do obrazów
+fotograficznych i jest obs³ugiwany nawet przez wiêcej przegl±darek WWW
+ni¿ PNG. WBMP jest przeznaczony dla urz±dzeñ bezprzewodowych (a nie
+zwyk³ych przegl±darek WWW).
%description -l pt_BR
Esta é a biblioteca gd para manipulação de imagens. Ela foi criada
Summary(pl): Czê¶æ biblioteki GD przeznaczona dla developerów
Summary(pt_BR): Arquivos de inclusão e bibliotecas para desenvolver programas usando gd
Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}
+Requires: fontconfig-devel
+Requires: freetype-devel >= 2.0
+Requires: libjpeg-devel
Requires: libpng-devel
+%{?with_xpm:Requires: xorg-lib-libXpm}
Requires: zlib-devel
-Requires: libjpeg-devel
-Requires: freetype-devel >= 2.0
-Requires: %{name} = %{version}
+Provides: gd-devel(gif) = %{version}-%{release}
%description devel
This package contains the files needed for development of programs
%package static
Summary: Static GD library
-Summary(es): Static libraries for libgd development
Summary(pl): Statyczna biblioteka GD
Summary(pt_BR): Bibliotecas estáticas para desenvolvimento com libgd
Group: Development/Libraries
-Requires: %{name}-devel = %{version}
+Requires: %{name}-devel = %{version}-%{release}
+Provides: gd-static(gif) = %{version}-%{release}
%description static
-This package contains static GD library. This is the gd image
-manipulating library. It was created to allow graphs, charts and the
-like to be generated on the fly for use on the World wide Web, but is
-useful for any application in which custom images are useful. It is
-not a paint program; it is a library.
-
-This package contains static libraries for libgd development.
+This package contains static gd library.
%description static -l pl
-Pakiet ten zawiera statyczn± bibliotekê GD.
+Ten pakiet zawiera statyczn± bibliotekê gd.
%description static -l pt_BR
Este pacote contem bibliotecas estáticas para desenvolvimento com
%package progs
Summary: Utility programs that use libgd
Summary(es): Programas utilitarios libgd
-Summary(pl): Narzêdzia które u¿ywaj± libgd
+Summary(pl): Narzêdzia u¿ywaj±ce libgd
Summary(pt_BR): Programas utilitários libgd
Group: Applications/Graphics
-Requires: %{name} = %{version}
+Requires: %{name} = %{version}-%{release}
%description progs
-These are utility programs supplied with gd, the .jpeg graphics
+These are utility programs supplied with gd, the image manipulation
library. The libgd-progs package contains a group of scripts for
manipulating the graphics files in formats which are supported by the
libgd library.
%description progs -l pl
-Pakiet ten zawiera dodatkowe programy uzywaj±ce libgd.
+Ten pakiet zawiera programy u¿ywaj±ce biblioteki gd, s³u¿±ce do
+obróbki plików graficznych w formatach obs³ugiwanych przez libgd.
%description progs -l pt_BR
Este pacote inclui vários utilitários para manipulação de arquivos gd
%prep
%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}
-aclocal
+%{__aclocal}
%{__automake}
+%{__autoheader}
%{__autoconf}
-if [ -f %{_pkgconfigdir}/libpng12.pc ] ; then
- CPPFLAGS="`pkg-config libpng12 --cflags`"
-fi
-%configure CPPFLAGS="$CPPFLAGS"
+%configure \
+ %{!?with_fontconfig:--without-fontconfig} \
+ %{!?with_xpm:--without-xpm}
%{__make}
%install
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
-gzip -9nf readme.txt index.html
-
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
-%doc readme.txt.gz
+%doc COPYING index.html
%attr(755,root,root) %{_libdir}/*.so.*.*
%files devel
%defattr(644,root,root,755)
-%doc index.html.gz
+%attr(755,root,root) %{_bindir}/gdlib-config
%attr(755,root,root) %{_libdir}/*.so
-%attr(755,root,root) %{_libdir}/*.la
+%{_libdir}/*.la
%{_includedir}/*
%files static
%files progs
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/*
+%exclude %{_bindir}/gdlib-config