pin AFAICT (please, correct me if I'm wrong) LOCALPATCHES are not not verified (and do not require a checksum), as they're supposed to be secure, being locally stored. Respecting the naming convention is not a requirement either, as those patches are not meant to be commited. In my experience patching multiple files within the same patch file works too.
All one needs to do is placing a file containing a diff (generated with diff -bu
) between the .orig file and the custom one in the proper folder, in accordance with pkgsrc tree structure.
For example I may generate a new patch with diff -bu for textrproc/urlview redirecting the output to a new ~/pkgsrc/patches/textproc/urlview/mypatch.patch file:
--- urlview.c.orig 2020-04-15 11:07:04.906046429 +0200
+++ urlview.c 2020-04-15 11:07:05.033935127 +0200
@@ -408,6 +408,10 @@
oldcurrent = current;
+ /* XXX seems to prevent strange characters to appear on the
+ input line before entering a search string */
+ memset(search, '\0', sizeof search);
+
switch (i = getch ())
{
case 'q':
Now, providing I set $LOCALPATCHES as above, all I have to do is go to /usr/pkgsrc/textproc/urlview and run make, which properly applies the patch โ automatically skipping the 'Verifying' step (unlike upstream patches) โ returning:
=> Applying pkgsrc patch /home/sehnsucht/pkgsrc/patches/textproc/urlview/mypatch.patch
Hmm... Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|--- urlview.c.orig 2020-04-15 11:07:04.906046429 +0200
|+++ urlview.c 2020-04-15 11:07:05.033935127 +0200
--------------------------
Patching file urlview.c using Plan A...
Hunk #1 succeeded at 408.
done
The package is then properly built and registered ๐