### this file is sourced not run
PKGVER=2.6.3
PKGBUILD=1
PKGARCH=x86_64

# source: james
TARBALL=SDL2_mixer-$PKGVER.tar.gz
MD5SUM=42c50ace7099b43b630d09d871f054c3
#SRC_URL=https://www.libsdl.org/projects/SDL_mixer/release/$TARBALL # still works for now
SRC_URL=https://github.com/libsdl-org/SDL_mixer/releases/download/release-$PKGVER/$TARBALL
BUNDLE=

SLACKREQ='libSDL2 mpg123 libopusfile'
SLACKDESC="libSDL2-mixer: libSDL2-mixer $PKGVER (SDL2 sound mixing library)
libSDL2-mixer: 
libSDL2-mixer: SDL_mixer is a sound mixing library that is used with the SDL 
libSDL2-mixer: library, and almost as portable. It allows a programmer to use 
libSDL2-mixer: multiple samples along with music without having to code a mixing 
libSDL2-mixer: algorithm themselves. It also simplyfies the handling of loading and 
libSDL2-mixer: playing samples and music from all sorts of file formats.
libSDL2-mixer: 
libSDL2-mixer: https://www.libsdl.org/projects/SDL_mixer/
libSDL2-mixer: 
libSDL2-mixer: 
"
SLACKSUG='fluidsynth libmodplug'

### default pkg_download
### default pkg_prepare
### default pkg_package
### build
pkg_build() {
	cd /tmp/SDL*
	# - for mp3, flac, vorbis: use the full implementation and not the "minified" ones
	# - for mod, there is a choice of modplug or xmp. We use modplug because it is
	#     already used by ffmpeg.
	# - for midi, there is a choice between timitidy or fluidsynth.
	CONFFLAGS="$CONFFLAGS \
		--disable-static  \
		--enable-music-mp3-mpg123 \
		--enable-music-flac-libflac \
		--enable-music-ogg-vorbis   \
		--enable-music-mod-modplug  \
		--enable-music-midi-fluidsynth \
	" &&
	pkg_build_autoconf && pkg_build_slackdesc
}


