Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 May 2006 11:23:29 -0300
From:      Fernan Aguero <fernan@iib.unsam.edu.ar>
To:        FreeBSD Ports <ports@FreeBSD.ORG>
Subject:   applying patches with different PATCH_ARGS requirements
Message-ID:  <20060517142329.GD50791@iib.unsam.edu.ar>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060517142329.GD50791>