# Description: Reusable library for GPU-accelerated video/image rendering primitives
# URL: https://github.com/haasn/libplacebo
# Maintainer: John McQuah, jmcquah at disroot dot org
# Depends on: ffmpeg glad glfw3 lcms2 libepoxy shaderc vulkan-loader

name=libplacebo
version=6.292.1
release=1
source=(https://github.com/haasn/$name/archive/v$version/$name-v$version.tar.gz)

build() {
	meson setup build $name-$version \
		--prefix=/usr \
		--buildtype=plain \
		--wrap-mode nodownload \
		-D b_lto=true \
		-D b_pie=true \
		-D vulkan=enabled \
		-D vulkan-registry=/usr/share/vulkan/registry/vk.xml \
		-D shaderc=enabled \
		-D lcms=enabled \
		-D d3d11=disabled \
		-D demos=false \
		-D tests=false

	meson compile -C build -j ${JOBS:-1}
	DESTDIR=$PKG meson install -C build
}
