Subject: Re: add a MANDIR setting?
To: NetBSD Packages Technical Discussion List <tech-pkg@NetBSD.ORG>
From: Jeremy C. Reed <reed@reedmedia.net>
List: tech-pkg
Date: 03/29/2004 09:25:42
Is it okay if I add the following to official pkgsrc?

I'd like to add this even though packages are not converted -- since it
will take a while.

mk/bsd.pkg.defaults.mk:

MAN_DIR?=       man
# Pathname relative to ${PREFIX} of directory holding the
# manual pages and man directories.
# Possible: any path you like, e.g. share/man.
# Default: man (i.e. /usr/pkg/man, /usr/X11R6/man)

(How are items sorted / added in mk/bsd.pkg.defaults.mk? The top sections
are not in alphabetical order.)

And for mk/bsd.pkg.mk:

_MANDIR=		${PREFIX}/${MAN_DIR}

(in the GNU_CONFIGURE section)
CONFIGURE_ARGS+=       --mandir=${_MANDIR}


Many patches and pkgsrc Makefiles use MAN_DIR and MANDIR for
different purposes, like:

archivers/lha/patches/patch-ae:+MANDIR = ${PREFIX}/man

audio/cam/patches/patch-ac:+MANDIR = ${PREFIX}/man/man1

graphics/xart/patches/patch-ac:+MANDIR = ${PREFIX}/man/cat1

emulators/atari800/patches/patch-ac:+MAN_DIR = @prefix@/man/man1

So that is why I chose _MANDIR instead of MANDIR or MAN_DIR for the final
destination.

It will take a long time to clean this up, but in the long run, I think it
will make it easier to manage and probably have fewer patches (especially
for those sources already using configure --mandir=).

Then we can start working on cleaning up these packages that use
INSTALL_MAN_DIRS and INSTALL_MAN to install to ${_MANDIR}.

Should we have the PLISTs automatically fixed to switch any ^man/ with
${MAN_DIR} ?

Or should every PLIST be fixed (s,^man/,${_MANDIR},)?

Please share your advice.

   Jeremy C. Reed
   http://bsd.reedmedia.net/