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.

93 lines
3.5KB

  1. #!/bin/bash
  2. set -e
  3. cd $(dirname ${0})
  4. PAWPAW_ROOT="${PWD}"
  5. # ---------------------------------------------------------------------------------------------------------------------
  6. target="${1}"
  7. if [ -z "${target}" ]; then
  8. echo "usage: ${0} <target>"
  9. exit 1
  10. fi
  11. # ---------------------------------------------------------------------------------------------------------------------
  12. # TODO check for depedencies:
  13. # - curl
  14. # - cmake
  15. # - make
  16. # - jq
  17. # - patch
  18. # - python (waf, meson)
  19. # - sed
  20. # - tar
  21. source setup/check_target.sh
  22. source setup/env.sh
  23. source setup/functions.sh
  24. source setup/versions.sh
  25. mkdir -p "${PAWPAW_BUILDDIR}"
  26. mkdir -p "${PAWPAW_DOWNLOADDIR}"
  27. mkdir -p "${PAWPAW_PREFIX}"
  28. mkdir -p "${PAWPAW_TMPDIR}"
  29. # ---------------------------------------------------------------------------------------------------------------------
  30. # let's use native glib for linux builds
  31. if [ "${LINUX}" -eq 1 ] && [ ! -e "${TARGET_PKG_CONFIG_PATH}/glib-2.0.pc" ]; then
  32. mkdir -p ${TARGET_PKG_CONFIG_PATH}
  33. ln -s $(pkg-config --variable=pcfiledir glib-2.0)/g{io,lib,module,object,thread}-2.0.pc ${TARGET_PKG_CONFIG_PATH}/
  34. ln -s $(pkg-config --variable=pcfiledir libpcre)/libpcre.pc ${TARGET_PKG_CONFIG_PATH}/
  35. fi
  36. # ---------------------------------------------------------------------------------------------------------------------
  37. # pkgconfig
  38. download pkg-config "${PKG_CONFIG_VERSION}" "https://pkg-config.freedesktop.org/releases"
  39. build_host_autoconf pkg-config "${PKG_CONFIG_VERSION}" "--enable-indirect-deps --with-internal-glib --with-pc-path=${TARGET_PKG_CONFIG_PATH}"
  40. # ---------------------------------------------------------------------------------------------------------------------
  41. # libogg
  42. download libogg "${LIBOGG_VERSION}" "https://ftp.osuosl.org/pub/xiph/releases/ogg"
  43. patch_file libogg "${LIBOGG_VERSION}" "include/ogg/os_types.h" 's/__MACH__/__MACH_SKIP__/'
  44. build_autoconf libogg "${LIBOGG_VERSION}"
  45. # ---------------------------------------------------------------------------------------------------------------------
  46. # libvorbis
  47. download libvorbis "${LIBVORBIS_VERSION}" "https://ftp.osuosl.org/pub/xiph/releases/vorbis"
  48. build_autoconf libvorbis "${LIBVORBIS_VERSION}" "--disable-examples"
  49. # ---------------------------------------------------------------------------------------------------------------------
  50. # flac
  51. FLAC_EXTRAFLAGS="--disable-doxygen-docs --disable-examples --disable-thorough-tests"
  52. if [ "${MACOS_OLD}" -eq 1 ]; then
  53. FLAC_EXTRAFLAGS="${FLAC_EXTRAFLAGS} --disable-asm-optimizations"
  54. fi
  55. download flac "${FLAC_VERSION}" "https://ftp.osuosl.org/pub/xiph/releases/flac" "tar.xz"
  56. build_autoconf flac "${FLAC_VERSION}" "${FLAC_EXTRAFLAGS}"
  57. # ---------------------------------------------------------------------------------------------------------------------
  58. # libsamplerate
  59. download libsamplerate "${LIBSAMPLERATE_VERSION}" "http://www.mega-nerd.com/SRC"
  60. build_autoconf libsamplerate "${LIBSAMPLERATE_VERSION}" "--disable-fftw --disable-sndfile"
  61. # ---------------------------------------------------------------------------------------------------------------------
  62. # libsndfile
  63. download libsndfile "${LIBSNDFILE_VERSION}" "http://www.mega-nerd.com/libsndfile/files"
  64. patch_file libsndfile "${LIBSNDFILE_VERSION}" "configure" 's/ -Wvla//'
  65. build_autoconf libsndfile "${LIBSNDFILE_VERSION}" "--disable-full-suite --disable-alsa --disable-sqlite"
  66. # ---------------------------------------------------------------------------------------------------------------------