From owner-freebsd-ports@FreeBSD.ORG Thu Jun 17 14:50:20 2004 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DE49F16A4CE for ; Thu, 17 Jun 2004 14:50:20 +0000 (GMT) Received: from hourri.hittite.isp.9tel.net (hourri.hittite.isp.9tel.net [62.62.156.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9512243D49 for ; Thu, 17 Jun 2004 14:50:20 +0000 (GMT) (envelope-from clefevre-lists@9online.fr) Received: from pc2k (28-216-118-80.kaptech.net [80.118.216.28]) by hourri.hittite.isp.9tel.net (Postfix) with SMTP id A95D5157A16; Thu, 17 Jun 2004 17:35:06 +0200 (CEST) Message-ID: <04b701c4547a$68a0d2d0$7890a8c0@dyndns.org> From: "Cyrille Lefevre" To: "Roman Neuhauser" , "Dan Langille" References: <40D14B14.5529.7A9F944C@localhost><40D1528D.31889.7ABCC38C@localhost> <20040617122840.GB2664@isis.wad.cz> Date: Thu, 17 Jun 2004 16:50:18 +0200 Organization: ACME MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 cc: ports@freebsd.org Subject: Re: HEADS UP - master/slave ports X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jun 2004 14:50:21 -0000 "Roman Neuhauser" 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