# Description: Cross-platform 3D audio.
# URL: https://github.com/kcat/openal-soft
# Maintainer: Danny Rawlins, crux at romster dot me
# Depends on: alsa-lib cmake
# Optional: qt5 ninja

name=openal
version=1.22.2
release=1
source=(https://github.com/kcat/openal-soft/archive/$version/openal-soft-$version.tar.gz)

build() {
	[ -e '/usr/bin/ninja' ] && PKGMK_OPENAL+=' -G Ninja'

	cmake -S openal-soft-$version -B build ${PKGMK_OPENAL} \
		-D CMAKE_INSTALL_PREFIX=/usr \
		-D CMAKE_INSTALL_LIBDIR=lib \
		-D ALSOFT_EXAMPLES=OFF \
		-D CMAKE_BUILD_TYPE=Release

	cmake --build build
	DESTDIR=$PKG cmake --install build
}