Skip to content

Commit c35ac85

Browse files
committed
Improve usage of Mac ports
1 parent efefcf4 commit c35ac85

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

scripts/001-binutils.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,11 @@ if [ "$(uname -s)" = "Darwin" ]; then
4242
## Check if using brew
4343
if command -v brew &> /dev/null; then
4444
TARG_XTRA_OPTS="--with-gmp=$(brew --prefix gmp) --with-mpfr=$(brew --prefix mpfr)"
45-
fi
45+
elif command -v port &> /dev/null; then
4646
## Check if using MacPorts
47-
if command -v port &> /dev/null; then
48-
TARG_XTRA_OPTS="--with-gmp=$(port -q prefix gmp) --with-mpfr=$(port -q prefix mpfr)"
47+
MACPORT_BASE=$(dirname `port -q contents gmp|grep gmp.h`|sed s#/include##g)
48+
echo Macport base is $MACPORT_BASE
49+
TARG_XTRA_OPTS="--with-gmp=$MACPORT_BASE --with-mpfr=$MACPORT_BASE"
4950
fi
5051
fi
5152

0 commit comments

Comments
 (0)