Patch creation question

Scot Hetzel swhetzel at
Tue Aug 24 15:31:19 PDT 2004

On Tue, 24 Aug 2004 15:54:48 -0600, Galen Yalch <gyalch at> wrote:
> I am trying to apply the autocreate INBOX patch to the cyrus imap port and
> can't figure out how to create the patch file.  I ahve downloaded the .diff
> file but I can't find out how to create a patch file from this.  Any help
> would be great.  Thanks.
The .diff file is the patch file.  To apply the patch manually, you
need to use the patch program as follows:

cd <cyrus imap src>
patch [-p 1] < patch_file.diff

I you want to have the port patch the sources, then you need to edit
the ports Makefile and do the following:

1. Add the location of the patch to PATCH_SITES
2. The name of the patch file to PATCHFILES
3. Add approiate CONFIGURE_ARGS, if needed
4. Run "make makesum" to regenerate distinfo.
5. Run "make patch -DPATCH_DEBUG"
    - needed to ensure that all the patch files apply correctly
    - if a patch file fails, you'll need to fix the patch file, and
re-run step 5.
6. Run "make configure"
7. Run "env PREFIX=/usr/local2;  make build"
8. Run "env PREFIX=/usr/local2; make install"
9. Run "env PREFIX=/usr/local2; make deinstall", to ensure no files
are left over
    - if there are left over files, fix pkg-plist.

NOTE: if any of the steps fails, you'll need to fix, and then "make
clean" and start over with step 5.

More information about the freebsd-ports mailing list