Skip to content

Commit

Permalink
Improve usage of Mac ports
Browse files Browse the repository at this point in the history
  • Loading branch information
fjtrujy committed May 6, 2024
1 parent bb80cae commit 8756e33
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
7 changes: 4 additions & 3 deletions scripts/001-binutils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,11 @@ if [ "$(uname -s)" = "Darwin" ]; then
## Check if using brew
if command -v brew &> /dev/null; then
TARG_XTRA_OPTS="--with-gmp=$(brew --prefix gmp) --with-mpfr=$(brew --prefix mpfr)"
fi
elif command -v port &> /dev/null; then
## Check if using MacPorts
if command -v port &> /dev/null; then
TARG_XTRA_OPTS="--with-gmp=$(port -q prefix gmp) --with-mpfr=$(port -q prefix mpfr)"
MACPORT_BASE=$(dirname `port -q contents gmp|grep gmp.h`|sed s#/include##g)
echo Macport base is $MACPORT_BASE
TARG_XTRA_OPTS="--with-gmp=$MACPORT_BASE --with-mpfr=$MACPORT_BASE"
fi
fi
Expand Down
7 changes: 4 additions & 3 deletions scripts/002-gcc-stage1.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,11 @@ if [ "$(uname -s)" = "Darwin" ]; then
## Check if using brew
if command -v brew &> /dev/null; then
TARG_XTRA_OPTS="--with-gmp=$(brew --prefix gmp) --with-mpfr=$(brew --prefix mpfr) --with-mpc=$(brew --prefix libmpc)"
fi
elif command -v port &> /dev/null; then
## Check if using MacPorts
if command -v port &> /dev/null; then
TARG_XTRA_OPTS="--with-gmp=$(port -q prefix gmp) --with-mpfr=$(port -q prefix mpfr) --with-mpc=$(port -q prefix libmpc)"
MACPORT_BASE=$(dirname `port -q contents gmp|grep gmp.h`|sed s#/include##g)
echo Macport base is $MACPORT_BASE
TARG_XTRA_OPTS="--with-gmp=$MACPORT_BASE --with-mpfr=$MACPORT_BASE --with-mpc=$MACPORT_BASE"
fi
fi
Expand Down

0 comments on commit 8756e33

Please sign in to comment.