File mingw64-libvpx.spec of Package mingw64-libvpx

#
# spec file for package mingw64-libvpx
#
# Copyright (c) 2025 SUSE LLC and contributors
# Copyright (c) 2025, Martin Hauke <mardnh@gmx.de>
#
# 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/
#


%{_mingw64_package_header_debug}
Name:           mingw64-libvpx
Version:        1.15.2
Release:        0
Summary:        VP8/VP9 codec library
License:        BSD-3-Clause AND GPL-2.0-or-later
URL:            https://www.webmproject.org/
Source0:        https://github.com/webmproject/libvpx/archive/refs/tags/v%{version}.tar.gz#/libvpx-%{version}.tar.gz
BuildRequires:  mingw64-cross-gcc-c++
BuildRequires:  yasm
BuildArch:      noarch

%description
Libvpx is a library for the VP8/VP9 video codec family.

%package -n mingw64-vpx-tools
Summary:        Utilities from the VP8/VP9 codec library

%description -n mingw64-vpx-tools
This package contains utilities around the VPX codec sdk.

%{_mingw64_debug_package}

%prep
%autosetup -p1 -n libvpx-%{version}

%build
%define _lto_cflags %{nil}
mkdir -p build && cd build
export CFLAGS="%{optflags} -fno-asynchronous-unwind-tables"
export CROSS="%{_bindir}/x86_64-w64-mingw32-"
../configure \
    --target=x86_64-win64-gcc \
    --prefix=%{_mingw64_prefix} \
    --libdir=%{_mingw64_libdir} \
    --disable-docs \
    --disable-install-docs \
    --disable-install-srcs \
    --disable-unit-tests \
    --disable-shared \
    --enable-static \
    --enable-pic \
    --enable-postproc \
    --enable-runtime-cpu-detect \
    --enable-vp8 \
    --enable-vp9 \
    --enable-vp9-highbitdepth \
    --enable-vp9-temporal-denoising
%{_mingw64_make} verbose=yes GEN_EXAMPLES=

%install
cd build
%{_mingw64_make_install} verbose=yes

%files
%license LICENSE
%doc AUTHORS README CHANGELOG
%{_mingw64_includedir}/vpx
%{_mingw64_libdir}/libvpx.a
%{_mingw64_libdir}/pkgconfig/vpx.pc

%files -n mingw64-vpx-tools
%{_mingw64_bindir}/vpxdec.exe
%{_mingw64_bindir}/vpxenc.exe

%changelog
openSUSE Build Service is sponsored by