Subject: Re: MANCOMPRESSED_IF_MANZ not parsed ?
To: Markus Kurek <kurek@etecs3.uni-duisburg.de>
From: Frederick Bruckman <fb@enteract.com>
List: tech-pkg
Date: 03/25/2001 13:05:58
On Sun, 25 Mar 2001, Markus Kurek wrote:

> On Sun, Mar 25, 2001 at 12:04:34PM -0600, Frederick Bruckman wrote:
> > On Sun, 25 Mar 2001, Markus Kurek wrote:
> >
> > > In /etc/mk.conf I define this:
> > >
> > > .ifdef(BSD_PKG_MK)
> > > MANZ=1
> > > [more pkg related stuff]
> > > .endif
> > >
> > > This does not work with all packages. The packages with a
> > > MANCOMPRESSED_IF_MANZ  found in the Makefile  do not compress
> > > the manpages at all.
> >
> > The problem is that all the packages that do something if ${MANZ} is
> > defined rely on the handling in "bsd.prog.mk" or "bsd.own.mk" in the
> > base system, which doesn't respect ${BSD_PKG_MK}, of course.
>
> Hm..but with all other packages MANZ works as expected
> with the .ifdef(BSD_PKG_MK) line.

"Works as expected" == "does nothing"?

MAN_COMPRESSED_IF_MANZ affects the "PLIST" fiddling in bsd.pkg.mk,
conditionally on MANZ being set. That's always going to happen,
whether or not the setting of MANZ is protected with ".ifdef
BSD_PKG_MK". Setting MAN_COMPRESSED_IF_MANZ in the pkgsrc "Makefile"
means it's up to the package itself to respond to MANZ. Many such
packages are broken with respect to BSD_PKG_MK.

Another issue that arises with packages that rely on bsd.prog.mk or
bsd.own.mk is that the package itself respects MANINSTALL, but the
package system doesn't do anything with that. For this, the package
itself ignoring BSD_PKG_MK can work in your favor. You can do
something like

.ifndef BSD_PKG_MK
MANINSTALL=	catinstall
.else
# ...
.endif

I no longer try to set either MANINSTALL or MANZ, myself, but see if
the following fixes your problem with "digest"...


Frederick

Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/pkgtools/digest/Makefile,v
retrieving revision 1.14
diff -c -r1.14 Makefile
*** Makefile	2001/03/22 09:51:47	1.14
--- Makefile	2001/03/25 19:03:45
***************
*** 22,28 ****
  BUILD_DEFS+=	MANINSTALL

  MAKE_ENV+=	BINDIR=${LOCALBASE}/bin MANDIR=${LOCALBASE}/man
! MAKE_ENV+=	VERSION="${VERSION}"

  .include "../../mk/bsd.prefs.mk"

--- 22,28 ----
  BUILD_DEFS+=	MANINSTALL

  MAKE_ENV+=	BINDIR=${LOCALBASE}/bin MANDIR=${LOCALBASE}/man
! MAKE_ENV+=	MANZ="${MANZ}" VERSION="${VERSION}"

  .include "../../mk/bsd.prefs.mk"