Subject: Re: using PKGMANDIR?
To: Georg Schwarz <georg.schwarz@freenet.de>
From: Jeremy C. Reed <reed@reedmedia.net>
List: tech-pkg
Date: 10/10/2005 13:38:22
On Mon, 10 Oct 2005, Georg Schwarz wrote:

> I realize that some packages use
>
> PKGMANDIR?= man
>
> is this necessary?
>
> Also, MAKE_ENV+=      PKGMANDIR=${PKGMANDIR}
> no longer seems to be necessary.

The above should be very rare. They are not necessary. And if they exists, 
they will be remoevd.

> PLIST_SUBST has PKGMANDIR=${PKGMANDIR}, so entries should look like
>
> ${PKGMANDIR}/man1/package.1
>
> instead of
>
> man/man1/package.1
>
> shouldn't they?

Not needed. The PLIST mechanisms take care of this already.

> So what is the purpose of the following code from mk/bsd.pkg.mk?
>
> # plist awk pattern-action statement to convert man/ to ${PKGMANDIR}/
> _PLIST_AWK_PKGMANDIR=
> \
> /^([^\/]*\/)*man\/([^\/]*\/)?(man[1-9ln]\/.*[1-9ln]|cat[1-9ln]\/.*[0-9])
> $$/ { \
>        sub("^man/", "${PKGMANDIR}/");
> \
> }
> \
> /^@dirrm man\// {
> \
>        sub(" man/", " ${PKGMANDIR}/");
> \
>
>
> it seems at rough glance that one could use man/man1/package.1 in PLIST,
> and it will be converted. Isn't that somewhat intransparent and
> inconsistent with the above PLIST_SUBST mechanism also in place?

I have no opinion either way, other than I don't want to patch every PLIST 
to change to use ${PKGMANDIR}/ instead of man/.


  Jeremy C. Reed

  	  	 	 Media Relations and Publishing Services
 	  	 	 http://www.reedmedia.net/