Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 4 Mar 2007 18:53:38 +0300
From:      "Andrew Pantyukhin" <infofarmer@FreeBSD.org>
To:        "Kris Kennaway" <kris@obsecurity.org>
Cc:        Matt Dawson <matt@chronos.org.uk>, freebsd-ports@freebsd.org
Subject:   Re: Port Makefiles and the MANPREFIX macro
Message-ID:  <cb5206420703040753y7ad8d12didc80ae4e3200cc16@mail.gmail.com>
In-Reply-To: <20060915062948.GA93166@xor.obsecurity.org>
References:  <20060914120055.2F90616A64E@hub.freebsd.org> <200609150722.15348.matt@chronos.org.uk> <20060915062514.GA89551@xor.obsecurity.org> <20060915062948.GA93166@xor.obsecurity.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 9/15/06, Kris Kennaway <kris@obsecurity.org> wrote:
> On Fri, Sep 15, 2006 at 02:25:14AM -0400, Kris Kennaway wrote:
> > On Fri, Sep 15, 2006 at 07:22:15AM +0100, Matt Dawson wrote:
> > > Hi all,
> > >     Currently doing battle with some port updates and I have come across a
> > > strange problem. It's probably my fault, but some guidance would be
> > > appreciated.
> > >
> > > Three of the ports I maintain have decided that the man pages belong in
> > > ${PREFIX}/share/man/man(n). Now, reading the Porter's Handbook, it appears
> > > this is exactly what the MAN[n]PREFIX macro is for, and sure enough after
> > > removing the man page from pkg-plist and telling the Makefile about it, the
> > > ports system compresses the resultant man page in its new location. So far so
> > > good.
> > >
> > > However, on deinstall, if appeand two lots of ${PREFIX} when trying to remove
> > > the man page. For example, grig installs a man page
> > > to /usr/local/share/man/man1/grig.1 (for a ${PREFIX} of /usr/local). The
> > > deinstall routine trys to delete grig.1.gz
> > > from /usr/local/share//usr/local/share/man/man1, which is just a little
> > > crazy. Note the two slashes between the two iterations of the MANPREFIX.
> > >
> > > Any clues, folks? I'd like to get these updates in before the ports tree is
> > > frozen for 6.2 if at all possible.
> >
> > Don't include MANPREFIX=${PREFIX}... since it's apparently being used
> > as ${PREFIX}${MANPREFIX}; you could confirm this by reading
> > bsd.port.mk.
>
> Actually this appears to be incorrect, I'm not sure what is the cause.

There appears to be an obscure bug in make(1). This line:
__MANPAGES:=     ${_MANPAGES:S%^${TARGETDIR}/%%}
ignores the substitution under some conditions (e.g.
non-standard MANPREFIX). I'm not aware of a solution
(and I don't feel like diving into make guts right now),
but a workaround is to s/:=/=/ (which needs a fix in
case of mancompressed).

Thoughts will be much appreciated, I have to jump through
hula hoops to work around the problem in some ports.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?cb5206420703040753y7ad8d12didc80ae4e3200cc16>