Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 Jan 2007 10:38:04 -0500
From:      Wesley Shields <wxs@atarininja.org>
To:        Scot Hetzel <swhetzel@gmail.com>
Cc:        Paul Hoffman <phoffman@proper.com>, freeBSD-ports@freebsd.org
Subject:   Re: Modifying a port and keeping the mods across updates
Message-ID:  <20070120153804.GA77608@atarininja.org>
In-Reply-To: <790a9fff0701192137y703108i421c05422eda39a7@mail.gmail.com>
References:  <p06240841c1d75354626b@10.20.30.108> <790a9fff0701192137y703108i421c05422eda39a7@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Jan 19, 2007 at 11:37:59PM -0600, Scot Hetzel wrote:
> On 1/19/07, Paul Hoffman <phoffman@proper.com> wrote:

[...]

> >(2) For a particular port, I need to patch a particular source file.
> >This is a patch that will probably be in a future release. Same
> >question as above: what's the proper way to do this that will live
> >beyond the next cvsup? I know how to use 'patch' to apply patches,
> >but not yet to create them.
> >
> To create a patch you first need to create a backup of the original
> file, then create the diff.
> 
> cp file.c file.c-orig
> <make changes to file.c
> diff -u file.c-orig file.c > patch-file.c
> 
> Then place the patch file into /usr/ports/<category>/<portname>/files.

There is a makepatch target which will do the diff and place the output
in the appropriate place for you.  I stumbled across this a few weeks
ago and it has already proved to be useful to me.  :)

-- WXS



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