File webp.spec of Package webp

#
# spec file for package webp
#
# Copyright (c) 2021 SUSE LLC
#
# 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/
#


Name:           webp
Version:        1.6.x+git.20251128T095232~4fc426c
Release:        5.1
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/
Source:         %{name}-%{version}.tar.xz
Source3:        %{name}.keyring
Source4:        baselibs.conf
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  libtool
BuildRequires:  giflib-devel
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(glut)
BuildRequires:  pkgconfig(libjpeg)
BuildRequires:  pkgconfig(libpng)
BuildRequires:  pkgconfig(libtiff-4)
BuildRequires:  Mesa-libGL-devel

%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 libwebp7
Summary:        Library for the WebP graphics format
Group:          System/Libraries

%description -n libwebp7
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 libwebpmux3
Summary:        Library for reading/adding data to WebP container files
Group:          System/Libraries

%description -n libwebpmux3
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 libwebpdecoder3
Summary:        Library for decoding WebP graphics format
Group:          System/Libraries

%description -n libwebpdecoder3
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 -n libsharpyuv0
Summary:        Library for reading/adding data to WebP container files
Group:          System/Libraries

%description -n libsharpyuv0
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 devel
Summary:        Development files for libwebp, a library for the WebP format
Group:          Development/Libraries/C and C++
Requires:       libwebp7 = %version
Requires:       libwebpdecoder3 = %version
Requires:       libwebpdemux2 = %version
Requires:       libwebpmux3 = %version
%if %{with extras}
Requires:       libwebpextras0 = %version
%endif

%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 -n %{name}-%{version}

%build
./autogen.sh
%configure --disable-static \
	--enable-libwebpmux --enable-libwebpdemux \
	--enable-libwebpdecoder --enable-libwebpextras
%make_build

%install
%make_install
find "%buildroot" -type f -name "*.la" -delete -print

%post   -n libwebp7 -p /sbin/ldconfig
%postun -n libwebp7 -p /sbin/ldconfig
%post   -n libwebpdemux2 -p /sbin/ldconfig
%postun -n libwebpdemux2 -p /sbin/ldconfig
%post   -n libwebpmux3 -p /sbin/ldconfig
%postun -n libwebpmux3 -p /sbin/ldconfig
%post   -n libwebpdecoder3 -p /sbin/ldconfig
%postun -n libwebpdecoder3 -p /sbin/ldconfig
%post   -n libwebpextras0 -p /sbin/ldconfig
%postun -n libwebpextras0 -p /sbin/ldconfig
%post   -n libsharpyuv0 -p /sbin/ldconfig
%postun -n libsharpyuv0 -p /sbin/ldconfig

%files -n webp-tools
%_bindir/*
%_mandir/man*/*

%files -n libwebp7
%_libdir/libwebp.so.*

%files -n libwebpdemux2
%_libdir/libwebpdemux.so.*

%files -n libwebpmux3
%_libdir/libwebpmux.so.*

%files -n libwebpdecoder3
%_libdir/libwebpdecoder.so.*

%files -n libsharpyuv0
%_libdir/libsharpyuv.so*

%if %{with extras}
%files -n libwebpextras0
%_libdir/libwebpextras.so.*
%endif

