Personalised patches in ports

RW fbsd06 at
Thu Nov 22 19:46:58 PST 2007

On Wed, 21 Nov 2007 22:19:55 +0000
Bob <bob at> wrote:

> Hi folks:
> What is the approved method of applying personalised patches to ports
> sources?
> A current example, which was no problem under Linux, is giving me a
> bit of a hassle under FreeBSD>
> I use pdftotext extensively to translate pdf files to ascii text.
> Sometimes, a publicly posted PDF file has it's security option turned
> on, making pdftotext refuse to translate the file into text. 
> It's a simple hack on the source code to skip security checking, and
> under Linux I just patch the sources to not check for same.
> How can I incorporate my patch into the portupgrade system, so that an
> upgrade of Xpdf will apply my patch? If I download the bzip file,
> apply the patch, re-bzip the sources, and then try to force an
> upgrade, the checksum fails (as expected).
> How does one do thes properly?

It's actually much easier than in Linux, since the ports system already
has to do this. Each port has a files directory into which you can put
patches, which will get applied automatically each time you build. See
the porter's handbook for details:

More information about the freebsd-questions mailing list