File libwebp.spec of Package libwebp.29258

#
# spec file for package libwebp
#
# Copyright (c) 2015 SUSE LINUX Products 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/
#


Name:           libwebp
Version:        0.5.0
Release:        0
Summary:        Library and tools for the WebP graphics format
License:        BSD-3-Clause
Group:          Development/Libraries/C and C++
Url:            https://developers.google.com/speed/webp/

#Git-Clone:	http://git.chromium.org/webm/libwebp.git
Source:         http://downloads.webmproject.org/releases/webp/%name-%version.tar.gz
Source2:        http://downloads.webmproject.org/releases/webp/%name-%version.tar.gz.asc
Source3:        %name.keyring
Source4:        baselibs.conf
# PATCH-FIX-UPSTREAM libwebp-CVE-2020-36328.patch bsc#1185688 mgorse@suse.com -- fix invalid check for buffer size.
Patch0:         libwebp-CVE-2020-36328.patch
# PATCH-FIX-UPSTREAM libwebp-CVE-2020-36329.patch bsc#1185652 mgorse@suse.com -- fix for thread race heap-use-after-free.
Patch1:         libwebp-CVE-2020-36329.patch
# PATCH-FIX-UPSTREAM libwebp-CVE-2020-36330.patch bsc#1185691 mgorse@suse.com -- fix riff size checks.
Patch2:         libwebp-CVE-2020-36330.patch
# PATCH-FIX-UPSTREAM libwebp-CVE-2018-25013.patch bsc#1185654 mgorse@suse.com -- wait for all threads to be done in DecodeRemaining.
Patch3:         libwebp-CVE-2018-25013.patch
# PATCH-FIX-UPSTREAM libwebp-CVE-2020-36331.patch bsc#1185686 mgorse@suse.com -- fix possible overflow when validating chunk size.
Patch4:         libwebp-CVE-2020-36331.patch
# PATCH-FIX-UPSTREAM libwebp-CVE-2018-25010.patch bsc#1185685 mgorse@suse.com -- fix alpha-filtering crash when image is larger than radius.
Patch5:         libwebp-CVE-2018-25010.patch
# PATCH-FIX-UPSTREAM libwebp-CVE-2018-25009.patch bsc#1185673 bsc#1186790 mgorse@suse.com -- fix overflow while reading VP8X chunk.
Patch6:         libwebp-CVE-2018-25009.patch
# PATCH-FIX-UPSTREAM libwebp-CVE-2020-36332.patch bsc#1185674 mgorse@suse.com -- better handling of bogus Huffman codes.
Patch7:         libwebp-CVE-2020-36332.patch
# PATCH-FIX-UPSTREAM libwebp-CVE-2018-25011.patch bsc#1186247 mgorse@suse.com -- fail on multiple image chunks.
Patch8:         libwebp-CVE-2018-25011.patch
# PATCH-FIX-UPSTREAM libwebp-double-free.patch bsc#1210212 CVE-2023-1999 xwang@suse.com -- Avoid a double free
Patch9:         libwebp-double-free.patch

BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  freeglut-devel
BuildRequires:  giflib-devel
BuildRequires:  libjpeg-devel
BuildRequires:  libpng-devel
BuildRequires:  libtiff-devel
BuildRequires:  pkg-config

%description
WebP is an image format that does lossy compression of digital
photographic images. WebP consists of a codec based on VP8, and a
container based on RIFF. Webmasters, web developers and browser
developers can use WebP to compress, archive and distribute digital
images more efficiently.

%package tools
Summary:        The WebP command line tools
Group:          Productivity/Archiving/Compression
#O/P added in 12.2
Obsoletes:      webp-tools < %version-%release
Provides:       webp-tools = %version-%release

%description tools
WebP is an image format that does lossy compression of digital
photographic images. WebP consists of a codec based on VP8, and a
container based on RIFF. Webmasters, web developers and browser
developers can use WebP to compress, archive and distribute digital
images more efficiently.

%package -n libwebp6
Summary:        Library for the WebP graphics format
Group:          System/Libraries

