Subject: Re: RFC: Fix for IMAKE_MANINSTALL handling
To: NetBSD Packages Technical Discussion List <tech-pkg@NetBSD.org>
From: Roland Illig <rillig@NetBSD.org>
List: tech-pkg
Date: 11/01/2007 00:25:27
Johnny C. Lam wrote:
> I'd prefer to keep all the hard stuff in mk/plist if 
> possible, and leave PLISTs and simple to read and understand as possible.
> 
> In the above scenario, where you have a custom native X11 installation, 
> you say that both man pages and catman pages are installed.  In your 
> oneko example, why don't we do something like:
> 
>     bin/oneko
>     man/man1/oneko.1

As long as the "1" is unambiguous here, I'm fine with it.

> We remove all those IMAKE_* variables from mk/platform and instead we 
> compute them from the installed imake *.cf files.  We also set 
> IMAKE_MANINSTALL appropriately (either "maninstall", "catinstall", or 
> "maninstall catinstall") depending on what we see in the *.cf files.  If 
> IMAKE_MANINSTALL is "maninstall catinstall", then for each man page 
> entry in the PLIST, we insert a corresponding catman page entry.

That sounds good.

> In the case where a package installs manpages through imake, we do 
> something like:
> 
>     PKGMANDIR=    ${IMAKE_MANDIR}
> 
> where IMAKE_MANDIR varies based on the X11 installation.  This would 
> inform the plist module that the "man" subdirectory could be something 
> else, e.g. "catman/u_man" on IRIX.  We teach the plist module a new 
> variable, PKGMANSUBDIR which is a special directory inside the normal 
> man page directory where the man pages are stored, e.g. "X11" on IRIX 
> but normally empty for most platforms.

I would leave PKGMANDIR as-is, and do the transformation whenever imake 
is used (USE_TOOLS, USE_IMAKE). That saves us from yet another variable. 
(Or at least, the variable should be private to pkgsrc.)

By the way: PKGMANDIR is a user-settable variable.

> Then the plist module would produce the following on my vanilla 
> NetBSD-3.x box:
> 
>     bin/oneko
>     man/cat1/oneko.0
> 
> and the following on IRIX:
> 
>     bin/oneko
>     catman/u_man/cat1/X11/oneko.0
> 
> and the following on your system:
> 
>     bin/oneko
>     man/cat1/oneko.0
>     man/man1/oneko.1
> 
> Would this work?  Are there any possible problems with this approach?

Packages that install manpages both from imake and manually. Currently 
we don't have such packages in pkgsrc. :)

Roland