Hi everyone, I had an idea to make software patching easier, and lower the need to fork ports. Sometimes, I just fork some port from contrib because I want to add a patch (eg: thttpd), or I need to modify a file before actually compiling the software (eg: config.h on contrib/st). I figured out that by adding a single variable to `/etc/pkgmk.conf`, it would be easier to "tweak" sofwares by patching them beforehand: ``` /etc/pkgmk.conf [...] PKGMK_PATCH_DIR=/usr/patch And then, have ports include something like: ``` /usr/port/contrib/example/PKgfile [...] cd $name-$version cat $PKGMK_PATCH_DIR/$name/*.diff | patch -Np1 make make DESTDIR=$PKG PREFIX=/usr MANDIR=/usr/man install So if I need a patch for thttpd, I'll just add it to `/usr/patch/thttpd`. To have the `st` port configured with my `config.h`, I'll just create a patch for it in `/usr/patch/st`. All ports might not need this obviously, but this could result in a simple and efficient way to let user tweak packages from the "official" port trees without any need to actually fork them, and double the effort. What do you think about it? -- Willy Goiffon (z3bra on #crux)