Cross-Platform build scripts for audio plugins
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

74 lines
2.2KB

  1. #!/bin/bash
  2. set -e
  3. cd $(dirname ${0})
  4. PAWPAW_ROOT="${PWD}"
  5. # ---------------------------------------------------------------------------------------------------------------------
  6. # check target
  7. target="${1}"
  8. if [ -z "${target}" ]; then
  9. echo "usage: ${0} <target>"
  10. exit 1
  11. fi
  12. # ---------------------------------------------------------------------------------------------------------------------
  13. # run bootstrap dependencies
  14. export PAWPAW_SKIP_SAMPLERATE=1
  15. ./bootstrap-common.sh "${target}"
  16. # ---------------------------------------------------------------------------------------------------------------------
  17. # source setup code
  18. source setup/check_target.sh
  19. source setup/env.sh
  20. source setup/functions.sh
  21. source setup/versions.sh
  22. # ---------------------------------------------------------------------------------------------------------------------
  23. # file/magic (posix only)
  24. if [ "${WIN32}" -eq 0 ]; then
  25. download file "${FILE_VERSION}" "${FILE_URL}"
  26. build_autoconf file "${FILE_VERSION}"
  27. fi
  28. # ---------------------------------------------------------------------------------------------------------------------
  29. # liblo
  30. LIBLO_EXTRAFLAGS="--enable-threads --disable-examples --disable-tools"
  31. if [ "${CROSS_COMPILING}" -eq 1 ]; then
  32. LIBLO_EXTRAFLAGS+=" --disable-tests"
  33. fi
  34. # auto-detection fails
  35. if [ "${MACOS}" -eq 1 ]; then
  36. LIBLO_EXTRAFLAGS+=" ac_cv_func_select=yes ac_cv_func_poll=yes ac_cv_func_setvbuf=yes"
  37. if [ "${MACOS_UNIVERSAL}" -eq 1 ]; then
  38. LIBLO_EXTRAFLAGS+=" ac_cv_c_bigendian=universal"
  39. fi
  40. fi
  41. download liblo "${LIBLO_VERSION}" "${LIBLO_URL}"
  42. build_autoconf liblo "${LIBLO_VERSION}" "${LIBLO_EXTRAFLAGS}"
  43. # FIXME tests fail on macOS
  44. if [ "${CROSS_COMPILING}" -eq 0 ] && [ "${MACOS}" -eq 0 ]; then
  45. run_make liblo "${LIBLO_VERSION}" check
  46. fi
  47. # ---------------------------------------------------------------------------------------------------------------------
  48. # wine bootstrap for python (needed for cross-compilation)
  49. if [ "${WIN32}" -eq 1 ] && [ -n "${EXE_WRAPPER}" ] && [ ! -d "${WINEPREFIX}" ]; then
  50. wineboot -u
  51. fi
  52. # ---------------------------------------------------------------------------------------------------------------------