Date: Thu, 17 Jun 2004 16:50:18 +0200 From: "Cyrille Lefevre" <clefevre-lists@9online.fr> To: "Roman Neuhauser" <neuhauser@chello.cz>, "Dan Langille" <dan@langille.org> Cc: ports@freebsd.org Subject: Re: HEADS UP - master/slave ports Message-ID: <04b701c4547a$68a0d2d0$7890a8c0@dyndns.org> References: <40D14B14.5529.7A9F944C@localhost><40D1528D.31889.7ABCC38C@localhost> <20040617122840.GB2664@isis.wad.cz>
next in thread | previous in thread | raw e-mail | index | archive | help
"Roman Neuhauser" <neuhauser@chello.cz> wrote: > Ugh, I see; I was confusing this with another feature... That would > make it > > _REALPORTSDIR!= ${REALPATH} "${PORTSDIR}" > _REALMASTERDIR!= ${REALPATH} "${MASTERDIR}" > MASTERPORT= ${_REALMASTERDIR:S,^${_REALPORTSDIR}/,,} > > and I'm not sure that's any better than what you had originally. > > But, what will both versions output in databases/mysql40-client? there is no need to fork any sub-processes : # Try to determine if we are a slave port. These variables are used by # FreshPorts and portsmon, but not yet by the ports framework itself. _MASTERDIR= ${MASTERDIR:C,/([^/]+)/\.\.,,:C,/([^/]+)/\.\.,,} .if ${_MASTERDIR} != ${.CURDIR} IS_SLAVE_PORT?= yes # take your pick : # _PORTSDIR= ${_MASTERDIR:C|([^/]+/[^/]+)/?$||} # MASTERPORT= ${_MASTERDIR:C|${_PORTSDIR}||} # or MASTERPORT= ${_MASTERDIR:H:T}/${_MASTERDIR:T} .else IS_SLAVE_PORT?= no MASTERPORT= .endif Cyrille Lefevre. -- home: mailto:cyrille.lefevre@laposte.net
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?04b701c4547a$68a0d2d0$7890a8c0>