Patching ports

Matthew Seaman m.seaman at infracaninophile.co.uk
Wed May 5 05:29:39 PDT 2004


On Wed, May 05, 2004 at 12:11:22PM +0000, Mikkel Christensen wrote:

> How do I add a patch to a certain port?
> Usually I would use the "patch" program to add the patch to the source code.
> But when using ports the system begins compiling right after rewtrieving the source. Thus not giving me a change to apply the patch.
> I've seen a folder named "files" in which patches part of the port seem to be located. But just adding the patchfile here apperently wont do much good.
> I've tried using the "PATCHFILES" variable in the Makefile but then the system complains the my patchfile does not have a matching MD5 hash.
> Does anyone know how to handle this issue?

When building a port you can type:

    # make extract

which will download any sources, check the size and checksums, unpack
the sources into the work directory and apply any patches that come
with the port.  And then stop.  At this point you can make whatever
modifications you wish to yourself, and then finish off the build by

    # make

So long as your patch doesn't add or delete files from the expected
packing list then just doing a:

    # make install

will work.

It is also possible to put your patch file into the port's files
directory and have it automatically applied, but you need to take care
to account for the order that patch files get applied.

	Cheers,

	Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                      Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey         Marlow
Tel: +44 1628 476614                                  Bucks., SL7 1TH UK
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20040505/82e5c151/attachment.bin


More information about the freebsd-questions mailing list