Subject: Re: RFC: Fix for IMAKE_MANINSTALL handling
To: Roland Illig <rillig@NetBSD.org>
From: Johnny C. Lam <jlam@pkgsrc.org>
List: tech-pkg
Date: 11/01/2007 10:05:49
Roland Illig wrote:
> 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.
Judging from what I see in mk/platform/*.mk, I believe it is
unambiguous. That means we can map the "man/man1/oneko.1" consistently
to something else for another X11 installation, e.g. "man/man1/oneko.1x"
on Solaris.
>> 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.
Yes, I misspoke. When I said "something like", I meant "something
equivalent to". PKGMANDIR will remain a user-settable variable (though
it's possible that it may not be honored by imake-using packages if they
install outside of ${LOCALBASE}).
>
>> 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. :)
Yes, we do have some packages that require imake for configuration and
building, but not for installation. I think I already took care of
those a while ago by differentiating between USE_IMAKE and
USE_TOOLS+=imake. The packages that are affected by this PLIST scheme
are the ones that set USE_IMAKE. If this doesn't sound too bad, I'll
try to code this up.
Cheers,
-- Johnny C. Lam