# Description: A sample multi-channel audio mixer library.
# URL: http://www.libsdl.org/projects/SDL_mixer/
# Packager: Simone Rota, sip at crux dot nu
# Maintainer: Victor Martinez, pitillo at ono dot com
# Arch Maintainer: CRUX-ARM System Team, devel at crux-arm dot nu
# Depends on: libvorbis smpeg

name=sdl_mixer
version=1.2.8
release=1
source=(http://www.libsdl.org/projects/SDL_mixer/release/SDL_mixer-$version.tar.gz)

build() {
  cd SDL_mixer-$version
  sed -i -e 's|/usr/local/lib/timidity|/usr/share/timidity|g' timidity/config.h
  ./configure --build=$CHOST \
              --host=$CTARGET \
              --prefix=/usr \
              --with-sdl-prefix=$CLFS/usr \
              --disable-sdltest

  find -type f -name 'Makefile' \
    -exec sed -i -e "s|/usr/include/SDL|$CLFS/usr/include/SDL|g" \
    -e "s|/usr/lib|$CLFS/usr/lib|g" {} \;

  make 
  make DESTDIR=$PKG install
}