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 neomutt +imap +smtp +ssl +sasl +headercache
port install w3m # needed by mutt to convert html pages to txt
port install par # used to reformat text (justify)
port install encfs # FUSE-based cryptographic filesystem
port install wget +ssl
port install nmap
port install htop
port install iftop   
port install coreutils
port install findutils
port install yajl jq # json_reformat, json_verify
port install ImageMagick
port install recode
port install pandoc
port install pdftk

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