# Template file for 'SDL3_mixer'
pkgname=SDL3_mixer
version=3.2.4
revision=1
build_style=cmake
configure_args="-DSDLMIXER_VENDORED=OFF -DSDLMIXER_DEPS_SHARED=ON
 -DSDLMIXER_TESTS=OFF -DSDLMIXER_EXAMPLES=OFF -DSDLMIXER_STRICT=ON"
hostmakedepends="pkg-config"
makedepends="SDL3-devel opusfile-devel libvorbis-devel libflac-devel libgme-devel libxmp-devel
 mpg123-devel fluidsynth-devel wavpack-devel"
# The following deps are dlopen(3)ed at runtime (SDLMIXER_DEPS_SHARED=ON).
depends="opusfile libvorbis libflac libgme libxmp libmpg123 libfluidsynth libwavpack"
short_desc="Multi-channel audio mixer library (SDL 3.x)"
maintainer="Rutpiv <roger_freitas@live.com>"
license="Zlib"
homepage="https://github.com/libsdl-org/SDL_mixer"
changelog="https://raw.githubusercontent.com/libsdl-org/SDL_mixer/refs/heads/main/CHANGES.txt"
distfiles="https://www.libsdl.org/projects/SDL_mixer/release/${pkgname}-${version}.tar.gz"
checksum=182a07c745375e113dc740d43964ff21b0be29f29f59876c4dbc4db3d32f6901

post_install() {
	vlicense LICENSE.txt
}

SDL3_mixer-devel_package() {
	depends="${makedepends} ${sourcepkg}>=${version}_${revision}"
	short_desc+=" - development files"
	pkg_install() {
		vmove usr/include
		vmove usr/lib/cmake
		vmove usr/lib/pkgconfig
		vmove "usr/lib/*.so"
	}
}
