# # spec file for package giflib # # Copyright (c) 2018 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 https://bugs.opensuse.org/ # %define lname libgif7 Name: giflib Version: 5.1.4 Release: 3.6 Summary: A Library for Working with GIF Images License: MIT Group: Development/Libraries/C and C++ Url: http://giflib.sf.net/ Source: http://downloads.sf.net/giflib/%{name}-%{version}.tar.bz2 Source2: baselibs.conf Patch1: giflib-visibility.patch Patch2: giflib-automake-1_13.patch Patch3: giflib-CVE-2016-3977.patch Patch4: fix-autoconf11.patch BuildRequires: libtool >= 2 BuildRoot: %{_tmppath}/%{name}-%{version}-build %description This Library allows manipulating GIF Image files. Since the LZW patents have expired, giflib can again be used instead of libungif. %package -n %{lname} Summary: A Library for Working with GIF Images Group: System/Libraries %description -n %{lname} This Library allows manipulating GIF Image files. Since the LZW patents have expired, giflib can again be used instead of libungif. %package progs Summary: Tools for Working with the GIF Library Group: Productivity/Graphics/Convertors Provides: ungif = %{version} Obsoletes: ungif < %{version} %description progs A tool for converting GIFs to various formats. %package devel Summary: Library for Working with GIF Images - Files Mandatory for Development Group: Development/Libraries/C and C++ Requires: %{lname} = %{version} %description devel This Library allows manipulating GIF Image files. Since the LZW patents have expired, giflib can again be used instead of libungif. %prep %setup -q for file in `find util -name "*.c"`; do touch -r $file $file.stamp done %patch1 -p1 %patch2 -p1 %patch3 -p1 %if 0%{?suse_version} <= 1110 %patch4 -p1 %endif # USE __TIMESTAMP__ instead of __DATE__ , __TIME__ # this change is pointless unless we preserve the original # file modification time for file in `find util -name "*.c"`; do sed -i -e s@'__DATE__ ", " __TIME__'@__TIMESTAMP__@g $file; touch -r $file.stamp $file; rm -v $file.stamp done mkdir -p m4; autoreconf -fiv %build %configure \ --disable-silent-rules \ --disable-static \ --with-pic \ --x-libraries=%{_libdir} make %{?_smp_mflags} %install make DESTDIR=%{buildroot} install %{?_smp_mflags} find %{buildroot} -type f -name "*.la" -delete -print find doc -name "Makefile*" -print -delete %post -n %{lname} -p /sbin/ldconfig %postun -n %{lname} -p /sbin/ldconfig %files -n %{lname} %defattr(-,root,root) %license COPYING %{_libdir}/lib*.so.* %files devel %defattr(-,root,root) %{_includedir}/gif_lib.h %{_libdir}/lib*.so %files progs %defattr(-,root,root) %license COPYING %doc NEWS README doc %{_bindir}/* %changelog * Fri Nov 9 2018 schwab@suse.de - Remove unused build requires on X libraries - Use %%license * Wed Jul 5 2017 bwiedemann@suse.com - Keep timestamps before patch updates them to fix build-compare * Fri May 13 2016 rpm@fthiessen.de - Added fix-autoconf11.patch for fixing build with older autoconf, requires for SLE11. * Tue Apr 12 2016 fstrba@suse.com - Update to version 5.1.4 * Fix SF bug #94: giflib 5 loves to fail to load images... a LOT. * Fix SF Bug #92: Fix buffer overread in gifbuild. * Fix SF Bug #93: Add bounds check in gifbuild netscape2.0 path * Fix SF Bug #89: Fix buffer overread in gifbuild. - Removed patch: * giflib-sf-88.patch + Integrated upstream - Added patch: * giflib-CVE-2016-3977.patch - Fix CVE-2016-3977: heap buffer overflow in gif2rgb (bsc#974847) * Wed Mar 23 2016 idonmez@suse.com - Update to version 5.1.3 * Prevent malloc randomess from causing the header output routine to emit a GIF89 version string even when no GIF89 features are present. * Prevent malloc randomess from producing sporadic failures by causing sanity checks added in 5.1.2 to misfire. * Bulletproof gif2rgb against 0-height images. Addressed sf#78: Heap overflow in gif2rgb with images of size 0, also sf#82. * Remove unnecessary duplicate EGifClose() in gifcolor.c. Fixes sf#83 introduced in 5.1.2. * Fix sf#84: incorrect return of DGifSlurp(). - Add giflib-sf-88.patch to fix sf#88 * Tue Jan 19 2016 fstrba@suse.com - Update to version 5.1.2 (fixes CVE-2015-7555, bsc#960319) * Code Fixes + Code hardening using reallocarray() from OpenBSD. + Sanity check in giffilter catches files with malformed extension records. Fixes SourceForge bug #63: malformed gif causes segfault in giffilter. + Inexpensive sanity check in DGifSlurp() catches malformed files with no image descriptor. Fixes SourceForge bug #64: malformed gif causes crash in giftool. + Fix SourceForge bug #66: GifDrawBoxedText8x8() modifying constant input parameter. + Bail out of GIF read on invalid pixel width. Addresses Savannah bug #67: invalid shift in dgif_lib.c + Fix SourceForge bug #69: #69 Malformed: Gif file with no extension block after a GRAPHICS_EXT_FUNC_CODE extension causes segfault (in giftext). + Fix SourceForge bug #71: Buffer overwrite when giffixing a malformed gif. + Fix SourceForge bug #73: Null pointer deference in gifclrmap (only reachable with malformed GIF). + Fix SourceForge bug #74: Double free in gifsponge under 5.1,1, for any valid gif image. + Fix SourceForge bug #75: GAGetArgs overflows due to uncounted use of va_arg. + Sanity check in giffix catches some malformed files. Addresses SourceForge bug #77: dgif_lib.c: extension processing error - Modified patches: * giflib-automake-1_13.patch * giflib-visibility.patch + rediff to changed context * Thu Jan 15 2015 tchvatal@suse.com - Cleanup a bit - Remove obsolete sle10 deprecations - Fix one tiny rpmlint warning * Wed Jan 14 2015 p.drouand@gmail.com - Update to version 5.1.1 + Numerous minor fixes in getarg.c. Affects only the utilities, not the core library. + Fix SourceForge bug #59 DGifOpen can segfault if DGifGetScreenDesc fails. + SourceForge patch #20: In gifalloc, fix usage of realloc() in case of failure. + Fix SourceForge bug #61 Leak in gifsponge. + glibtoolize port fix for OS X. * Fri May 30 2014 jengelh@inai.de - Update to new upstream release 5.1.0 * Minor API change to assist library wrappers in dynamic languages, removal of the the gif2raw utility, and various minor fix patches for unusual edge cases. * API changes to functions: GifErrorString returns const char *; EGifGetGifVersion returns const char *; EGifCloseFile takes another int *errorcode; DGifCloseFile takes another int *errorcode; * Sat Aug 31 2013 jengelh@inai.de - Update to new upstream release 5.0.5 (bugfix release) * This release sets the error return properly when a screen descriptor read fails, and fixes minor API documentation bugs. * Wed Jun 26 2013 jengelh@inai.de - Update to new upstream release 5.0.4 * Fix for a rare misrendering bug when a GIF overruns the decompression-code table. - Make patches have -p1, as requested by http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines * Wed Mar 27 2013 mmeister@suse.com - Added url as source. Please see http://en.opensuse.org/SourceUrls * Sat Mar 2 2013 seife+obs@b1-systems.com - add giflib-automake-1_13.patch, fix build with automake-1.13.1 * Fri Jan 11 2013 jengelh@inai.de - Remove "Obsoletes: giflib", because libgif6 must not obsolete libgif4 (it would do that by way of libgif4's "Provides: giflib"). * Fri Jan 4 2013 jengelh@inai.de - Adjust baselibs.conf for libgif6, remove libungif rpm symbols since they are now no longer provided. * Sun Dec 30 2012 crrodriguez@opensuse.org - Version 5.0.3 * The library is now purely reentrant and thread-safe * Adds an EGifSetGifVersion() entry point * All names of exported functions now have a Gif, DGif, or EGif prefix. - packaging changes: * soname is now libgif6 * Compatibility with ancient "libungif" via rpm spec file hacks is no longer included, if there is any application around that still requires this it has to be fixed. * Sun Feb 5 2012 jengelh@medozas.de - Remove redundant tags/sections * Mon Oct 10 2011 crrodriguez@opensuse.org - annotate functions from gif_lib_private.h with visibility hidden so they are not exported. * Sat Oct 1 2011 coolo@suse.com - add libtool as buildrequire to make the spec file more reliable * Wed Sep 21 2011 jengelh@medozas.de - Correct project URL - Implement shlib naming (libgif4) - Apply packaging guidelines (remove redundant/obsolete tags/sections from specfile, etc.) * Sun Aug 29 2010 cristian.rodriguez@opensuse.org - Do not use __Date__ and __TIME__ , make build-compare happier * Thu Dec 17 2009 jengelh@medozas.de - add baselibs.conf as a source * Tue Jan 13 2009 olh@suse.de - obsolete old libungif-64bit on ppc64 (bnc#437293) * Wed Dec 10 2008 olh@suse.de - use Obsoletes: -XXbit only for ppc64 to help solver during distupgrade (bnc#437293) * Mon Nov 24 2008 olh@suse.de - obsolete old -XXbit packages (bnc#437293) * Sat Aug 30 2008 crrodriguez@suse.de - update to version 4.1.6, changes since 4.1.4 includes: * Fix segfault in utilities due to referencing ColorMaps in GifFiles that had no ColorMap present. * Fix gif2x11 to work on 24 bit displays. * Fix for giftext segfault when the GifFile does not store a global colormap. * Checks to fail gracefully when an image contains improper LZ codes. * Close file handles on failure in DGifOpenFileHandle() * Checks to operate on files in binary mode on WIN32 as well as MSDOS. - kill "la" files and static libraries * Thu Apr 10 2008 ro@suse.de - added baselibs.conf file to build xxbit packages for multilib support * Wed Aug 16 2006 aj@suse.de - Replace xorg-x11-devel BuildRequires with really needed libs. - Fix configure call for X11 R7. * Wed Jan 25 2006 mls@suse.de - converted neededforbuild to BuildRequires * Thu Jan 12 2006 nadvornik@suse.cz - compile with -fstack-protector * Tue Jan 3 2006 nadvornik@suse.cz - updated to 4.1.4 * Tue Apr 26 2005 jw@suse.de - fixed EGifCompressLine for 64bit archs, to make perl-Prima testcases happy. * Tue Sep 14 2004 nadvornik@suse.cz - fixed provides on 64bit architectures [#44842] * Thu Sep 9 2004 nadvornik@suse.cz - added Provides: libungif.so.4 [#44842] * Wed Sep 1 2004 nadvornik@suse.cz - updated to giflib 4.1.3: LZW is enabled again - renamed libungif -> giflib ungif -> giflib-progs - new subpackage giflib-devel - added compatibility symlinks * Tue Feb 24 2004 kukuk@suse.de - Cleanup neededforbuild * Sat Jan 10 2004 adrian@suse.de - add %%defattr and %%run_ldconfig * Mon Feb 11 2002 schwab@suse.de - Fix use of varargs. * Wed Feb 6 2002 nadvornik@suse.cz - updated to 4.1.0b1: - bugfix release * Tue Jan 8 2002 nadvornik@suse.cz - used macros %%{_lib} and %%{_libdir} * Tue Jun 12 2001 ro@suse.de - libtoolize to build * Tue Jun 5 2001 schwab@suse.de - Change DumpScreen2Gif parameters to long. * Thu May 24 2001 pblaha@suse.cz - fix cast pointer on ia64 * Wed Apr 18 2001 pblaha@suse.cz - patch from nadvornik@suse.cz for bug in loading images * Sun Apr 8 2001 ro@suse.de - fixed group tag * Wed May 17 2000 bubnikv@suse.cz - fixed bug of $chmod 755 libungif.so* (missing $RPM_BUILD_ROOT) - spec file cleanup * Mon May 15 2000 nadvornik@suse.cz - added BuildRoot - added URL * Tue Apr 4 2000 bk@suse.de - config.{sub,guess} update macro needs automake * Sat Apr 1 2000 bk@suse.de - suse s390 team added required %%suse_update_config for s390 * Mon Sep 13 1999 bs@suse.de - ran old prepare_spec on spec file to switch to new prepare_spec. * Tue Jun 29 1999 ro@suse.de - split: ungif (containing the tools) is build as a separate package * Tue Apr 6 1999 ro@suse.de - initial package