pkg-plist and WWWDIR

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


Hello

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

First of all, bsd.port.mk 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:
%%NUT_CGI%%%%WWWDIR%%/file

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 bsd.port.mk export a version for WWWDIR suitable
for PLIST variables?

Sincerely,

Gergely Czuczy
mailto: gergely.czuczy at harmless.hu

-- 
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 : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20080215/7b18b2f1/attachment.pgp


More information about the freebsd-ports mailing list