Skip to content

Using Portsnap on DragonFly

jrmarino edited this page Jan 18, 2013 · 1 revision

DPorts is based on the FreeBSD Ports Collection (FPC), but a port is not introduced into DPorts until it successfully builds. So how does one obtain the FreeBSD port in order to modify it to build?

A good way is to install "portsnap" on DragonFly.

  1. Fetch http://leaf.dragonflybsd.org/~marino/portsnap-for-df.tar.bz2
  2. Extract it, e.g. "cd ~/ && tar -xf /portsnap-for-df.tar.bz2"
  3. cd portsnap
  4. make
  5. make install clean
  6. /usr/local/bin/portsnap fetch extract

When that operation is done, there should be a fully populated /usr/ports directory. You can change to any directory within /usr/ports and attempt to build the port just as you would any dport. This works because the /usr/dports/Mk/bsd.*.mk files are used. The work directory locations are also the same, /usr/obj/dports/.

The only caveat is when a port references a dport that doesn't yet exist. Unfortunately, ports use absolute paths, e.g. $PORTSDIR/x11/kdelibs4 and $PORTSDIR=/usr/dports (don't override this because then /usr/ports/Mk would be used and that won't work.) In this case, you'll have to copy the port into the DPorts tree to satisfy whatever include is trying to reference it.

Portsnap instructions (FreeBSD handbook)

Clone this wiki locally