From owner-freebsd-ports@FreeBSD.ORG Sun Mar 4 15:53:40 2007 Return-Path: X-Original-To: freebsd-ports@freebsd.org Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EF74216A40B for ; Sun, 4 Mar 2007 15:53:40 +0000 (UTC) (envelope-from infofarmer@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.172]) by mx1.freebsd.org (Postfix) with ESMTP id 56BD513C442 for ; Sun, 4 Mar 2007 15:53:39 +0000 (UTC) (envelope-from infofarmer@gmail.com) Received: by ug-out-1314.google.com with SMTP id 71so976508ugh for ; Sun, 04 Mar 2007 07:53:39 -0800 (PST) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=fVdgrwU64qoKB8mKaYNnFmGao/KbLu1soyYJZNnDh9B/+vdtBLP+ssQbuYz/lnJgbDHHj/wXWjUt/UD9KTRi1PWwpz+2fY7MObaueHOTm2iGzaWaOG9vDRlqnfLC3BIg9R0XSMbqWIhwoi+dfcLtY6FWOi5zb+Cb/JCc5aeS+4I= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=Or7ag1qp5CvLaTPC7kx0LnzV6tnMBYBdoHXHlncJM3SYBg0a9T7CeggreXxtUxXo4A0+IbbwZ85be75RFd4t+kivGEv0C8HGgCfAYbE2HW5xgeMtsBLSjY1zOGfZr/NvO9O4O14xRfyiAHkE53DyJvn8PBFQ13o4HpYQGy2KaW8= Received: by 10.115.108.1 with SMTP id k1mr952118wam.1173023618151; Sun, 04 Mar 2007 07:53:38 -0800 (PST) Received: by 10.114.201.2 with HTTP; Sun, 4 Mar 2007 07:53:38 -0800 (PST) Message-ID: Date: Sun, 4 Mar 2007 18:53:38 +0300 From: "Andrew Pantyukhin" Sender: infofarmer@gmail.com To: "Kris Kennaway" In-Reply-To: <20060915062948.GA93166@xor.obsecurity.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20060914120055.2F90616A64E@hub.freebsd.org> <200609150722.15348.matt@chronos.org.uk> <20060915062514.GA89551@xor.obsecurity.org> <20060915062948.GA93166@xor.obsecurity.org> X-Google-Sender-Auth: 094bbcae10df1b8f Cc: Matt Dawson , freebsd-ports@freebsd.org Subject: Re: Port Makefiles and the MANPREFIX macro X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2007 15:53:41 -0000 On 9/15/06, Kris Kennaway 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.