# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=sdl2_mixer
pkgver=2.8.0
pkgrel=0
pkgdesc="A simple multi-channel audio mixer"
url="https://github.com/libsdl-org/SDL_mixer"
arch="all"
license="Zlib"
makedepends="
	cmake
	flac-dev
	fluidsynth
	fluidsynth-dev
	libmikmod-dev
	libmodplug-dev
	libvorbis-dev
	libxmp-dev
	linux-headers
	mpg123-dev
	opusfile-dev
	samurai
	sdl2-dev
	wavpack-dev
	"
subpackages="$pkgname-dev $pkgname-doc"
options="!check" # no test suite
source="$pkgname-$pkgver.tar.gz::https://github.com/libsdl-org/SDL_mixer/archive/refs/tags/release-$pkgver.tar.gz"

builddir="$srcdir/SDL_mixer-release-$pkgver"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
e4c9a4418725ce019bb62216c8fd484cf04b34e2099af633d4c84e0e558fe6ba1921e791c5dde319266ffe3a1237f887871c819a249a8df7e9440c36fce181da  sdl2_mixer-2.8.0.tar.gz
"
