Next: Package versions, Previous: Package configuration, Up: Advanced configuration [Contents]
If you have a patch that you would like to apply to a package, the process can be automated by GSRC. First, in the package’s directory, make a subdirectory called files and move the patch file(s) there. Next, create two variables in the package’s Makefile:
PATCHFILES = my-patch.diff my-patch2.diff PATCHOPTS = -p0
PATCHFILES holds a list of all the patch files in the
files subdirectory. PATCHOPTS contains the option switches
to pass to the patch program.
Next, the patch file’s checksum is added to the checksums file for the package.
$ make makesum
Note that if the make makesums command fails due to GPG
verification and you trust the source from which the package or patch
was downloaded, you may instead use make makesums GPGV=true to
skip this key verification step.
Finally, you may build the package as normal. The patch(es) will be applied automatically in the process.
$ make install
If the package requires a patch to even build properly, then this is a bug in GSRC. Please report such build problems to bug-gsrc@gnu.org.