# # 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: 4.2 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 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 %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 %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 \ --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 * Mon May 30 2016 pgajdos@suse.com - security update: * CVE-2016-5116 [bsc#982176] + gd-CVE-2016-5116.patch * Tue Mar 1 2016 pgajdos@suse.com - add missing config/getver.pl [bsc#965190] * Tue May 12 2015 joerg.lorenzen@ki.tng.de - Added patch gd-libvpx.patch to enable build against libvpx >= 1.4, new VPX_ prefixed namespaces are available since libvpx = 0.9.1. * Sat Feb 28 2015 mpluskal@suse.com - Cleanup spec file with spec-cleaner - No longer needed patches * gd-2.1.0-CVE-2014-2497.patch * gd-autoconf.patch - Update to 2.1.1 * changelog provided only as commit log (see Changelog) * fix for CVE-2014-2497 * Tue Aug 26 2014 jengelh@inai.de - Resolve build failure with automake-1.14 * Fri Jun 27 2014 meissner@suse.com - split out libgd3, so libgd2 could be installed in parallel. * Thu Apr 17 2014 tchvatal@suse.com - Add tiff and vpx to the devel deps as it is in .pc file. * Thu Apr 10 2014 pgajdos@suse.com - build against libtiff and libvpx * Fri Apr 4 2014 pgajdos@suse.com - fixed NULL ptr deref in GD XPM decoder [bnc#868624] * CVE-2014-2497.patch * Fri Dec 27 2013 tchvatal@suse.com - Cleanup here&there to parallelize everything - Remove bogus cmake dependency * Tue Dec 17 2013 pgajdos@suse.com - updated to 2.1.0 - removed warn.patch (not needed) - removed ppc64.patch (upstreamed) - removed gd-png_check_sig.patch (upstreamed) * Sun Feb 3 2013 crrodriguez@opensuse.org - gd-autoconf.patch fix up compile file so gd can handle large files on 32 bit * Sun Feb 5 2012 jengelh@medozas.de - Remove redundant tags/sections - Parallel build with %%_smp_mflags - Remove pointless INSTALL file from rpm package (it's just the default autotools INSTALL blurb) * Wed Oct 5 2011 uli@suse.com - cross-build fix: use libpng from sysroot * Sat Oct 1 2011 coolo@suse.com - add libtool as buildrequire to make the spec file more reliable * Tue Jun 14 2011 aj@suse.de - Devel package needs zlib-devel and libpng-devel. * Tue Apr 6 2010 ro@suse.de - add baselibs.conf (for libpghoto2) * Sun Apr 4 2010 ro@suse.de - replace png_check_sig by negated png_sig_cmp for libpng14 * Wed Nov 12 2008 crrodriguez@suse.de - QA Results: Regression on PPC64 only, detected by PHP test suite, the system libgd part, fix by IBM * Mon Mar 10 2008 crrodriguez@suse.de - fix rpm version number, otherwise it wont upgrade later. * Fri Jan 18 2008 anosek@suse.cz - updated to version 2.0.36RC1 * Fixed gdImageCopy with true color image, the transparent color was ignored * Fixed support of PNG grayscale image with alpha channel * Added Netware builds script * ease the creation of regexp to match symbols/functions in the sources * _gdCreateFromFile() can crash if gdImageCreate fails * gdImageCreateFrom*Ptr() can crash if gdNewDynamicCtxEx() fails * gdImageRectangle draws 1x1 rectangles as 1x3 rectangles * Possible integer overflow in gdImageFill() * Optimization for single pixel line not in correct order * gdImageColorDeallocate can write outside buffer * gdImageColorTransparent can write outside buffer * gdImageWBMPCtx can crash when createwbmp fails * Fixed decoding of the html entity ϑ * Fixed configure script ignoring --with-png=DIR option - dropped obsoleted security.patch * Thu Dec 20 2007 crrodriguez@suse.de - remove static libraries and "la" files - devel package dependency cleanup * Mon Jul 9 2007 anosek@suse.cz - updated to version 2.0.35 * Fix valgrind error in gdImageFillTiled (Nuno Lopes) * Add missing custom cmake macros (required for the tests suite) * Avoid signature buffer copy in gd_gif_c (Nuno Lopes) * Race condition in gdImageStringFTEx (Antony Dogval, Pierre Scott MacVicar) * Reading GIF images is not thread safe (static usage in private functions) (Roman Nemecek, Nuno Lopes, Pierre) * GIF Local palette is read twice * GIF, Use local frame dimension when possible instead of the logical screen size (Pierre) * GIF, do not try to use the global colmap if it does not exist (Nuno Lopes, Pierre) * gdImageAALine draws axis lines with two pixels width (Pierre) * gdImageArc CPU usage with large angles (Pierre) * gdImageFilledRectangle regression fixed when used with reversed edges (Pierre) * Possible infinite loop in libgd/gd_png.c, flaw found by Xavier Roche (Pierre) * Fixed segfault when an invalid color index is present in a GIF image data, reported by Elliot (Pierre) * Possible integer overflow in gdImageCreateTrueColor (Pierre) gdImageCreateXbm can crash if gdImageCreate fails (Pierre) - dropped obsolete patches (png-loop-CVE-2007-2756.patch) * Tue May 29 2007 nadvornik@suse.cz - fixed infinite loop on truncated png images CVE-2007-2756 [#276525] * Thu May 3 2007 prusnak@suse.cz - changed expat to libexpat-devel in Requires of devel subpackage * Tue Feb 20 2007 nadvornik@suse.cz - updated to 2.0.34: * security fixes merged upstream * various other bugfixes * Wed Aug 16 2006 aj@suse.de - Reduce BuildRequires. * Wed Aug 16 2006 aj@suse.de - Remove unneeded BuildRequire xorg-x11. * Wed Aug 16 2006 aj@suse.de - Do not use fonts to build package. * Wed Aug 16 2006 sndirsch@suse.de - gd-fontpath.diff: fixes new fontpath for Type1 fonts * Mon Aug 7 2006 nadvornik@suse.cz - adjusted ttf fonts path for gdtestft * Fri Jun 23 2006 nadvornik@suse.cz - fixed another check for return value on error [#186953] - gdlib-config is moved to devel package [#168628] * Thu Jun 8 2006 nadvornik@suse.cz - fixed check for EOF in gd_gif_in.c [#182334] * Wed Mar 8 2006 sbrabec@suse.cz - Fixed devel dependencies. * Wed Jan 25 2006 mls@suse.de - converted neededforbuild to BuildRequires * Thu Jan 12 2006 nadvornik@suse.cz - compile with -fstack-protector * Thu Jan 5 2006 nadvornik@suse.cz - fixed another integer overflow [#138007] * Thu Nov 24 2005 meissner@suse.de - fixed 1 aliasing issue. * Sat Feb 5 2005 meissner@suse.de - added 1 missign format attribute * Mon Nov 22 2004 nadvornik@suse.cz - run test programs during build [#48382] * Mon Nov 15 2004 nadvornik@suse.cz - fixed more overflows - CAN-2004-0941 [#47666] * Tue Nov 2 2004 nadvornik@suse.cz - updated to 2.0.32: * fixed several integer overflows [#47666] * animated gif support * Tue Aug 24 2004 nadvornik@suse.cz - updated to 2.0.28: restored support for reading and writing GIF images * Fri Feb 20 2004 schwab@suse.de - Fix missing return value. * Thu Feb 5 2004 nadvornik@suse.cz - updated to 2.0.22 - fixed dangerous compiler warnings * Sat Jan 10 2004 adrian@suse.de - add %%defattr and %%run_ldconfig * Tue Jan 6 2004 nadvornik@suse.cz - updated to 2.0.17 - fixed to build with new freetype * Thu Jul 24 2003 mjancar@suse.cz - update to 2.0.15 * Thu Feb 13 2003 nadvornik@suse.cz - updated to 2.0.11: speed improvements, bugfixes * Fri Dec 13 2002 prehak@suse.cz - added gdImageCreateFromXpm() function prototype to gd.h * Thu Nov 28 2002 nadvornik@suse.cz - updated to 2.0.8 * Tue Sep 17 2002 ro@suse.de - removed bogus self-provides * Tue May 28 2002 bk@suse.de - gd-devel requires gd and use prefix, bindir and includedir macros * Wed Feb 13 2002 nadvornik@suse.cz - used macro %%{_libdir} * Thu Jan 31 2002 ro@suse.de - changed neededforbuild to * Mon Nov 5 2001 ro@suse.de - fix Makefile.am for automake 1.5 (removed duplicated line) * Fri May 25 2001 pblaha@suse.cz - fix include on ia64 * Thu Mar 29 2001 ro@suse.de - use aclocal * Wed Mar 21 2001 ro@suse.de - update to 1.8.4 - use freetype2 * Mon Dec 4 2000 pblaha@suse.cz - move simbolick link libgd.so -> gd-devel * Thu Nov 30 2000 aj@suse.de - Add suse_update_config. * Wed Nov 15 2000 pblaha@suse.cz - aplied patch from perl-GD and split to gd & gd-devel * Mon Jun 5 2000 bubnikv@suse.cz - updated to 1.8.3 * Fri May 12 2000 nadvornik@suse.cz - update to 1.8.1 - added BuildRoot * Mon Oct 11 1999 ro@suse.de - added xpm and ttf support * Sun Oct 10 1999 ro@suse.de - added libpng to neededforbuild * Thu Oct 7 1999 schwab@suse.de - update to 1.7.3 * Mon Sep 13 1999 bs@suse.de - ran old prepare_spec on spec file to switch to new prepare_spec. * Thu Sep 9 1999 bs@suse.de - fixed call of Check at the end of %%install section * Tue Jun 15 1999 ro@suse.de - fixed doc installation * Tue Jun 15 1999 ro@suse.de - update to 1.3 * Thu Feb 5 1998 ro@suse.de - ready for autobuild