1 min read 259 words Updated May 30, 2026 Created May 09, 2026
#freebsd

FreeBSD Port Tips

Tips and tricks for creating, updating and maintaining FreeBSD ports, by Delimiter

Creating and submitting port updates

General procedure that I use to update a port named foo to version 1.2.3. Download the new tarball from the source or vendor site and put in /usr/ports/distfiles

cd /usr/ports/misc/foo
make clean
cd ..
cp -pr foo foo.old; cd foo

Update Makefile to reflect the new version

make makesum; make; make deinstall; make reinstall clean

Assuming everything worked, generate a patch file to submit for the problem report.

cd /usr/ports/misc
diff -ruN foo.old/ foo/  > /tmp/foo-1.2.3.patch
send-pr -a /tmp/foo-1.2.3.patch

Complete a problem report to FreeBSD so the maintainer can review your patch and a committer can commit it to the master sources in cvs. More information about this process is found at https://docs.freebsd.org/en/articles/problem-reports/index.html

Updating a specific port using cvsup

Use the -i flag to cvsup to limit it to a specific port name.

cvsup -g -L2 -i portname /etc/ports-supfile

Specifying GCC version compatibility

This can be used in a port's Makefile to enforce a minimum version of GCC

USE_GCC= 3.4+

This clause can be used in a port's Makefile to indicate brokenness on a particular version of GCC.

.if ${OSVERSION} >= 700042
BROKEN=         Does not compile with GCC 4.2
.endif

Maintainer vs. Committer

This email message provides a great explanation for how to create and submit updates to ports.

Reference Documentation