MKPATCHES(1)

NAME
mkpatches - create patch files appropriate for pkgsrc

SYNOPSIS
mkpatches [-hvw] [-c | -r] [-D | -d dir]

DESCRIPTION
mkpatches is a perl script that simplifies creating patches from a changed work tree if for each changed file the original was kept with an added extension “.orig”.

mkpatches must be called from the package's main directory, that is ${PKGSRC}/category/program. It then proceeds to find all files that match the pattern “*.orig”. Each of these is then compared to the changed file of the same name (with no “.orig” extension) using pkgdiff(1).

The resulting patches are saved in the package's patches directory (usually patches/) and can be easily compared to the currently existing set using patchdiff(1) or cvs diff.

If the new patch differs from an existing patch only due to line numbers or RCS Ids, the old patch will be kept unchanged.

Supported options are:

-c  Clean up backup patches of previous runs. Use this after you're finished working on the patch set and committed it.

-D  Use $WRKDIR/.newpatches for patches. See -d for more details.

-d dir
    Use dir for patches. Copies any existing patches there on the first run and then creates or updates patches only there. Use this e.g. if you have a read-only pkgsrc.

-h  Show a short usage.

-r  Revert the changes. Removes the new patches and puts the original patches back.

-v  More verbose output.

-w  Look for changes in $WRKDIR instead of the default $WRKSRC. Usually not needed and slower.

SEE ALSO
cvs(1), patchdiff(1), pkgdiff(1)