From d0fea86cfdf710b24fbe99f99590f6f73cc98a7e Mon Sep 17 00:00:00 2001 From: Justin Bull Date: Tue, 17 Sep 2019 12:45:56 -0400 Subject: scripts: Include meson and ninja in mac toolchain. --- scripts/mac-toolchain-build | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/scripts/mac-toolchain-build b/scripts/mac-toolchain-build index 6b4a16bad..15b7c97a0 100755 --- a/scripts/mac-toolchain-build +++ b/scripts/mac-toolchain-build @@ -34,7 +34,7 @@ function mac_toolchain_build { MAKEJOBS="4" fi SUDO= - TOTAL=6 + TOTAL=8 # functions function print_fail_and_exit { @@ -89,6 +89,12 @@ function mac_toolchain_build { printf "Downloading [%02i/%02i] %s " "6" "${TOTAL}" "nasm 2.14.02" curl -Lf --connect-timeout 30 https://www.nasm.us/pub/nasm/releasebuilds/2.14.02/nasm-2.14.02.tar.bz2 -o "nasm-2.14.02.tar.bz2" >/dev/null 2>&1 || print_fail_and_exit echo -en "${CREL}" + printf "Downloading [%02i/%02i] %s " "7" "${TOTAL}" "ninja 1.9.0" + curl -Lf --connect-timeout 30 https://github.com/ninja-build/ninja/archive/v1.9.0.tar.gz -o "ninja-1.9.0.tar.gz" >/dev/null 2>&1 || print_fail_and_exit + echo -en "${CREL}" + printf "Downloading [%02i/%02i] %s " "8" "${TOTAL}" "meson 0.51.2" + curl -Lf --connect-timeout 30 https://github.com/mesonbuild/meson/archive/0.51.2.tar.gz -o "meson-0.51.2.tar.gz" >/dev/null 2>&1 || print_fail_and_exit + echo -en "${CREL}" printf "Downloading [%02i/%02i] complete.\n" "${TOTAL}" "${TOTAL}" # autoconf @@ -157,9 +163,28 @@ function mac_toolchain_build { ${SUDO} make install >>../nasm-2.14.02.log 2>&1 || print_fail_and_exit echo -en "${CREL}" + # ninja + cd "${TEMP_DIR}" + printf "Building [%02i/%02i] %s " "7" "${TOTAL}" "ninja 1.9.0" + [[ "${SUDO}" != "" ]] && ${SUDO} -v + tar -xf ninja-1.9.0.tar.gz >/dev/null 2>&1 || print_fail_and_exit + cd ninja-1.9.0 >/dev/null 2>&1 || print_fail_and_exit + ./configure.py --bootstrap >../ninja-1.9.0.log 2>&1 || print_fail_and_exit + ${SUDO} mv ninja /usr/local/bin >>../ninja-1.9.0.log 2>&1 || print_fail_and_exit + echo -en "${CREL}" + + # meson + cd "${TEMP_DIR}" + printf "Building [%02i/%02i] %s " "8" "${TOTAL}" "meson 0.51.2" + [[ "${SUDO}" != "" ]] && ${SUDO} -v + tar -xf meson-0.51.2.tar.gz >/dev/null 2>&1 || print_fail_and_exit + cd meson-0.51.2 >/dev/null 2>&1 || print_fail_and_exit + ${SUDO} python3 setup.py install >>../meson-0.51.2.log 2>&1 || print_fail_and_exit + echo -en "${CREL}" + # done printf "Building [%02i/%02i] complete.\n" "${TOTAL}" "${TOTAL}" - rm -rf "${TEMP_DIR}" + ${SUDO} rm -rf "${TEMP_DIR}" if [[ "${PREFIX}" != "/usr/local" ]]; then echo "bin: ${PREFIX}/bin" echo " add to your shell startup script (${HOME}/.bash_profile):" -- cgit v1.2.3