This is an old revision of the document!
Porter's workflow AKA Hack-a-port
Documenting the workflow I've established to hack ports WORK IN PROGRESS - INCOMPLETE - YMMV
Tools required
- devel/git : Minimized depedencies CONTRIB=off CVS=off GUI=off NLS=off P4=off
- svn(lite) : in base is sufficient (or devel/subversion from ports)
- ports-mgmt/portlint : Sanity checks
Workflow
One-time setup
Hack a port
- Create the category dir in
<ports> - In the category dir using svn
svn co https://svn0.eu.FreeBSD.org/ports/head/<category>/<port> - In
<ports>rungit add . - Modify your port
- whatever needs to change, see next sections
- in
<ports>/<category>/<port>update local svnsvn add/move/copy/remove <file>svn statusto check your worksvn updateto update your local svn tree
- in
<ports>/<category>/<port>runsvn diff > ../../patch-<port>-<version>-<shortdesc>
Quality checks
portlintmake check-plist
Tips-'n-tricks
make makepatchis your friend- run
make patchto extract and patch the port - Copy the file you want to modify to
<file>.orig - Edit the file
- In the port-dir run
make makepatchto update all patches in thefilesdir - NB. There can also be PATCH commands in the Makefile and extra-patches…