# Description: library for fast image processing
# URL: https://github.com/strukturag/libheif/
# Maintainer: John McQuah, jmcquah at disroot dot org
# Depends on: libde265
# Optional: x265 dav1d aom rav1e svt-av1

name=libheif
version=1.16.2
release=1
source=(https://github.com/strukturag/$name/releases/download/v$version/$name-$version.tar.gz)

build() {
	mkdir build && cd build
	cmake -G Ninja -DCMAKE_BUILD_TYPE=Release \
		-DCMAKE_INSTALL_PREFIX="/usr"     \
		-DCMAKE_INSTALL_LIBDIR=lib        \
		-DCMAKE_C_FLAGS="$CFLAGS"         \
		../$name-$version

	ninja -j ${JOBS:-1}
	DESTDIR=$PKG ninja install
}
