summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorBradley Sepos <[email protected]>2017-12-28 13:49:12 -0500
committerBradley Sepos <[email protected]>2018-01-10 01:39:54 -0500
commitb4e311b8fc02c302bac9b086ec7c725b92841186 (patch)
tree33447c3cd340a7cfd5fa6328c6b254ec9d1fc616 /scripts
parentd3eb32a2076c4a34aefeab1f939fe070c45ea5b0 (diff)
scripts: Update mac-toolchain-build to add nasm.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/mac-toolchain-build20
1 files changed, 17 insertions, 3 deletions
diff --git a/scripts/mac-toolchain-build b/scripts/mac-toolchain-build
index b3af7341b..603e088d7 100755
--- a/scripts/mac-toolchain-build
+++ b/scripts/mac-toolchain-build
@@ -13,7 +13,7 @@ if ! MAKEJOBS=$(sysctl -n hw.ncpu 2>/dev/null); then
MAKEJOBS="4"
fi
SUDO=
-TOTAL=6
+TOTAL=7
# functions
function print_fail_and_exit {
@@ -65,7 +65,10 @@ echo -en "${CREL}"
printf "Downloading [%02i/%02i] %s" "5" "${TOTAL}" "pkg-config 0.29.2"
curl https://pkg-config.freedesktop.org/releases/pkg-config-0.29.2.tar.gz -o "pkg-config-0.29.2.tar.gz" >/dev/null 2>&1 || print_fail_and_exit
echo -en "${CREL}"
-printf "Downloading [%02i/%02i] %s" "6" "${TOTAL}" "yasm 1.3.0"
+printf "Downloading [%02i/%02i] %s" "6" "${TOTAL}" "nasm 2.13.02"
+curl http://www.nasm.us/pub/nasm/releasebuilds/2.13.02/nasm-2.13.02.tar.bz2 -o "nasm-2.13.02.tar.bz2" >/dev/null 2>&1 || print_fail_and_exit
+echo -en "${CREL}"
+printf "Downloading [%02i/%02i] %s" "7" "${TOTAL}" "yasm 1.3.0"
curl https://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz -o "yasm-1.3.0.tar.gz" >/dev/null 2>&1 || print_fail_and_exit
echo -en "${CREL}"
printf "Downloading [%02i/%02i] complete.\n" "${TOTAL}" "${TOTAL}"
@@ -125,9 +128,20 @@ make --jobs="${MAKEJOBS}" >>../pkg-config-0.29.2.log 2>&1 || print_fail_and_exit
${SUDO} make install >>../pkg-config-0.29.2.log 2>&1 || print_fail_and_exit
echo -en "${CREL}"
+# nasm
+cd "${TEMP_DIR}"
+printf "Building [%02i/%02i] %s" "6" "${TOTAL}" "nasm 2.13.02"
+[[ "${SUDO}" != "" ]] && ${SUDO} -v
+tar -xf nasm-2.13.02.tar.bz2 >/dev/null 2>&1 || print_fail_and_exit
+cd nasm-2.13.02 >/dev/null 2>&1 || print_fail_and_exit
+./configure --prefix="${PREFIX}" >../nasm-2.13.02.log 2>&1 || print_fail_and_exit
+make --jobs="${MAKEJOBS}" >../nasm-2.13.02.log 2>&1 || print_fail_and_exit
+${SUDO} make install >../nasm-2.13.02.log 2>&1 || print_fail_and_exit
+echo -en "${CREL}"
+
# yasm
cd "${TEMP_DIR}"
-printf "Building [%02i/%02i] %s" "6" "${TOTAL}" "yasm 1.3.0"
+printf "Building [%02i/%02i] %s" "7" "${TOTAL}" "yasm 1.3.0"
[[ "${SUDO}" != "" ]] && ${SUDO} -v
tar -xf yasm-1.3.0.tar.gz >/dev/null 2>&1 || print_fail_and_exit
cd yasm-1.3.0 >/dev/null 2>&1 || print_fail_and_exit