%description -n libwebp6
WebP is an image format that does lossy compression of digital
photographic images. WebP consists of a codec based on VP8, and a
container based on RIFF. Webmasters, web developers and browser
developers can use WebP to compress, archive and distribute digital
images more efficiently.

%package -n libwebpdemux2
Summary:        Library for extraction of data and images from WebP container files
Group:          System/Libraries

%description -n libwebpdemux2
The WebP Demux API enables extraction of images and extended format
data from WebP files. This API currently supports reading of XMP/EXIF
metadata, ICC profile and animated images.

%package -n libwebpmux2
Summary:        Library for reading/adding data to WebP container files
Group:          System/Libraries

%description -n libwebpmux2
The WebP Mux API contains methods for adding data to and reading data
from WebP files. This API currently supports XMP/EXIF metadata, ICC
profile and animation.

%package -n libwebpdecoder2
Summary:        Library for decoding WebP graphics format
Group:          System/Libraries

%description -n libwebpdecoder2
WebP is an image format that does lossy compression of digital
photographic images. WebP consists of a codec based on VP8, and a
container based on RIFF. Webmasters, web developers and browser
developers can use WebP to compress, archive and distribute digital
images more efficiently.

%package -n libwebpextras0
Summary:        Library for decoding WebP graphics format
Group:          System/Libraries

%description -n libwebpextras0
WebP is an image format that does lossy compression of digital
photographic images. WebP consists of a codec based on VP8, and a
container based on RIFF. Webmasters, web developers and browser
developers can use WebP to compress, archive and distribute digital
images more efficiently. This package contains shared libraries for less
common imports - WebPImportGray/WebPImportRGB565/WebPImportRGB4444.

%package devel
Summary:        Development files for libwebp, a library for the WebP format
Group:          Development/Libraries/C and C++
Requires:       libwebp6 = %version
Requires:       libwebpdemux2 = %version
Requires:       libwebpmux2 = %version
Requires:       libwebpdecoder2 = %version
Requires:       libwebpextras0 = %version

%description devel
WebP is an image format that does lossy compression of digital
photographic images. WebP consists of a codec based on VP8, and a
container based on RIFF. Webmasters, web developers and browser
developers can use WebP to compress, archive and distribute digital
images more efficiently.

%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1

%build
%configure --disable-static \
	--enable-libwebpmux --enable-libwebpdemux \
	--enable-libwebpdecoder --enable-libwebpextras
make %{?_smp_mflags} V=1

%install
%make_install
rm -f "%buildroot/%_libdir"/*.la

%post   -n libwebp6 -p /sbin/ldconfig
%postun -n libwebp6 -p /sbin/ldconfig
%post   -n libwebpdemux2 -p /sbin/ldconfig
%postun -n libwebpdemux2 -p /sbin/ldconfig
%post   -n libwebpmux2 -p /sbin/ldconfig
%postun -n libwebpmux2 -p /sbin/ldconfig
%post   -n libwebpdecoder2 -p /sbin/ldconfig
%postun -n libwebpdecoder2 -p /sbin/ldconfig
%post   -n libwebpextras0 -p /sbin/ldconfig
%postun -n libwebpextras0 -p /sbin/ldconfig

%files -n libwebp-tools
%defattr(-,root,root)
%_bindir/*
%_mandir/man*/*

%files -n libwebp6
%defattr(-,root,root)
%_libdir/libwebp.so.6*

%files -n libwebpdemux2
%defattr(-,root,root)
%_libdir/libwebpdemux.so.2*

%files -n libwebpmux2
%defattr(-,root,root)
%_libdir/libwebpmux.so.2*

%files -n libwebpdecoder2
%defattr(-,root,root)
%_libdir/libwebpdecoder.so.2*

%files -n libwebpextras0
%defattr(-,root,root)
%_libdir/libwebpextras.so.0*

%files devel
%defattr(-,root,root)
%_libdir/libwebp*.so
%_includedir/webp/
%_libdir/pkgconfig/libwebp*.pc

%changelog
openSUSE Build Service is sponsored by