masetrax step by step instructions to use LOCALPATCHES.
@JuvenalUrbino Has a good explantaion how to do this in I believe the 9th post in this thread.
Step 1: Create a local patch folder anywhere you like.
Step 2: Add your local patch folder path in your
Step 3: Build the package in pkgsrc that you want to patch by running
make to obtain the source files which will be located in pkgsrc/distfiles.
Step 4: Copy the distfile of the package to anywhere you like. Extract the folder and copy every file that you would like to change to: <originalname>.orig - e.g.
cp config.h config.h.orig. Now you can edit the config.h file to your liking.
Step 5: Create a diff
diff -bu config.h.orig config.h > mypatchfile Note: you can name your patch file to whatever you like since this is for
LOCALPATCHES, however it's good practice to follow the pkgsrc naming convention: patch-<originalfilename> - in this case
Step 6: Move your newly generated patch files to your local patch folder. It's important that your local patch folder follows the pkgsrc tree structure. For example, if you want to patch dwm which is located in the wm folder in pkgsrc, you then have to follow that structure and place your new patch file in
Step 7: Build your package in pkgsrc with
make install - patches will automatically get applied. Note: if the package already is installed you have to delete it first by
pkg_delete <pkgname> or use
make replace, otherwise it won't get installed. Also make sure the directory is clean before running
make install by running