From 0d26a10ad8ef4bd03ce225edc6cfb1d62fd8a919 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20P=C3=B6chtrager?= Date: Mon, 11 Jan 2016 20:38:17 +0100 Subject: [PATCH] osxcross-macports: Add --i386 option (#62) --- tools/osxcross-macports | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/osxcross-macports b/tools/osxcross-macports index de80ae9..2e35ae8 100755 --- a/tools/osxcross-macports +++ b/tools/osxcross-macports @@ -19,6 +19,7 @@ PUBKEYRMD160="d3a22f5be7184d6575afcc1be6fdb82fd25562e8" PUBKEYSHA1="214baa965af76ff71187e6c1ac91c559547f48ab" PLATFORM=$(uname -s) +ARCH="x86_64" if [ $PLATFORM == "FreeBSD" ]; then WGETOPTS="--ca-certificate=" @@ -262,7 +263,7 @@ getPkgUrl() verboseMsg " $p" done - local pkg=$(echo "$pkgs" | grep $OSXVERSION | uniq | tail -n1) + local pkg=$(echo "$pkgs" | grep $OSXVERSION | grep $ARCH | uniq | tail -n1) verboseMsg " selected: $pkg" @@ -540,6 +541,8 @@ main() elif [ $opt == "-l" -o $opt == "--ldflags" ]; then showLDFLAGS $2 exit + elif [ $opt == "-32" -o $opt == "--i386" ]; then + ARCH="i386" elif [ $opt == "-sm" -o $opt == "--select-mirror" ]; then selectMirror exit