UPDATE-PATCHES(1)

NAME
update-patches - create or update patches for a given port

SYNOPSIS
update-patches

DESCRIPTION
update-patches is a helper script for the target update-patches in bsd.port.mk(5). It takes no argument, but uses quite a few environment variables as implicit parameters.

update-patches looks under WRKDIST for patched files. Those are files with extension PATCHORIG, except for those matching also DISTORIG.

Once those files are found, they are matched against the contents of directory PATCHDIR, most specifically files matching wildcard PATCH_LIST. Matching files are regenerated on the basis of

    $ diff -u -p -a ${DIFF_ARGS} $file$PATCHORIG $file

and compared. Modified patches are updated and reported, new patches are generated, and old patches that no longer seem to exist are also reported.

As an exception, if a $file.beforesubst original file is found, it is used instead of $file in the diff line:

    $ diff -u -p -a ${DIFF_ARGS} $file$PATCHORIG $file.beforesubst

The patch header is normalized to always be:

    Index: $file
    --- $file.orig
    +++ $file

Patches with problematic cvs(1) keywords may be fixed if possible, and reported if not.

update-patches prints the list of changed patches for further study.

ENVIRONMENT

DIFF_ARGS
    Extra parameters to insert into diff(1).

DISTORIG
    Extension to original files to ignore entirely.

FORCE_REGEN
    Force patches to be regenerated even if they didn't change.

PATCHDIR
    Path to existing and generated patches.

PATCHORIG
    Extension to match for finding original files.

PATCH_LIST
    Only compare new patches to existing patches matching that pattern.

PATCH_VERBOSE
    Force update-patches to tell about everything it does.

WRKDIST
    Directory to scan for files to compare.

SEE ALSO
cvs(1), diff(1), patch(1)