From owner-freebsd-ports@FreeBSD.ORG Tue Jan 20 09:13:15 2004 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 683) id 6D10D16A4CF; Tue, 20 Jan 2004 09:13:15 -0800 (PST) Date: Tue, 20 Jan 2004 09:13:15 -0800 From: Eivind Eklund To: Joe Marcus Clarke Message-ID: <20040120171315.GH94636@FreeBSD.org> References: <1074590694.85583.20.camel@shumai.marcuscom.com> <400D2939.5090203@fillmore-labs.com> <1074617147.757.16.camel@gyros> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1074617147.757.16.camel@gyros> User-Agent: Mutt/1.4.1i cc: ports@FreeBSD.org cc: Kris Kennaway cc: Oliver Eikemeier Subject: Re: HEADS UP: New bsd.*.mk changes 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: Tue, 20 Jan 2004 17:13:15 -0000 On Tue, Jan 20, 2004 at 11:45:47AM -0500, Joe Marcus Clarke wrote: > On Tue, 2004-01-20 at 08:12, Oliver Eikemeier wrote: [snipped description of options patches. -EE] > > Sorry for stepping up so late, but this saves options under > > ${PORT_DBDIR}/${PORTNAME}/options > > > > Lots of ports have the same PORTNAME (ie 'openldap' for > > net/openldap2[012]-(client|server), 'apache' for russian/apache13, > > www/apache(13|13-fp|2|21)). Some conflict, but -client/-server don't. > > Either each port has to set OPTIONSFILE to ${PORT_DBDIR}/${PORTNAME}/something, > > or we may use LATEST_LINK instead of PORTNAME: > > What's the general consensus on this (is there one)? What about ports > that set NO_LATEST_LINK? In any event, the patch below would need to be > tested on bento again (uggghh). Since OPTIONSFILE is currently > overrideable, couldn't porters that have conflicting PORTNAMEs, set this > file to a unique name. For example: > > OPTIONSFILE= ${PORT_DBDIR}/${PORTNAME}/options.mozilla-devel > > Wouldn't that satisfy most people? > Perhaps we could shorten the public > OPTIONSFILE to just specify the filename, and do all the grunt work in > bsd.port.mk...? The following implements that, and is a fairly trivial patch. It might be even better to call "OPTIONSNAME" something like "UNIQUENAME". There is no obvious consensus - I have no particular opinion beyond what I've already said (ie, that the name of LATEST_LINK seems inappropriate if it is to be used as a unique name.) Index: bsd.port.mk =================================================================== RCS file: /home/pcvs/ports/Mk/bsd.port.mk,v retrieving revision 1.475 diff -u -r1.475 bsd.port.mk --- bsd.port.mk 20 Jan 2004 09:14:09 -0000 1.475 +++ bsd.port.mk 20 Jan 2004 17:07:33 -0000 @@ -1017,7 +1034,8 @@ # where 'make config' records user configuration options PORT_DBDIR?= /var/db/ports -OPTIONSFILE?=${PORT_DBDIR}/${PORTNAME}/options +OPTIONSNAME?=${PORTNAME} +OPTIONSFILE?=${PORT_DBDIR}/${OPTIONSNAME}/options .if exists(${OPTIONSFILE}) .include "${OPTIONSFILE}" .endif @@ -4894,8 +4912,8 @@ .if !defined(OPTIONS) @${ECHO_MSG} "===> No options to configure" .else - @(${MKDIR} ${PORT_DBDIR}/${PORTNAME} 2> /dev/null) || \ - (${ECHO_MSG} "===> Cannot create ${PORT_DBDIR}/${PORTNAME}, check permissions"; exit 1) + @(${MKDIR} ${PORT_DBDIR}/${OPTIONSNAME} 2> /dev/null) || \ + (${ECHO_MSG} "===> Cannot create ${PORT_DBDIR}/${OPTIONSNAME}, check permissions"; exit 1) -@if [ -e ${OPTIONSFILE} ]; then \ . ${OPTIONSFILE}; \ fi; \ @@ -4964,7 +4982,7 @@ .if exists(${OPTIONSFILE}) -@${ECHO_MSG} "===> Removing user-configured options for ${PORTNAME}"; \ ${RM} -f ${OPTIONSFILE}; \ - ${RMDIR} ${PORT_DBDIR}/${PORTNAME} + ${RMDIR} ${PORT_DBDIR}/${OPTIONSNAME} .else @${ECHO_MSG} "===> No user-specified options configured for ${PORTNAME}" .endif