]> granicus.if.org Git - handbrake/commitdiff
scripts: Update mac-toolchain-build to add nasm.
authorBradley Sepos <bradley@bradleysepos.com>
Thu, 28 Dec 2017 18:49:12 +0000 (13:49 -0500)
committerBradley Sepos <bradley@bradleysepos.com>
Wed, 10 Jan 2018 06:39:54 +0000 (01:39 -0500)
scripts/mac-toolchain-build

index b3af7341bcdb5fd65e01f12a88bec5035ff73dc1..603e088d7cddad96d4c24ae1dde885fa985bdc12 100755 (executable)
@@ -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