%files devel
%_libdir/libwebp*.so
%_includedir/webp/
%_libdir/pkgconfig/*.pc

%changelog
* Sat Nov 29 2025 obs-service-tar-scm@invalid
- Update to version 1.6.x+git.20251128T095232~4fc426c:
  * Force bash for fuzz tests
  * Remove the other -rss_limit_mb= used by oss-fuzz
  * Do not have OOM be fuzzer errors
  * Fix potential overflow in imageio
  * Prevent some overflow during MBAnalyze
  * Add arbitrary data for the encoding fuzzers
  * Properly validate picture dimensions for overflow
  * Update the emscripten instructions
  * io_dec,CustomSetup: rm unnecessary 'is_alpha' check
* Sat Oct 14 2023 Robert Herb <proletheus@freenet.de>
- rename package to webp
* Sun Aug  7 2022 Dirk Müller <dmueller@suse.com>
- update to 1.2.4:
  This is a binary compatible release.
  * restore CMake libwebpmux target name for compatibility with 1.2.2 (#575)
  * fix lossless crunch mode encoding with WEBP_REDUCE_SIZE
    (chromium: #1345547, #1345595, #1345772, #1345804)
* Fri Jul 22 2022 Dirk Müller <dmueller@suse.com>
- update to 1.2.3:
  * security fix for lossless encoder (#565, chromium:1313709)
  * improved progress granularity in WebPReportProgress() when using lossless
  * improved precision in Sharp YUV (-sharp_yuv) conversion
  * many corrections to webp-lossless-bitstream-spec.txt (#551)
  * crash/leak fixes on error/OOM and other bug fixes (#558, #563, #569, #573)
* Mon Jan 31 2022 Dirk Müller <dmueller@suse.com>
- update to 1.2.2:
  * webpmux: add "-set bgcolor A,R,G,B"
  * add ARM64 NEON support for MSVC builds (#539)
  * doc updates and bug fixes (#538, #544, #548, #550)
* Wed Oct 13 2021 Callum Farmer <gmbr3@opensuse.org>
- update to 1.2.1:
  * minor lossless encoder improvements and x86 color conversion
    speed up
  * further security related hardening in libwebp & examples
  * toolchain updates and bug fixes
  * use more inclusive language within the source
* Sat Jan 30 2021 Dirk Müller <dmueller@suse.com>
- update to 1.2.0:
  * API changes in libwebp: encode.h: add a qmin / qmax range for
    quality factor (cwebp adds -qrange)
  * lossless encoder improvements
  * SIMD support for Wasm builds
  * import fuzzers from oss-fuzz & chromium
  * webpmux: add a '-set loop <value>' option
* Wed Apr  1 2020 Martin Pluskal <mpluskal@suse.com>
- Update to version 1.1.0:
  * API changes:
  - libwebp:
    WebPMalloc
  - extras:
    WebPUnmultiplyARGB
  * alpha decode fix
  * toolchain updates and bug fixes
* Fri Nov  1 2019 Martin Liška <mliska@suse.cz>
- Disable LTO (boo#1155449) for ARM targets.
* Sat Aug 24 2019 Jan Engelhardt <jengelh@inai.de>
- Update to new upstream release 1.0.3
  * Resize fixes for Nx1 sizes and the addition of non-opaque
    alpha values for odd sizes.
  * Lossless encode/decode performance improvements.
  * Lossy compression performance improvement at low quality
    levels with flat content.
  * vwebp will now preserve the aspect ratio of images that
    exceed monitor resolution by scaling the image to fit.
* Wed Jul  3 2019 Bjørn Lie <bjorn.lie@gmail.com>
- Update to version 1.0.2:
  * Lossless encoder speedups.
  * Lossy encoder speedup on ARM.
  * Lossless multi-threaded security fix.
- Changes from version 1.0.1:
  * Lossless encoder speedups.
  * Big-endian fix for alpha decoding.
  * Gif2webp fix for loop count=65535 transcode.
  * Further security related hardening in libwebp & libwebpmux.
  * Miscellaneous bug & build fixes.
* Sat Apr 28 2018 mrueckert@suse.de
- update baselibs.conf for the new soversions
* Sat Apr 28 2018 mrueckert@suse.de
- update to 1.0.0
  - lossy encoder improvements to avoid chroma shifts in various
  - ircumstances (issues #308, #340)
  - big-endian fixes for decode, RGBA import and
    WebPPictureDistortion
  - Tool updates:
    gifwebp, anim_diff - default duration behavior (<= 10ms)
    changed to match web browsers, transcoding
    tools (issue #379)
    img2webp, webpmux - allow options to be passed in via a file
    (issue #355)
- changes from 0.6.1
  - lossless performance and compression improvements + a new
    'cruncher' mode (-m 6 -q 100)
  - ARM performance improvements with clang (15-20%% w/ndk r15c,
    issue #339)
  - webp-js: emscripten/webassembly based javascript decoder
  - miscellaneous bug & build fixes (issue #329, #332, #343, #353,
    [#360], #361, #363)
  - Tool updates / additions:
  - added webpinfo - prints file format information (issue #330)
  - gif2webp - loop behavior modified to match Chrome M63+
    (crbug.com/649264); '-loop_compatibility' can be
    used for the old behavior
- changes from 0.6.0
  - lossless performance and compression improvements
  - miscellaneous performance improvements (SSE2, NEON, MSA)
  - webpmux gained a -duration option allowing for frame timing
    modification
  - new img2webp utility allowing a sequence of images to be
    converted to animated webp
  - API changes:
  - libwebp:
    WebPPictureSharpARGBToYUVA
    WebPPlaneDistortion
  - libwebpmux / gif2webp:
    WebPAnimEncoderOptions: kmax <= 0 now disables keyframes,
    kmax == 1 forces all keyframes. See
    mux.h and the gif2webp manpage for
    details.
- changes from 0.5.2
  - This release covers CVE-2016-8888 and CVE-2016-9085.
  - further security related hardening in the tools; fixes to
    gif2webp/AnimEncoder (issues #310, #314, #316, #322),
    cwebp/libwebp (issue #312)
  - full libwebp (encoder & decoder) iOS framework; libwebpdecoder
    WebP.framework renamed to WebPDecoder.framework (issue #307)
  - CMake support for Android Studio (2.2)
  - miscellaneous build related fixes (issue #306, #313)
  - miscellaneous documentation improvements (issue #225)
  - minor lossy encoder fixes and improvements
- changes from 0.5.1
  - miscellaneous bug fixes (issues #280, #289)
  - reverted alpha plane encoding with color cache for
    compatibility with libwebp 0.4.0->0.4.3 (issues #291, #298)
  - lossless encoding performance improvements
  - memory reduction in both lossless encoding and decoding
  - force mux output to be in the extended format (VP8X) when
    undefined chunks are present (issue #294)
  - gradle, cmake build support
  - workaround for compiler bug causing 64-bit decode failures on
    android devices using clang-3.8 in the r11c NDK
  - various WebPAnimEncoder improvements
- disable extras for now. it seems it is not building and
  installing a library anymore
* Fri Feb 12 2016 mpluskal@suse.com
- Update baselibs.conf
* Thu Feb 11 2016 mpluskal@suse.com
- Update to 0.5.0
  * miscellaneous bug & build fixes (issues #234, #258, #274, #275,
    [#278])
  * encoder & decoder speed-ups on x86/ARM/MIPS for lossy &
    lossless
    + note! YUV->RGB conversion was sped-up, but the results will
    be slightly different from previous releases
  * various lossless encoder improvements
  * gif2webp improvements, -min_size option added
  * tools fully support input from stdin and output to stdout (issue
    [#168])
  * New WebPAnimEncoder API for creating animations
  * New WebPAnimDecoder API for decoding animations
  * other API changes:
    + libwebp:
    WebPPictureSmartARGBToYUVA() (-pre 4 in cwebp)
    WebPConfig::exact (-exact in cwebp; -alpha_cleanup is now the
    default)
    WebPConfig::near_lossless (-near_lossless in cwebp)
    WebPFree() (free'ing webp allocated memory in other
    languages)
    WebPConfigLosslessPreset()
    WebPMemoryWriterClear()
    + libwebpdemux: removed experimental fragment related fields
    and functions
    + libwebpmux: WebPMuxSetCanvasSize()
  * new libwebpextras library with some uncommon import functions:
    WebPImportGray/WebPImportRGB565/WebPImportRGB4444
- Make building more verbose
* Tue Dec  8 2015 p.drouand@gmail.com
- Update to version 0.4.4
  * rescaling out-of-bounds read fix (issue #254)
  * various build fixes and improvements (issues #253, #259, #262, #267, #268)
  * container documentation update
  * gif2webp transparency fix (issue #245)
- Add freeglut-devel build requires
* Mon Jun 29 2015 jengelh@inai.de
- Add libwebp-devel to baselibs.conf [bnc#936417]
* Sat Jun 13 2015 dmueller@suse.com
- remove aarch64-disable-neon.diff: compiler was fixed, neon
  can be compiled now
* Sun Mar 29 2015 jengelh@inai.de
- Update to new upstream release 0.4.3
  * lossless decode fix and a multi-threading fix
  * documentation / vwebp updates for animation
* Wed Oct 29 2014 dimstar@opensuse.org
- Update baselibs.conf: make it match the currently build library
  packages.
* Tue Oct 28 2014 dmueller@suse.com
- update to 0.4.2:
  This is a binary compatible release.
  * Android / gcc build fixes
  * (Windows) fix reading from stdin and writing to stdout
  * gif2webp: miscellaneous fixes
  * fix 'alpha-leak' with lossy compression (issue #220)
  * the lossless bitstream spec has been amended to reflect the current code
- add aarch64-disable-neon.diff: work around compile failure with
  neon on aarch64.
- add libwebpdecoder1 subpackage
* Mon Aug 11 2014 jengelh@inai.de
- Update to new upstream release 0.4.1
  * AArch64 (arm64) & MIPS support/optimizations
  * NEON assembly additions: ~25%% faster lossy decode/encode (-m 4);
  ~10%% faster lossless decode;~5-10%% faster lossless encode (-m 3/4)
  * dwebp/vwebp can read from stdin
  * cwebp/gif2webp can write to stdout
  * cwebp can read webp files; useful if storing sources as webp
  lossless
* Thu Jan  9 2014 jengelh@inai.de
- Update to new upstream release 0.4.0
  * improved gif2webp tool
  * numerous fixes, compression improvement and speed-up
  * dither option added to decoder (dwebp -dither 50 ...)
  * improved multi-threaded modes (-mt option)
  * improved filtering strength determination
  * BMP and TIFF format output added to 'dwebp'
  * Significant memory reduction for decoding lossy images with alpha.
  * Intertwined decoding of RGB and alpha for a shorter
  time-to-first-decoded-pixel.
  * WebPIterator has a new member 'has_alpha' denoting whether the
  frame contains transparency.
  * Container spec amended with new 'blending method' for animation.
* Wed Jun 26 2013 jengelh@inai.de
- Update to new upstream release 0.3.1
  * Add incremental decoding support for images containing
  ALPH and ICCP chunks.
- Enable libwebpmux, libwebpdemux
* Tue Apr 16 2013 jengelh@inai.de
- Update to new upstream release 0.3.0
  * WebPINewRGB/WebPINewYUVA accept being passed a NULL output buffer
  and will perform auto-allocation.
  * Default filter option is now "-strong -f 60"
  * Encoding speed-up for lossy methods 3 to 6
  * Alpha encoding can be done in parallel to lossy using
  `cwebp -mt ...`
  * Color profile, metadata (XMP/EXIF) and animation support in the
  container was finalized.
  * Various NEON assembly additions
- Tool updates / additions:
  * gif2webp added
  * vwebp given color profile & animation support
  * cwebp can preserve color profile / metadata with "-metadata"
* Sun Dec  9 2012 mailaender@opensuse.org
- Update to version 0.2.1
  * libwebp: validate chunk size in ParseOptionalChunks
  * cwebp (windows): fix alpha image import on XP
  * autoconf/libwebp: enable dll builds for mingw
  * [cd]webp: always output windows errors
  * fix double to float conversion warning
  * cwebp: fix jpg encodes on XP
  * VP8LAllocateHistogramSet: fix overflow in size calculation
  * GetHistoBits: fix integer overflow
  * EncodeImageInternal: fix uninitialized free
  * fix the -g/O3 discrepancy for 32bit compile
  * fix the BITS=8 case
  * Make *InitSSE2() functions be empty on non-SSE2 platform
  * make *InitSSE2() functions be empty on non-SSE2 platform
  * make VP8DspInitNEON() public
* Fri Aug 31 2012 dimstar@opensuse.org
- Update to version 0.2.0:
  * Add support for ARGB -> YUVA conversion for lossless decoder
  * Add stats for lossless and alpha encoding
  * Security related hardening: allocation and size checks
  * Add PAM output support to dwebp
  * Alpha channel encode/decode support
  * Lossless encoder/decoder
  * Add TIFF input support to cwebp
  * Incompatible changes:
  - The encode ABI has been modified to support alpha encoding
  - Deprecated function WebPINew() has been removed
  - Decode function signatures have changed to consistently use
    size_t over int/uint32_t
  - decode_vp8.h is no longer installed system-wide
  - cwebp will encode the alpha channel if present.
  * Add libtiff-devel BuildRequires for the new tiff input support.
  * Rename libwebp2 subpackage to libwebp4 (by changing lname
  defines), following upstreams soname bump (incl. baselibs.conf).
  * No reason to run autogen
* Mon Jan 30 2012 jengelh@medozas.de
- Rename webp-tools to libwebp-tools to follow scheme of other
  lib*-tools packages.
* Wed Nov 23 2011 coolo@suse.com
- add libtool as buildrequire to avoid implicit dependency
* Mon Oct 31 2011 pgajdos@suse.com
- update to 0.1.3:
  * Advanced decoding APIs.
  * On-the-fly cropping and rescaling of images.
  * SSE2 instructions for decoding performance optimizations on x86 based platforms.
  * Support Multi-threaded decoding.
  * 40%% improvement in Decoding performance.
  * Add support for RGB565, RGBA4444 & ARGB image colorspace.
  * Better handling of large picture encoding.
* Fri Sep 16 2011 coolo@suse.com
- add baselibs.conf and use original tar
* Sat Aug  6 2011 jengelh@medozas.de
- Rename subpackage libwebp-tools to webp-tools to get out of
  rpmlint's pedant observation that it does not contain libraries.
openSUSE Build Service is sponsored by