File giflib.spec of Package giflib.43162
#
# spec file for package giflib
#
# Copyright (c) 2026 SUSE LLC and contributors
#
# 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/
#
%{!?make_build:%global make_build make %{?_smp_mflags}}
%define lname libgif6
Name: giflib
Version: 5.0.6
Release: 0
Summary: A Library for Working with GIF Images
License: MIT
Group: Development/Libraries/C and C++
URL: https://giflib.sf.net/
#Git-Clone: git://git.code.sf.net/p/giflib/code
#Freecode-URL: http://freecode.com/projects/giflib
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-2015-7555.patch
Patch4: giflib-CVE-2016-3977.patch
Patch5: giflib-CVE-2018-11490.patch
Patch6: giflib-CVE-2021-40633.patch
Patch7: giflib-CVE-2022-28506.patch
Patch8: giflib-CVE-2023-39742.patch
Patch9: giflib-integer-overflow.patch
Patch10: giflib-5.0.5-bsc1240416.patch
Patch11: giflib-CVE-2026-23868.patch
BuildRequires: libtool >= 2
BuildRequires: xorg-x11-libICE-devel
BuildRequires: xorg-x11-libSM-devel
BuildRequires: xorg-x11-libX11-devel
BuildRequires: xorg-x11-libXau-devel
BuildRequires: xorg-x11-libXdmcp-devel
BuildRequires: xorg-x11-libXt-devel
%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
# bug437293
%ifarch ppc64
Obsoletes: giflib-64bit
%endif
%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
Obsoletes: ungif
%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}
# bug437293
%ifarch ppc64
Obsoletes: giflib-devel-64bit
%endif
%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
# LT_INIT requires libtool >= 2
%patch -P 1 -p1
%patch -P 2 -p1
%patch -P 3 -p1
%patch -P 4 -p1
%patch -P 5 -p1
%patch -P 6 -p1
%patch -P 7 -p1
%patch -P 8 -p1
%patch -P 9 -p1
%patch -P 10 -p1
%patch -P 11 -p1
%build
# 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
touch -r $file $file.stamp;
sed -i -e s@'__DATE__ ", " __TIME__'@__TIMESTAMP__@g $file;
touch -r $file.stamp $file;
rm -v $file.stamp
done
mkdir -p m4; autoreconf -fiv
%configure --disable-static --with-pic --x-libraries=%{_libdir}
%make_build
%install
%make_install
#ln -sf libgif.a $RPM_BUILD_ROOT%{_libdir}/libungif.a
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}
%license COPYING
%{_libdir}/lib*.so.*
%files devel
%{_includedir}/gif_lib.h
%{_libdir}/lib*.so
%files progs
%license COPYING
%doc NEWS README doc
%{_bindir}/*
%changelog