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

port install coreutils
port install curl +http2
port install wget
port install mutt +sasl +lmdb
port install oath-toolkit
port install par # used to reformat text (justify)
port install jq
port install findutils
port install gnupg2
port install htop
port install mediainfo
port install nmap
port install openconnect
port install rsync
port install screen
port install xauth
port install w3m # needed by mutt to convert html pages to txt
port install ImageMagick
#port install encfs

Issues with encfs on macOS Catalina

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!!