File libaom.spec of Package libaom.34234
#
# spec file for package libaom
#
# 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 http://bugs.opensuse.org/
#
%define sover 0
%define __builder ninja
%define __builddir _build
Name: libaom
Version: 1.0.0
Release: 0
Summary: AV1 codec library
License: BSD-2-Clause
Group: Productivity/Multimedia/Other
URL: https://aomedia.googlesource.com/aom/
Source0: %{name}-%{version}.tar.xz
Source99: baselibs.conf
Patch0: libaom-0001-Do-not-disable-_FORTIFY_SOURCE.patch
Patch1: libaom-0002-link-threading-lib-with-shared-library.patch
Patch3: libaom-0003-update-CHANGELOG.patch
# CVE-2021-30475 [bsc#1189497], Buffer overflow in aom_dsp/noise_model.c
Patch4: libaom-CVE-2021-30475.patch
# CVE-2021-30474 [bsc#1186799], aom_dsp/grain_table.c in libaom in AOMedia before 2021-03-30 has a use-after-free.
Patch5: libaom-CVE-2021-30474.patch
# CVE-2020-36129 [bsc#1193356], AOM v2.0.1 was discovered to contain a stack buffer overflow via the component src/aom_image.c.|CVE-2020-36131 [bsc#1193365], AOM v2.0.1 was discovered to contain a stack buffer overflow via the component stats/rate_hist.c.|CVE-2020-36135 [bsc#1193366], AOM v2.0.1 was discovered to contain a NULL pointer dereference via the component rate_hist.c.
Patch6: libaom-CVE-2020-36129,36131,36135.patch
# CVE-2020-36130 [bsc#1193369], AOM v2.0.1 was discovered to contain a NULL pointer dereference via the component av1/av1_dx_iface.c.
Patch7: libaom-CVE-2020-36130.patch
# CVE-2021-30473 [bsc#1185778], aom_image.c in libaom in AOMedia before 2021-04-07 frees memory that is not located on the heap.
Patch8: libaom-CVE-2021-30473.patch
# CVE-2020-0470 [bsc#1180033], In extend_frame_highbd of restoration.c, there is a possible out of bounds write due to a heap buffer overflow. This could lead to remote information disclosure with no additional execution privileges needed. U
Patch9: libaom-CVE-2020-0470.patch
# CVE-2024-5171 [bsc#1226020], heap buffer overflow in img_alloc_helper() caused by integer overflow
Patch10: libaom-CVE-2024-5171.patch
BuildRequires: c++_compiler
BuildRequires: cmake
BuildRequires: doxygen
BuildRequires: graphviz
BuildRequires: ninja
BuildRequires: pkgconfig
BuildRequires: yasm
%description
This is a library for AOMedia Video 1 (AV1), an open, royalty-free
video coding format designed for video transmissions over the Internet.
%package -n %{name}%{sover}
Summary: AV1 codec library
Group: System/Libraries
%description -n %{name}%{sover}
This is a library for AOMedia Video 1 (AV1), an open, royalty-free
video coding format designed for video transmissions over the Internet.
%package devel
Summary: Development files for libaom, an AV1 codec library
Group: Development/Languages/C and C++
Requires: %{name}%{sover} = %{version}
%description devel
This package contains the development headers and library files for
libaom, a library for the AOMedia Video 1 (AV1) video coding format.
%package devel-doc
Summary: Documentation for the libaom API
Group: Documentation/HTML
Requires: %{name}-devel = %{version}
BuildArch: noarch
%description devel-doc
This package contains the API documentation for libaom, a library
for the AOMedia Video 1 (AV1) video coding format.
%package -n aom-tools
Summary: AV1 Codec Library Tools
%description -n aom-tools
This package contains tools included with libaom, a library for
the AOMedia Video 1 (AV1) video coding format.
%prep
%autosetup -p1
%build
%cmake \
-DCONFIG_LOWBITDEPTH=1 \
%ifnarch aarch64 %{arm} %{ix86} x86_64
-DAOM_TARGET_CPU=generic \
%endif
%ifarch %{arm}
-DAOM_TARGET_CPU=arm \
%endif
%ifarch aarch64
-DAOM_TARGET_CPU=arm64 \
%endif
%ifarch %{ix86}
-DAOM_TARGET_CPU=x86 \
%endif
%ifarch x86_64
-DAOM_TARGET_CPU=x86_64 \
%endif
%{nil}
%make_jobs
%install
%cmake_install
%post -n %{name}%{sover} -p /sbin/ldconfig
%postun -n %{name}%{sover} -p /sbin/ldconfig
%files -n %{name}%{sover}
%license LICENSE PATENTS
%doc AUTHORS CHANGELOG
%{_libdir}/%{name}.so.*
%files devel
%{_includedir}/aom
%{_libdir}/%{name}.so
%{_libdir}/pkgconfig/aom.pc
%files devel-doc
%doc %{__builddir}/docs/html/*
%files -n aom-tools
%{_bindir}/aomdec
%{_bindir}/aomenc
%changelog