From owner-freebsd-ports@FreeBSD.ORG Sat Feb 11 00:18:19 2012 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 38D0E106566B for ; Sat, 11 Feb 2012 00:18:19 +0000 (UTC) (envelope-from jhelfman@experts-exchange.com) Received: from mail.dw.redsrci.com (mail.pub.dw.redsrci.com [72.29.183.251]) by mx1.freebsd.org (Postfix) with ESMTP id 0F9D18FC18 for ; Sat, 11 Feb 2012 00:18:18 +0000 (UTC) Received: from mail.dw.redsrci.com (localhost [127.0.0.1]) by mail.dw.redsrci.com (Postfix) with ESMTP id 8AAF96FC66B; Fri, 10 Feb 2012 16:18:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=e-e.com; h= user-agent:organization:in-reply-to:content-disposition :content-type:content-type:mime-version:references:message-id :subject:subject:from:from:date:date:received:received:received; s=ee; t=1328919498; x=1330733898; bh=3p4RRDUsDsCa08FCCbXBUIWJ2D ZaVDMk9Wlc96Ew6s8=; b=eTlqBepT67aLVq0TGquF+xzpfCfbm6X+LefE2DD/DO p/8nJdODfYrKHlyHiQz7PAhEw4RIQAG9QLYBkivsg40iXTa0l/VQ84OwKoRMScE5 cXDkDFGPabrE1t80DChg76qmKU4rHDp6/ILdk7E0r39L6b2r1XZ4VnMaoH587OTm s= X-Virus-Scanned: amavisd-new at experts-exchange.com Received: from mail.dw.redsrci.com ([127.0.0.1]) by mail.dw.redsrci.com (mail.dw.redsrci.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ciTLx+phjTHi; Fri, 10 Feb 2012 16:18:18 -0800 (PST) Received: from experts-exchange.com (unknown [192.168.103.120]) by mail.dw.redsrci.com (Postfix) with SMTP id 648226F50F0; Fri, 10 Feb 2012 16:18:18 -0800 (PST) Received: (nullmailer pid 97242 invoked by uid 1001); Sat, 11 Feb 2012 00:17:20 -0000 Date: Fri, 10 Feb 2012 16:17:20 -0800 From: Jason Helfman To: Doug Barton Message-ID: <20120211001720.GA97176@dormouse.experts-exchange.com> References: <4F31EBE1.8040000@FreeBSD.org> <4F35B2AC.7030501@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <4F35B2AC.7030501@FreeBSD.org> X-Operating-System: FreeBSD 8.2-RELEASE amd64 Organization: Experts-Exchange, LLC. http://www.experts-exchange.com X-Living-The-Dream: I love the SLO Life! User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Scot Hetzel , marcus@FreeBSD.org, FreeBSD ports list Subject: Re: What use is WWWDIR_REL? X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Feb 2012 00:18:19 -0000 On Fri, Feb 10, 2012 at 04:13:32PM -0800, Doug Barton thus spake: >On 02/08/2012 20:18, Scot Hetzel wrote: >> On Tue, Feb 7, 2012 at 9:28 PM, Doug Barton wrote: >>> Following up to my previous post about "Why isn't WWWDIR_REL in the >>> default PLIST_SUB I broke open bsd.port.mk and found this: >>> >>> PLIST_SUB+= DOCSDIR="${DOCSDIR_REL}" \ >>> EXAMPLESDIR="${EXAMPLESDIR_REL}" \ >>> DATADIR="${DATADIR_REL}" \ >>> WWWDIR="${WWWDIR_REL}" \ *******!!!!????!!!**** >>> ETCDIR="${ETCDIR_REL}" >>> >>> So this leads me to many questions, the first and most obvious of which >>> is, what the heck good is WWWDIR_REL in the first place? I searched the >>> ports tree and found 1,063 uses of it (outside of bpm itself). 1,035 of >>> them are literals in a pkg-plist, which at this point looks completely >>> useless. Of the 28 others 13 of them are PLIST_SUB related, which >>> apparently can also be removed. Most of the other 15 look like mistakes, >>> and all of them look like they can be fixed with little difficulty. >>> >> Those 1035 ports that are using WWWDIR_REL in their pkg-plist are >> wrong and should be changed to use WWWDIR. Since PLIST_SUB will >> automatically replace %%WWWDIR%% with ${WWWDIR_REL} in the pkg-plist. > >Ok, glad we're in agreement on that. > >>> So I'd like to propose the attached, not to be included until the >>> existing uses of WWWDIR_REL are updated of course. Can anyone tell me >>> why this would be a bad idea? I think being able to just use %%WWWDIR%% >>> in the plist would be a lot less confusing. >>> >> I believe the original purpose of the *_REL variables in bsd.port.mk >> was to make maintaining bsd.port.mk easier. > >Clearly I'm missing something then, because I don't see how they >accomplish anything useful. Perhaps you can enlighten me? There is >nothing in the CVS log that even mentions them, never mind why they were >added (bad portmgr, no cookie!). > > >Doug > Interesting bit here: http://www.freebsd.org/doc/en/books/porters-handbook/book.html#INSTALL-DOCUMENTATION snip DATADIR gets expanded to PREFIX/share/PORTNAME. --> DATADIR_REL gets expanded to share/PORTNAME. DOCSDIR gets expanded to PREFIX/share/doc/PORTNAME. --> DOCSDIR_REL gets expanded to share/doc/PORTNAME. EXAMPLESDIR gets expanded to PREFIX/share/examples/PORTNAME. --> EXAMPLESDIR_REL gets expanded to share/examples/PORTNAME. -jgh -- Jason Helfman System Administrator experts-exchange.com http://www.experts-exchange.com/M_4830110.html E4AD 7CF1 1396 27F6 79DD 4342 5E92 AD66 8C8C FBA5