Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 17 Mar 2002 17:07:44 -0800 (PST)
From:      DougB@FreeBSD.org
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/36030: PREFIX=/usr causes some problems
Message-ID:  <200203180107.g2I17iA56383@12-234-22-238.client.attbi.com>

next in thread | raw e-mail | index | archive | help

>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




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