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...)
Get the first snapshot
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:
Install a port
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.
Change the port configuration
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:
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:
Compile all installed ports
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.
Uninstall a port
Two method exists, the first is to go to port directory and type:
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