# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=sdl2_mixer
pkgver=2.8.1
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="
653ec1f0af0b749b9ed0acd3bfcaa40e1e1ecf34af3127eb74019502ef42a551de226daef4cc89e6a51715f013e0ba0b1e48ae17d6aeee931271f2d10e82058a  sdl2_mixer-2.8.1.tar.gz
"
