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: [EMAIL PROTECTED]

-- 
Weenies test. Geniuses solve problems that arise.

Attachment: pgpWEteZsAkKF.pgp
Description: PGP signature

Reply via email to