Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 05 May 2004 08:22:51 -0400
From:      Bill Moran <wmoran@potentialtech.com>
To:        Mikkel Christensen <mikkel@talkactive.net>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Patching ports
Message-ID:  <4098DC9B.6010407@potentialtech.com>
In-Reply-To: <200405051211.22184.mikkel@talkactive.net>
References:  <200405051211.22184.mikkel@talkactive.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Mikkel Christensen wrote:
> Hi
> 
> 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?

The manual way to patch stuff is this:

make extract
cd work/<any other subdirs you need to cd into>
<patch the source>
cd <back to the port dir>
make

"make extract" will fetch the tarball and extract it into the work directory.  There you
can patch it to your heart's content and return to do "make" when done.  You can also
do "make patch" instead of "make extract" - this will do the extract step and also apply
any patches provided by FreeBSD.  It's a matter of whether you want to apply your patches
before or after the FreeBSD patches.

-- 
Bill Moran
Potential Technologies
http://www.potentialtech.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4098DC9B.6010407>