Skip to content

Commit 14693ec

Browse files
authored
Add files via upload
1 parent b8095b1 commit 14693ec

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

HOME/bin/install_macports.sh

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
#http://truongtx.me/2013/11/08/macports-from-home-directory/
55

66
#this is the file to download
7-
FILE="MacPorts-2.5.4.tar.bz2"
7+
FILE="MacPorts-2.6.4.tar.bz2"
88

99
TMPDIR=/tmp/macports
1010

1111
export PATH=/bin:/sbin:/usr/bin:/usr/sbin
1212

13-
WORKDIR=$HOME/local/macports
13+
MP_PREFIX=$HOME/local/macports
1414

1515
mkdir -p $WORKDIR
1616
mkdir -p $TMPDIR
@@ -30,20 +30,30 @@ GROUP=`id -gn`
3030

3131
#./configure --enable-readline --prefix=$WORKDIR --with-install-user=$USER --with-install-group=$GROUP
3232
#./configure --enable-readline --prefix=$WORKDIR --with-install-user=$USER --with-applications-dir=$HOME/Applications
33-
./configure --enable-readline --prefix=$WORKDIR --with-install-user=$USER --with-install-group=$GROUP --with-applications-dir=$HOME/Applications
33+
34+
./configure --enable-readline --prefix=$MP_PREFIX --with-install-user=$USER --with-install-group=$GROUP --with-applications-dir=$HOME/Applications --without-startupitems
3435

3536
make
3637
make install
3738

39+
# Needed on ARM with Rosetta: https://trac.macports.org/wiki/BigSurProblems
40+
echo "build_arch arm64" >> $MP_PREFIX/etc/macports/macports.conf
41+
# https://guide.macports.org/#internals.configuration-files
42+
echo "prefix $MP_PREFIX" >> $MP_PREFIX/etc/macports/macports.conf
43+
echo "applications_dir $HOME/Applications" >> $MP_PREFIX/etc/macports/macports.conf
44+
echo "startupitem_install no" >> $MP_PREFIX/etc/macports/macports.conf
45+
46+
3847
rm -Rf $TMPDIR
3948

4049

4150
cat >> $HOME/.profile << EOF
4251
4352
# MacPorts
4453
if [ -d \$HOME/local/macports ]; then
45-
export PATH=\$HOME/local/macports/bin:\$HOME/local/macports/sbin:\$PATH
46-
export MANPATH=\$HOME/local/macports/share/man:\$MANPATH
54+
export MP_PREFIX=$HOME/local/macports
55+
export PATH=\$MP_PREFIX/bin:\$MP_PREFIX/sbin:\$PATH
56+
export MANPATH=\$MP_PREFIX/share/man:\$MANPATH
4757
fi
4858
4959
EOF

0 commit comments

Comments
 (0)