Complicated patching

Matthew Pounsett matt at
Tue May 17 21:28:54 UTC 2011


In a (possibly foolish) attempt to add a third-party patch to an application I use *without* abandoning the ports tree for this app, I'm trying to make a local modification to the port to download and include the patch in the build process.  The problem I'm running into is that it is distributed from a source distribution site that uses a downloads CGI rather than a direct URL to distribution files, and the URI has nothing whatsoever to do with the name of the resulting file.  This, obviously, breaks MASTER_SITES and DISTFILES because what I have to put in DISTFILES doesn't match what would go in the distinfo file.

I'm poking around at possible alternatives, but nothing really stands out in the reading I've done.  Is this sort of thing supported by the ports system at all, or should I just abandon this completely and switch to fully manual builds?

I briefly looked at downloading the patch file, splitting it up (it includes several patches) and including the resulting files in files/patch-*.  This would be worth the work, but I'm also toying with eventually submitting my changes as a patch to the port with a line in OPTIONS to include/ignore the 3rd party patches and I can't find a way to wrap an ifdef around patch-* files in the Makefile, since they seem to be auto-discovered and acted on.  

If anyone has any advice on how to handle this in a way that solves both problems, I'd appreciate it.  Thanks in advance!
   Matt Pounsett

More information about the freebsd-ports mailing list