File gd.spec of Package gd.2670

# spec file for package gd
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

%define prjname libgd
Name:           gd
Version:        2.1.0
Release:        0
Summary:        A Drawing Library for Programs That Use PNG and JPEG Output
License:        MIT
Group:          System/Libraries
Source1:        baselibs.conf
# to be upstreamed, gdlib-config --libs to return the same as pkg-config --libs gdlib
Patch0:         gd-config.patch
# might be upstreamed, but could be suse specific also (/usr/share/fonts/Type1 font dir)
Patch1:         gd-fontpath.patch
# could be upstreamed, but not in this form (need ac check for attribute format printf, etc.)
Patch2:         gd-format.patch
# could be upstreamed
Patch3:         gd-aliasing.patch
# could be upstreamed?
Patch4:         gd-autoconf.patch
Patch5:         gd-2.1.0-CVE-2014-2497.patch
Patch6:         gd-CVE-2014-9709.patch
Patch7:         gd-CVE-2016-5116.patch
Patch8:         gd-CVE-2016-6905.patch
Patch9:         gd-CVE-2016-6214.patch
Patch10:        gd-CVE-2016-6128.patch
Patch11:        gd-CVE-2016-6207.patch
Patch12:        gd-CVE-2016-6161.patch
Patch13:        gd-CVE-2016-6132.patch
BuildRequires:  fontconfig-devel
BuildRequires:  freetype2-devel
BuildRequires:  libjpeg-devel
BuildRequires:  libpng-devel
BuildRequires:  libtiff-devel
BuildRequires:  libtool
BuildRequires:  libvpx-devel
BuildRequires:  pkg-config
BuildRequires:  xorg-x11-libX11-devel
BuildRequires:  xorg-x11-libXau-devel
BuildRequires:  xorg-x11-libXdmcp-devel
BuildRequires:  xorg-x11-libXpm-devel
Provides:       gdlib = %{version}
Obsoletes:      gdlib < %{version}
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

Gd allows your code to quickly draw images complete with lines, arcs,
text, and multiple colors. It supports cut and paste from other images
and flood fills. It outputs PNG, JPEG, and WBMP (for wireless devices)
and is supported by PHP.

%package devel
Summary:        Drawing Library for Programs with PNG and JPEG Output
Group:          Development/Libraries/C and C++
Requires:       %{name} = %{version}
Requires:       glibc-devel
Requires:       libpng-devel
Requires:       zlib-devel

%description devel
gd allows code to quickly draw images complete with lines, arcs, text,
multiple colors, cut and paste from other images, and flood fills. gd
writes out the result as a PNG or JPEG file. This is particularly
useful in World Wide Web applications, where PNG and JPEG are two of
the formats accepted for inline images by most browsers.

%setup -q -n %{prjname}-%{version}
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1
%patch12 -p1
%patch13 -p1

autoreconf -fiv
# without-x -- useless switch which just mangles cflags
%configure \
	--without-x \
	--with-fontconfig \
	--with-freetype \
	--with-jpeg \
	--with-png \
	--with-xpm \
	--disable-static \
make %{?_smp_mflags}

make check %{?_smp_mflags}

make DESTDIR=%{buildroot} install %{?_smp_mflags}
find %{buildroot} -type f -name "*.la" -delete -print

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%doc COPYING NEWS examples

%files devel

openSUSE Build Service is sponsored by