-
Notifications
You must be signed in to change notification settings - Fork 43
Using Portsnap on DragonFly
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.
- Fetch http://leaf.dragonflybsd.org/~marino/portsnap-for-df.tar.bz2
- Extract it, e.g. "cd ~/ && tar -xf /portsnap-for-df.tar.bz2"
- cd portsnap
- make
- make install clean
- /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.