From owner-freebsd-ports Sun Mar 17 17:10:11 2002 Delivered-To: freebsd-ports@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 0E1D137B41B for ; Sun, 17 Mar 2002 17:10:02 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g2I1A2U91464; Sun, 17 Mar 2002 17:10:02 -0800 (PST) (envelope-from gnats) Received: from rwcrmhc51.attbi.com (rwcrmhc51.attbi.com [204.127.198.38]) by hub.freebsd.org (Postfix) with ESMTP id 8FE0537B400 for ; Sun, 17 Mar 2002 17:07:44 -0800 (PST) Received: from 12-234-22-238.client.attbi.com ([12.234.22.238]) by rwcrmhc51.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020318010744.TIUX2626.rwcrmhc51.attbi.com@12-234-22-238.client.attbi.com> for ; Mon, 18 Mar 2002 01:07:44 +0000 Received: (from doug@localhost) by 12-234-22-238.client.attbi.com (8.11.6/8.11.6) id g2I17iA56383; Sun, 17 Mar 2002 17:07:44 -0800 (PST) (envelope-from doug) Message-Id: <200203180107.g2I17iA56383@12-234-22-238.client.attbi.com> Date: Sun, 17 Mar 2002 17:07:44 -0800 (PST) From: DougB@FreeBSD.org Reply-To: DougB@FreeBSD.org To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: ports/36030: PREFIX=/usr causes some problems Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 36030 >Category: ports >Synopsis: PREFIX=/usr causes some problems >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sun Mar 17 17:10:02 PST 2002 >Closed-Date: >Last-Modified: >Originator: Doug >Release: FreeBSD 4.4-STABLE i386 >Organization: AAAG >Environment: System: Ports >Description: When PREFIX is set to /usr, bsd.port.mk uses MANPREFIX=${PREFIX} and BSD.local.dist for mtree as always, however those defaults are not appropriate for /usr, and better options are available. >How-To-Repeat: Set 'PREFIX= /usr' in a port's Makefile. >Fix: Commit the following patch. An additional (although untested) suggestion would be to change MTREE_FILE= to MTREE_FILE?= to allow even greater flexibility in the port's Makefile. Index: bsd.port.mk =================================================================== RCS file: /home/ncvs/ports/Mk/bsd.port.mk,v retrieving revision 1.402 diff -u -r1.402 bsd.port.mk --- bsd.port.mk 16 Mar 2002 23:37:02 -0000 1.402 +++ bsd.port.mk 17 Mar 2002 22:23:49 -0000 @@ -1156,9 +1156,13 @@ MTREE_FILE= /etc/mtree/BSD.x11-4.dist .endif .else +.if ${PREFIX} == /usr +MTREE_FILE= /etc/mtree/BSD.usr.dist +.else MTREE_FILE= /etc/mtree/BSD.local.dist .endif .endif +.endif MTREE_CMD?= /usr/sbin/mtree MTREE_ARGS?= -U ${MTREE_FOLLOWS_SYMLINKS} -f ${MTREE_FILE} -d -e -p @@ -1658,7 +1662,11 @@ SCRIPTS_ENV+= BATCH=yes .endif +.if ${PREFIX} == /usr +MANPREFIX?= /usr/share +.else MANPREFIX?= ${PREFIX} +.endif .for sect in 1 2 3 4 5 6 7 8 9 MAN${sect}PREFIX?= ${MANPREFIX} >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message