Michele Marcionelli - Head of IT at D-MATH

MacPorts Installation and hints

Installation from source

For more information see also https://www.macports.org/install.php.

Work as root

sudo bash

Get the latest version

V=$(curl -s https://www.macports.org | grep 'Latest' | sed 's#<[^>]*>##g; s/.*: //')

Download the source and unpack

cd /tmp/
curl -O http://distfiles.macports.org/MacPorts/MacPorts-$V.tar.bz2
tar jxf MacPorts-$V.tar.bz2
cd MacPorts-$V
chown -R 0:0 .

Compile, install and cleanup

./configure && make && make install
cd ..
rm -rf /tmp/MacPorts-*

Extend you environment (consider doing this also in your .profile):

export PATH="/opt/local/bin:${PATH}";
export MANPATH="/opt/local/share/man:${MANPATH}";

Update

port selfupdate
port upgrade outdated

Some important commands

Get the list of installed ports (without dependencies)

port list requested

Get the list of installed files for an installed port

port contents <port_name>

List all port's dependencies

port deps <port_name>

List all dependents of a port

port dependents <port_name>

Uninstal a port including dependencies (that are not required by other ports)

port uninstall --follow-dependencies <port_name>

I can't live without these ports

bash-completion
coreutils
findutils
gawk
gh
gnupg2
grep
htop
ImageMagick7
ipcalc
mediainfo
mutt +sasl +lmdb
nmap
oath-toolkit
par
pstree
py312-pip
shellcheck
w3m
wireguard-tools qrencode
zbar

Issues with encfs (obsolete?)

There is a problem with the osxfuse dependency which do not compile on macOS Catalina. Below you will find my workaround.

Donwload MacFUSE manually from the following URL and install it:

https://github.com/osxfuse/osxfuse/releases

Afterwards you have to tell the port of encfs to ignore the official dependency. Run:

port edit encfs

and remove the string port:osxfuse.

Finally tell the port of encfs where to finde MacFUSE. Run again:

port edit encfs

and after the block checksums add the following lines:

configure.args-append \
    -DCMAKE_INCLUDE_PATH=/usr/local/include \
    -DCMAKE_LIBRARY_PATH=/usr/local/lib

Now you should be able to install encfs successfully:

port install encfs

Cheers!!