Mysterious patches

Freddie Cash fjwcash at
Fri Mar 28 20:54:54 UTC 2014

On Fri, Mar 28, 2014 at 1:47 PM, A.J. 'Fonz' van Werven <freebsd at
> wrote:

> Henry Hu wrote:
> > They apply to src/raster-png.cxx and src/raster.cxx
> Note to self: look inside the actual patch files themselves, it says right
> there which files they apply to *oops*.
> However, this does leave me puzzled about the file names. If a patch
> applies to, say, src/foo/bar.c, shouldn't it be called
> files/patch-src__foo__bar.c? This is how it's described in the Porter's
> Handbook. Given a filename such as files/patch-png.cxx I would expect that
> patch to apply to a file ${WRKDIR}/png.cxx.
> What am I misunderstanding here?
> ​Patch file naming conventions are just that:  conventions.  It's not
carved in stone and enforced in the tools.  The patch program looks at the
paths in the diff file to figure out which files need to be edited.

The naming convention for patch files has changed over the years.  Maybe
this one is using an older convention?  Or maybe it never followed one to
begin with?

Either way, it you take maintainership of the port, you can make it follow
the current patch file naming convention.  ;)

Freddie Cash
fjwcash at

More information about the freebsd-ports mailing list