## START: Set by rpmautospec
## (rpmautospec version 0.6.3)
## RPMAUTOSPEC: autorelease, autochangelog
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
    release_number = 1;
    base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
    print(release_number + base_release_number - 1);
}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}}
## END: Set by rpmautospec

Name:           libplacebo6
Version:        6.338.2
Release:        %autorelease
Summary:        Reusable library for GPU-accelerated video/image rendering primitives

License:        LGPL-2.0-or-later
URL:            https://github.com/haasn/libplacebo
Source:         %{url}/archive/v%{version}/libplacebo-%{version}.tar.gz

BuildRequires:  gcc-toolset-14-gcc
BuildRequires:  gcc-toolset-14-gcc-c++
BuildRequires:  meson >= 0.63
BuildRequires:  glad2
BuildRequires:  lcms2-devel
BuildRequires:  libepoxy-devel
BuildRequires:  libunwind-devel
BuildRequires:  libshaderc-devel
BuildRequires:  python3-mako
BuildRequires:  spirv-tools-devel
BuildRequires:  vulkan-devel
BuildRequires:  glslang-devel
BuildRequires:  xxhash-devel

Conflicts:      (libplacebo >= 6.338 with libplacebo < 6.339)


%description
libplacebo is essentially the core rendering algorithms and ideas of
mpv turned into a library. This grew out of an interest to accomplish
the following goals:

- Clean up mpv's internal API and make it reusable for other projects.
- Provide a standard library of useful GPU-accelerated image processing
  primitives based on GLSL, so projects like VLC or Firefox can use them
  without incurring a heavy dependency on `libmpv`.
- Rewrite core parts of mpv's GPU-accelerated video renderer on top of
  redesigned abstractions. (Basically, I wanted to eliminate code smell
  like `shader_cache.c` and totally redesign `gpu/video.c`)


%package        devel
Summary:        Development files for %{name}
Requires:       %{name}%{?_isa} = %{version}-%{release}
Conflicts:      pkgconfig(libplacebo)

%description    devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.


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


%build
%enable_devtoolset14

%meson \
 -Ddovi=disabled \
 -Dlibdovi=disabled \
 -Dd3d11=disabled \
 -Ddemos=False

%meson_build


%install
%meson_install


%files
%license LICENSE
%doc README.md
%{_libdir}/libplacebo.so.338

%files devel
%{_includedir}/libplacebo
%{_libdir}/libplacebo.so
%{_libdir}/pkgconfig/libplacebo.pc


%changelog
## START: Generated by rpmautospec
* Wed May 01 2024 Carl George <carlwgeorge@fedoraproject.org> - 6.338.2-1
- Initial libplacebo6 compat package based on libplacebo
## END: Generated by rpmautospec
