Patch to fix installing with nonstandard PREFIXes (Re: cvs commit: ports/Mk bsd.port.mk)

Kris Kennaway kris at obsecurity.org
Thu Dec 30 13:35:10 PST 2004


On Thu, Dec 30, 2004 at 03:14:48PM +0100, Kirill Ponomarew wrote:
> On Thu, Dec 30, 2004 at 07:14:27AM +0000, Kris Kennaway wrote:
> >   * Overhaul the mtree spec file selection code: instead of deciding based
> >     on the value of USE_X_PREFIX, compare PREFIX to X11BASE and LOCALBASE
> >     directly.  This fixes the MTREE_FILE for ports that set PREFIX=${X11BASE}
> >     but don't set USE_X_PREFIX for some reason.  If PREFIX is a
> >     nonstandard value, set NO_MTREE=yes.
> 
> It seems it broke MANPREFIX, you can try to build misc/nut or
> net/icpld with 'make install PREFIX=$out_of_${LOCALBASE}

Oops, I didn't think about that.  Here's the patch I hope to commit
later today after some further validation:

Kris

Index: Mk/bsd.port.mk
===================================================================
RCS file: /home/ncvs/ports/Mk/bsd.port.mk,v
retrieving revision 1.503
diff -u -u -r1.503 bsd.port.mk
--- Mk/bsd.port.mk	30 Dec 2004 07:14:27 -0000	1.503
+++ Mk/bsd.port.mk	30 Dec 2004 20:59:51 -0000
@@ -1884,20 +1891,18 @@
 
 # Figure out where the local mtree file is
 .if !defined(MTREE_FILE) && !defined(NO_MTREE)
-.if ${PREFIX} == ${X11BASE}
+.if ${PREFIX} == ${X11BASE} || defined(USE_X_PREFIX)
+# User may have specified non-standard PREFIX for installing a port that
+# uses X
 .if ${X_WINDOW_SYSTEM:L} == xfree86-3
 MTREE_FILE=	/etc/mtree/BSD.x11.dist
 .else
 MTREE_FILE=	/etc/mtree/BSD.x11-4.dist
 .endif
-.else
-.if ${PREFIX} == ${LOCALBASE}
-MTREE_FILE=	/etc/mtree/BSD.local.dist
 .elif ${PREFIX} == /usr
 MTREE_FILE=	/etc/mtree/BSD.usr.dist
 .else
-NO_MTREE=	yes	# Can't figure out prefix, assume nonstandard
-.endif
+MTREE_FILE=	/etc/mtree/BSD.local.dist
 .endif
 .endif
 MTREE_CMD?=	/usr/sbin/mtree
Index: textproc/docbook-to-man/Makefile
===================================================================
RCS file: /home/ncvs/ports/textproc/docbook-to-man/Makefile,v
retrieving revision 1.5
diff -u -u -r1.5 Makefile
--- textproc/docbook-to-man/Makefile	21 Feb 2003 13:42:34 -0000	1.5
+++ textproc/docbook-to-man/Makefile	30 Dec 2004 20:47:42 -0000
@@ -38,7 +38,7 @@
 
 USE_REINPLACE=	yes
 USE_IMAKE=	yes
-USE_X_PREFIX=	no
+PREFIX?=	${LOCALBASE}
 USE_XLIB=	yes
 XFREE86_HTML_MAN= no
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20041230/cb79e48e/attachment.bin


More information about the freebsd-ports mailing list