### this file is sourced not run
PKGVER=2.8.1
PKGBUILD=1
PKGARCH=i686

# source: james
TARBALL=SDL2_mixer-$PKGVER.tar.gz
MD5SUM=7f477f8dd5c1be6dd710344193d210da
#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_32 mpg123_32 libopusfile32'
SLACKDESC="libSDL2-mixer32: libSDL2-mixer32 $PKGVER (SDL2 sound mixing library)
libSDL2-mixer32: 
libSDL2-mixer32: SDL_mixer is a sound mixing library that is used with the SDL 
libSDL2-mixer32: library, and almost as portable. It allows a programmer to use 
libSDL2-mixer32: multiple samples along with music without having to code a mixing 
libSDL2-mixer32: algorithm themselves. It also simplyfies the handling of loading and 
libSDL2-mixer32: playing samples and music from all sorts of file formats.
libSDL2-mixer32: 
libSDL2-mixer32: https://www.libsdl.org/projects/SDL_mixer/
libSDL2-mixer32: 
libSDL2-mixer32: This contains 32-bit version of the library
"
SLACKSUG='fluidsynth32 libmodplug32'

### default pkg_download
### default pkg_prepare

### package - only collect the libraries
pkg_package() {
	rm -rf bin sbin usr/bin usr/sbin usr/include usr/share
}

### 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
}


