Rebuild a port on FreeBSD

To rebuild a port and ports which this port depends on:

portmaster -DRf origin/port
portupgrade -Rf origin/port

To rebuild a port and ports which depends on it:

portmaster -Drf origin/port
portupgrade -rf origin/port

To list packages with their dependencies

pkg query -g "%n:%dn" '*'

Then use script to rebuild required – example for openssl

sh
REBUILD=$(pkg query -g "%n:%dn" '*' | grep openssl | cut -d : -f 1 | sort -u)
portmaster -D $REBUILD

Problems installing mate-icon-theme on FreeBSD

[Update]
Try to rebuild mapping util

# pkg which /usr/local/libexec/icon-name-mapping
/usr/local/libexec/icon-name-mapping was installed by package icon-naming-utils-0.8.90_1            
# portmaster -D icon-naming-utils

Just in case mount yours ports tree on /usr/ports


# mount -t nullfs /usr/jails/ports /usr/ports

Build and install package


# make install
===>  Installing for mate-icon-theme-1.18.2
===>  Checking if mate-icon-theme already installed
===>   Registering installation for mate-icon-theme-1.18.2
pkg-static: Unable to access file /usr/ports/x11-themes/mate-icon-theme/work/stage/usr/local/share/icons/mate/16x16/actions/add.png:No such file or directory
pkg-static: Unable to access file /usr/ports/x11-themes/mate-icon-theme/work/stage/usr/local/share/icons/mate/16x16/actions/appointment.png:No such file or directory
pkg-static: Unable to access file /usr/ports/x11-themes/mate-icon-theme/work/stage/usr/local/share/icons/mate/16x16/actions/back.png:No such file or directory
pkg-static: Unable to access file /usr/ports/x11-themes/mate-icon-theme/work/stage/usr/local/share/icons/mate/16x16/actions/bookmark_add.png:No such file or directory
pkg-static: Unable to access file /usr/ports/x11-themes/mate-icon-theme/work/stage/usr/local/share/icons/mate/16x16/actions/bookmarks_list_add.png:No such file or directory
pkg-static: Unable to access file /usr/ports/x11-themes/mate-icon-theme/work/stage/usr/local/share/icons/mate/16x16/actions/bottom.png:No such file or directory
pkg-static: Unable to access file /usr/ports/x11-themes/mate-icon-theme/work/stage/usr/local/share/icons/mate/16x16/actions/centrejust.png:No such file or directory
pkg-static: Unable to access file /usr/ports/x11-themes/mate-icon-theme/work/stage/usr/local/share/icons/mate/16x16/actions/down.png:No such file or directory
pkg-static: Unable to access file /usr/ports/x11-themes/mate-icon-theme/work/stage/usr/local/share/icons/mate/16x16/actions/editclear.png:No such file or directory
pkg-static: Unable to access file /usr/ports/x11-themes/mate-icon-theme/work/stage/usr/local/share/icons/mate/16x16/actions/editcopy.png:No such file or directory

(snip)

pkg-static: Unable to access file /usr/ports/x11-themes/mate-icon-theme/work/stage/usr/local/share/icons/menta/48x48/status/gnome-netstatus-txrx.png:No such file or directory
pkg-static: Unable to access file /usr/ports/x11-themes/mate-icon-theme/work/stage/usr/local/share/icons/menta/48x48/status/nm-adhoc.png:No such file or directory
pkg-static: Unable to access file /usr/ports/x11-themes/mate-icon-theme/work/stage/usr/local/share/icons/menta/48x48/status/nm-device-wired.png:No such file or directory
pkg-static: Unable to access file /usr/ports/x11-themes/mate-icon-theme/work/stage/usr/local/share/icons/menta/48x48/status/nm-device-wireless.png:No such file or directory
pkg-static: Unable to access file /usr/ports/x11-themes/mate-icon-theme/work/stage/usr/local/share/icons/menta/48x48/status/nm-no-connection.png:No such file or directory
pkg-static: Unable to access file /usr/ports/x11-themes/mate-icon-theme/work/stage/usr/local/share/icons/menta/48x48/status/stock_open.png:No such file or directory
*** Error code 74

Stop.
make: stopped in /usr/ports/x11-themes/mate-icon-theme

Create text file with output and create not existing files then finally install package


# make install > & output.txt
# cat output.txt | grep Unable | awk '{print $6}' | cut -d ':' -f 1 | xargs touch

# make install
===>  Installing for mate-icon-theme-1.18.2
===>  Checking if mate-icon-theme already installed
===>   Registering installation for mate-icon-theme-1.18.2
Installing mate-icon-theme-1.18.2...