openal-soft.sh 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #!/bin/bash
  2. . `dirname "$0"`/common || exit 1
  3. PKG="openal-soft"
  4. MARKER="$BASEDIR/.${PKG}_is_built"
  5. if [ -e "$MARKER" ]; then
  6. echo "$PKG seems to be already build, remove $MARKER to rebuild"
  7. exit 0
  8. fi
  9. export CC="$COMPILER_PREFIX/bin/$TARGET-gcc"
  10. export CXX="$COMPILER_PREFIX/bin/$TARGET-g++"
  11. #export GCC_EXEC_PREFIX="$TARGET"
  12. export PKG_CONFIG_PATH="$COMPILER_PREFIX/lib/pkgconfig:$PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH"
  13. CMAKE_FLAGS="-DDEBUG=on"
  14. INCLUDE2X="$PREFIX/include"
  15. INCLUDEL2X="$COMPILER_PREFIX/../usr/include"
  16. LIB2X="$PREFIX/lib"
  17. LIBL2X="$COMPILER_PREFIX/../usr/lib"
  18. CMAKE_FLAGS=""
  19. CMAKE_FLAGS="$CMAKE_FLAGS -DGENERATE_MESSAGESPOT=off"
  20. CMAKE_FLAGS="$CMAKE_FLAGS -DGENERATE_WRAPPER=off"
  21. CMAKE_FLAGS="$CMAKE_FLAGS -DCMAKE_CXX_COMPILER=$CXX"
  22. CMAKE_FLAGS="$CMAKE_FLAGS -DCMAKE_C_COMPILER=$CC"
  23. CFLAGS="-I$INCLUDEL2X -I$INCLUDEL2X"
  24. CMAKE_FLAGS="$CMAKE_FLAGS -DCMAKE_CXX_FLAGS=$CFLAGS"
  25. CMAKE_FLAGS="$CMAKE_FLAGS -DCMAKE_C_FLAGS=$CFLAGS"
  26. CMAKE_FLAGS="$CMAKE_FLAGS -DCMAKE_INSTALL_PREFIX=$PREFIX"
  27. CMAKE_FLAGS="$CMAKE_FLAGS -DHAVE_FESETROUND=0"
  28. CMAKE_FLAGS="$CMAKE_FLAGS --enable-null --enable-sdl --disable-vorbis --disable-mp3 --disable-smpeg --disable-alsa --disable-oss"
  29. AL_VERSION="1.6.372"
  30. AL_FILE="$DOWNLOAD_DIR/openal-soft-$AL_VERSION.tar.bz2"
  31. download "http://kcat.strangesoft.net/openal-releases/openal-soft-$AL_VERSION.tar.bz2" "$AL_FILE"
  32. execute tar -xf "$AL_FILE"
  33. execute pushd "openal-soft-$AL_VERSION"
  34. execute cmake $CMAKE_FLAGS .
  35. execute make -j 2
  36. execute make install
  37. execute popd "openal-soft-$AL_VERSION"