Date: Fri, 19 Jan 2007 23:37:59 -0600 From: "Scot Hetzel" <swhetzel@gmail.com> To: "Paul Hoffman" <phoffman@proper.com> Cc: freeBSD-ports@freebsd.org Subject: Re: Modifying a port and keeping the mods across updates Message-ID: <790a9fff0701192137y703108i421c05422eda39a7@mail.gmail.com> In-Reply-To: <p06240841c1d75354626b@10.20.30.108> References: <p06240841c1d75354626b@10.20.30.108>
next in thread | previous in thread | raw e-mail | index | archive | help
On 1/19/07, Paul Hoffman <phoffman@proper.com> wrote: > Greetings again. I have a two-part question that may be a ports FAQ, > but I couldn't find such a beast. > > (1) For a particular port, I need to change the the MAKE_ENV to make > it build the way I want. What is the proper way to do this that will > live beyond the next time I do a cvsup? That is, editing the Makefile > works just fine, but I want something that will live if the Makefile > gets reverted. > Use the sysutils/portconf port and define the apporiate variable in PREFIX/etc/ports.conf. > (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. Scot -- DISCLAIMER: No electrons were mamed while sending this message. Only slightly bruised.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?790a9fff0701192137y703108i421c05422eda39a7>