Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Feb 2012 16:17:20 -0800
From:      Jason Helfman <jhelfman@e-e.com>
To:        Doug Barton <dougb@FreeBSD.org>
Cc:        Scot Hetzel <swhetzel@gmail.com>, marcus@FreeBSD.org, FreeBSD ports list <freebsd-ports@freebsd.org>
Subject:   Re: What use is WWWDIR_REL?
Message-ID:  <20120211001720.GA97176@dormouse.experts-exchange.com>
In-Reply-To: <4F35B2AC.7030501@FreeBSD.org>
References:  <4F31EBE1.8040000@FreeBSD.org> <CACdU%2Bf9XKxk2yuMeMvJdJn8CuCPw3GMy7o044ocbVg4eYf-=zQ@mail.gmail.com> <4F35B2AC.7030501@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <dougb@freebsd.org> 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



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