# # 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 http://bugs.opensuse.org/ # %define prjname libgd %define lname libgd3 Name: gd Version: 2.1.1 Release: 0 Summary: A Drawing Library for Programs That Use PNG and JPEG Output License: MIT Group: System/Libraries Url: http://libgd.bitbucket.org/ Source: https://bitbucket.org/libgd/gd-libgd/downloads/libgd-%{version}.tar.xz Source1: baselibs.conf Source2: getver.pl # 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-libvpx.patch Patch5: gd-CVE-2016-5116.patch Patch6: gd-CVE-2016-6132.patch Patch7: gd-CVE-2016-6214.patch Patch8: gd-CVE-2016-6905.patch # PATCH-FIX-UPSTREAM gd-disable-freetype27-failed-tests.patch gh#libgd/libgd#302 badshah400@gmail.com -- Disable for now tests failing against freetype >= 2.7 for being too exact. Patch9: gd-disable-freetype27-failed-tests.patch BuildRequires: fontconfig-devel BuildRequires: freetype2-devel BuildRequires: libjpeg-devel BuildRequires: libpng-devel BuildRequires: libtiff-devel BuildRequires: libtool 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 %description 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 -n %lname Summary: A Drawing Library for Programs That Use PNG and JPEG Output Group: System/Libraries %description -n %lname 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: %lname = %{version} Requires: glibc-devel Requires: libpng-devel Requires: libtiff-devel Requires: libvpx-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. %prep %setup -q -n %{prjname}-%{version} %patch0 %patch1 %patch2 %patch3 %patch4 %patch5 -p1 %patch6 -p1 %patch7 -p1 %patch8 -p1 %patch9 -p1 %build # this file is errorneously forgotten from the tarball # remove in next release to 2.1.1 cp %{SOURCE2} config/getver.pl perl config/getver.pl 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 \ --with-pic make %{?_smp_mflags} %check make check %{?_smp_mflags} %install make DESTDIR=%{buildroot} install %{?_smp_mflags} find %{buildroot} -type f -name "*.la" -delete -print %post -n %lname -p /sbin/ldconfig %postun -n %lname -p /sbin/ldconfig %files %defattr(-,root,root) %doc COPYING NEWS examples %{_bindir}/annotate %{_bindir}/bdftogd %{_bindir}/gd2copypal %{_bindir}/gd2togif %{_bindir}/gd2topng %{_bindir}/gdcmpgif %{_bindir}/gdparttopng %{_bindir}/gdtopng %{_bindir}/giftogd2 %{_bindir}/pngtogd %{_bindir}/pngtogd2 %{_bindir}/webpng %files -n %lname %defattr(-,root,root) %doc COPYING %{_libdir}/*.so.* %files devel %defattr(-,root,root) %doc COPYING %{_bindir}/gdlib-config %{_includedir}/* %{_libdir}/*.so %{_libdir}/pkgconfig/gdlib.pc %changelog