What use is WWWDIR_REL?

Scot Hetzel swhetzel at gmail.com
Thu Feb 9 04:19:02 UTC 2012

On Tue, Feb 7, 2012 at 9:28 PM, Doug Barton <dougb at 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:
>                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.

> 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.

These variables were introduced in bsd.port.mk version 1.557.

http://www.freebsd.org/cgi/query-pr.cgi?pr=110781 <- adds the *_REL
variables to bsd.port.mk
http://www.freebsd.org/cgi/query-pr.cgi?pr=105529 <- adds WWWDIR to bsd.port.mk

Portlint most likely should be updated to do the following:

- look for the use of these *_REL variables in the pkg-plist and flag
them as an error, and suggest to use the non *_REL variable instead.
- Check the ports Makefile for the use of the *_REL variables in
PLIST_SUB and flag those uses as an error.


More information about the freebsd-ports mailing list