applying patches with different PATCH_ARGS requirements

Fernan Aguero fernan at iib.unsam.edu.ar
Wed May 17 14:23:48 UTC 2006


Hi!

I need to patch a port with an external patch (PATCHFILES +
PATCH_SITE already set up).

The problem is that this port already has patches in
PATCHDIR (files/) and that I need to set the pathname strip
count (-p) to different values.

As per the Porter's Handbook, there is a mechanism in place
to deal with patches from different sites and different
subdirectories within these sites:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/book.html#PORTING-MASTER-SITES-N

The mechanism, works by adding a postfix identifier to
values of variables, like in:

MASTERSITES=	site1:group1 site2:group2 ... et cetera
MASTER_SITE_SUBDIR= subdirX:group1 subdirY:group2 ... et cetera 
DISTFILES=	fileA:group1 fileB:group2 ... et cetera 

with this, 
fileA will be fetched from site1/subdirX
fileB will be fetched from site2/subdirY

However, after reading this section it's clear 
that this mechanism is restricted to a few variables
http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/book.html#PORTING-MASTER-SITES-N-GROUP-SEMANTICS

namely: MASTER_SITES, PATCH_SITES, MASTER_SITE_SUBDIR,
PATCH_SITE_SUBDIR, DISTFILES, and PATCHFILES

What would it take to have this grouping mechanism extended
to other variables? I'm currently thinking in
PATCH_ARGS=	-p0:group1 -p1:group2

Or is there any other way to achieve this? (excluding the
obvious, of course, which would be something like:

.if !defined(WITHOUT_THIS_PATCH)
# apply this patch with its own local PATCH_ARGS
.endif

(this patch is a bugfix, so it should not be optional)

Fernan


More information about the freebsd-ports mailing list