pkg-plist and WWWDIR

Gergely CZUCZY phoemix at
Fri Feb 15 13:16:46 UTC 2008


I've been updating sysutils/nut from 2.2.0 to .1, and I've
hit some issues there.

First of all, sets WWWDIR for the actual port,
which is very nice of it. OTOH the CGI support is optional
in nut, which results in a conditional entry in pkg-plist.
the NUT_CGI plist variable is only set if the CGI support
is enabled, and WWWDIR is an absolute path. If the CGI
support is enabled, then NUT_CGI is set to an empty string.
And WWWDIR is added to the PKG_PLIST variables.

The resulting lines in pkg-plist is the following:

And when the pkg-plist is processed it preprends /usr/local,
since that's the PREFIX, so it will end up looking for ${PREFIX}/${WWWDIR},
which will result in /usr/local/usr/local/www/nut/file .

I've checked other ports, %%WWWDIR%% is used directly at other
places, so I think when an entry begins with a slash that will
transform to an absolute path, without prepending the PREFIX.
As i think the conditional %%NUT_CGI%% messes this auto-logic
up, and the double-prefix happens.

For now I've fixed this with a workaround, by not setting
the WWWDIR plist variable to WWWDIR, but to "www/nut".
I don't consider this a solution, but just a workaround.

My qestions are, how should these situations be handled?
Shouldn't export a version for WWWDIR suitable
for PLIST variables?


Gergely Czuczy
mailto: gergely.czuczy at

Weenies test. Geniuses solve problems that arise.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 1491 bytes
Desc: not available
Url :

More information about the freebsd-ports mailing list