port to homebrew instead of macports
authorMatthias Rampke <matthias@rampke.de>
Thu, 11 Aug 2011 21:08:03 +0000 (23:08 +0200)
committerMatthias Rampke <matthias@rampke.de>
Thu, 11 Aug 2011 21:08:03 +0000 (23:08 +0200)
summon-arm-toolchain

index c36e03eac18b8512d5cd818a89f2f5ba73e2582a..cfa1b5a5134582c567cc07224a8977be7ba47654 100755 (executable)
@@ -116,34 +116,22 @@ case "$(uname)" in
        echo "Found Darwin OS."
 
        # darwin dependencies
-       DARWINDEPS="gnutar mpfr libmpc gmp"
+       DARWINDEPS="gnu-tar wget mpfr libmpc gmp"
   DARWINDEPSCOUNT=4
 
-  GCCFLAGS="${GCCFLAGS} \
-            --with-gmp=${DARWIN_OPT_PATH} \
-                 --with-mpfr=${DARWIN_OPT_PATH} \
-                 --with-mpc=${DARWIN_OPT_PATH} \
-                       -with-libiconv-prefix=${DARWIN_OPT_PATH}"
-
-  echo "Attempting to automatically check if common dependencies are installed on your system"
-  if ! which port > /dev/null; then
-    echo "MacPorts not installed."
+  echo "Installing dependencies"
+  if ! which brew > /dev/null; then
+    echo "homebrew not installed."
   else
-    pc=`port installed ${DARWINDEPS} | wc -l | tr -d " "`
-    if [ ${pc} -lt $[${DARWINDEPSCOUNT}+1] ];
-    then
-      echo "Something is missing, do you want to install everything needed?"
-      echo "(You need super user rights to do this.)"
-
-      if [ read = "y" || read = "yes" ];
-      then
-        sudo port install ${DARWINDEPS}
-      fi
-    else
-      echo "Found: "${DARWINDEPS}"!"
-    fi
+    brew install ${DARWINDEPS} | grep -v '^Warning: Formula already installed: '
   fi
 
+  GCCFLAGS="${GCCFLAGS} \
+      --with-gmp=$(brew --prefix gmp) \
+      --with-mpfr=$(brew --prefix mpfr) \
+                  --with-mpc=$(brew --prefix mpc)
+  -with-libiconv-prefix=$(brew --prefix libiconv)"
+
   TAR=gnutar
 
                  --with-libiconv-prefix=${DARWIN_OPT_PATH}"