DragonFlyBSD was based on NetBSD’s pkgsrc. Since DragonFlyBSD 3.4, FreeBSD port tree has been ported to DragonFly, and renamed it dports.
The ports tree containt all softwares. It’s an essential element for 3rd softwares and libraries. Each port is categorized in one directory (databases, www, converters…)
DragonFlyBSD is based on git to get the ports tree. To extract first snapshot, we use this command:
cd /usr
make dports-create-shallow
This command will clone git repository to /usr/dports directory. You can note that the repository is on github.
Like git, here is the command to update the tree.
cd /usr/dports
git pull
To see the installed port list:
pkg info
To install a port, you must go to the good directory (here mysql 5.5 service) and type make install clean
cd /usr/dports/databases/mysql55-server
make install clean
This make command will compile, install files and clean compile files. In some cases, ports need some hacks, then a dialog window will appear to let you choose compile options.
If you have done a mistake, or you need to add some functions, you may want to reconfigure port. Go to the port directory and type:
make config
To manage update, we will use the better product for FreeBSD, which works also on DragonFlyBSD: portmaster. Then we compile it:
cd /usr/dports/port-mgmt/portmaster
make install clean
Now, to update all installed ports, you can type:
portmaster -a
After an OS migration, it would be interesting to compile all ports, because of system libraries updates. This is recommended. You can force update of all ports, which recompile all of them.
portmaster -af
Two method exists, the first is to go to port directory and type:
make deinstall
The second method is proper and manage dependencies is to do a pkg info to find the port and then a pkg delete of the port (+ version)
pkg delete zsh-5.0.2