30 lines
1.1 KiB
Plaintext
30 lines
1.1 KiB
Plaintext
# Description: A sample multi-channel audio mixer library.
|
|
# URL: https://github.com/libsdl-org/SDL_mixer
|
|
# Maintainer: John McQuah, jmcquah at disroot dot org
|
|
# Depends on: libvorbis libmodplug flac libsdl2 mpg123
|
|
# Optional: fluidsynth opusfile wavpack
|
|
|
|
name=sdl2_mixer
|
|
version=2.8.0
|
|
release=1
|
|
source=(https://github.com/libsdl-org/SDL_mixer/releases/download/release-$version/SDL2_mixer-$version.tar.gz)
|
|
|
|
build() {
|
|
PKGMK_SDLMIX="-D SDL2MIXER_MOD_MODPLUG=ON -D SDL2MIXER_MOD_XMP=OFF"
|
|
prt-get isinst fluidsynth || PKGMK_SDLMIX+=" -D SDL2MIXER_MIDI_FLUIDSYNTH=OFF"
|
|
prt-get isinst opusfile || PKGMK_SDLMIX+=" -D SDL2MIXER_OPUS=OFF"
|
|
prt-get isinst wavpack || PKGMK_SDLMIX+=" -D SDL2MIXER_WAVPACK=OFF"
|
|
|
|
cmake -S SDL2_mixer-$version -B build -G Ninja \
|
|
-D CMAKE_INSTALL_PREFIX=/usr \
|
|
-D CMAKE_INSTALL_LIBDIR=lib \
|
|
-D CMAKE_BUILD_TYPE=Release \
|
|
-D CMAKE_C_FLAGS_RELEASE="$CFLAGS" $PKGMK_SDLMIX
|
|
|
|
ninja -C build -j ${JOBS:-1}
|
|
DESTDIR=$PKG ninja -C build install
|
|
|
|
# delete installed license.txt
|
|
rm -rf $PKG/usr/share
|
|
}
|