From owner-p4-projects@FreeBSD.ORG Fri Jun 22 13:58:41 2007 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1828716A421; Fri, 22 Jun 2007 13:58:41 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9771016A476 for ; Fri, 22 Jun 2007 13:58:40 +0000 (UTC) (envelope-from gabor@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id 4F2E113C45B for ; Fri, 22 Jun 2007 13:58:40 +0000 (UTC) (envelope-from gabor@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.8/8.13.8) with ESMTP id l5MDwe8x070472 for ; Fri, 22 Jun 2007 13:58:40 GMT (envelope-from gabor@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.8/8.13.8/Submit) id l5MDweMS070469 for perforce@freebsd.org; Fri, 22 Jun 2007 13:58:40 GMT (envelope-from gabor@freebsd.org) Date: Fri, 22 Jun 2007 13:58:40 GMT Message-Id: <200706221358.l5MDweMS070469@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gabor@freebsd.org using -f From: Gabor Kovesdan To: Perforce Change Reviews Cc: Subject: PERFORCE change 122148 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jun 2007 13:58:41 -0000 http://perforce.freebsd.org/chv.cgi?CH=122148 Change 122148 by gabor@gabor_server on 2007/06/22 13:58:32 - Add DESTDIR_ENV wo hook commonly overridden variable into the chrooted environment. In this way we can set PREFIX, LOCALBASE, etc. from outside. - Move some default variable assignments, this is needed for the former change. Affected files ... .. //depot/projects/soc2006/gabor_destdir/Mk/bsd.port.mk#22 edit Differences ... ==== //depot/projects/soc2006/gabor_destdir/Mk/bsd.port.mk#22 (text+ko) ==== @@ -1089,11 +1089,48 @@ .include "${PORTSDIR}/Mk/bsd.commands.mk" +# These need to be absolute since we don't know how deep in the ports +# tree we are and thus can't go relative. They can, of course, be overridden +# by individual Makefiles or local system make configuration. +PORTSDIR?= /usr/ports +LOCALBASE?= /usr/local +X11BASE?= ${LOCALBASE} +LINUXBASE?= /compat/linux +DISTDIR?= ${PORTSDIR}/distfiles +_DISTDIR?= ${DISTDIR}/${DIST_SUBDIR} +INDEXDIR?= ${PORTSDIR} +INDEXFILE?= INDEX-${OSVERSION:C/([0-9]).*/\1/} + +PACKAGES?= ${PORTSDIR}/packages +TEMPLATES?= ${PORTSDIR}/Templates + +.if defined(USE_X_PREFIX) +PREFIX?= ${X11BASE} +.elif defined(USE_LINUX_PREFIX) +PREFIX?= ${LINUXBASE} +NO_MTREE= yes +.else +PREFIX?= ${LOCALBASE} +.endif + +# where pkg_add records its dirty deeds. +PKG_DBDIR?= /var/db/pkg + +# where 'make config' records user configuration options +PORT_DBDIR?= /var/db/ports + # # DESTDIR section to start a chrooted process if invoked with DESTDIR set # .if defined(DESTDIR) && !empty(DESTDIR) && !defined(CHROOTED) + +DESTDIR_ENV= LOCALBASE=${LOCALBASE} LINUXBASE=${LINUXBASE} \ + X11BASE=${X11BASE} PREFIX=${PREFIX} PORTSDIR=${PORTSDIR} \ + DISTDIR=${DISTDIR} PACKAGES=${PACKAGES} TEMPLATES=${TEMPLATES} \ + WRKDIRPREFIX=${WRKDIRPREFIX} PKG_DBDIR=${PKG_DBDIR} \ + PORT_DBDIR=${PORT_DBDIR} DESTDIR= CHROOTED=YES + .BEGIN: ${MKDIR} ${DESTDIR}${PORTSDIR} .if !exists(${DESTDIR}${PORTSDIR}/Makefile) @@ -1103,7 +1140,7 @@ ${MOUNT} -t devfs devfs ${DESTDIR}/dev .endif ${ECHO_CMD} "===> Starting chrooted make in ${DESTDIR}..."; \ - ${CHROOT} ${DESTDIR} ${SH} -c "(cd ${.CURDIR}; ${MAKE} DESTDIR= CHROOTED=YES ${.TARGETS})" + ${CHROOT} ${DESTDIR} ${SH} -c "(cd ${.CURDIR}; ${MAKE} ${DESTDIR_ENV} ${.TARGETS})" .else # Look for ${WRKSRC}/.../*.orig files, and (re-)create @@ -1229,9 +1266,6 @@ USE_SUBMAKE= yes .endif -# where 'make config' records user configuration options -PORT_DBDIR?= /var/db/ports - LDCONFIG_DIR= libdata/ldconfig LDCONFIG32_DIR= libdata/ldconfig32 @@ -1321,18 +1355,6 @@ PKGNAME= ${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX}-${PKGVERSION} DISTNAME?= ${PORTNAME}-${DISTVERSIONPREFIX}${DISTVERSION:C/:(.)/\1/g}${DISTVERSIONSUFFIX} -# These need to be absolute since we don't know how deep in the ports -# tree we are and thus can't go relative. They can, of course, be overridden -# by individual Makefiles or local system make configuration. -PORTSDIR?= /usr/ports -LOCALBASE?= /usr/local -X11BASE?= ${LOCALBASE} -LINUXBASE?= /compat/linux -DISTDIR?= ${PORTSDIR}/distfiles -_DISTDIR?= ${DISTDIR}/${DIST_SUBDIR} -INDEXDIR?= ${PORTSDIR} -INDEXFILE?= INDEX-${OSVERSION:C/([0-9]).*/\1/} - DOCSDIR?= ${PREFIX}/share/doc/${PORTNAME} EXAMPLESDIR?= ${PREFIX}/share/examples/${PORTNAME} DATADIR?= ${PREFIX}/share/${PORTNAME} @@ -1373,8 +1395,6 @@ .else EXTRACT_SUFX?= .tar.gz .endif -PACKAGES?= ${PORTSDIR}/packages -TEMPLATES?= ${PORTSDIR}/Templates PATCHDIR?= ${MASTERDIR}/files FILESDIR?= ${MASTERDIR}/files @@ -1390,14 +1410,6 @@ .if defined(USE_X_PREFIX) USE_XLIB= yes .endif -.if defined(USE_X_PREFIX) -PREFIX?= ${X11BASE} -.elif defined(USE_LINUX_PREFIX) -PREFIX?= ${LINUXBASE} -NO_MTREE= yes -.else -PREFIX?= ${LOCALBASE} -.endif .if defined(USE_LINUX_PREFIX) LDCONFIG_CMD?= ${LINUXBASE}/sbin/ldconfig -r ${LINUXBASE} @@ -2337,8 +2349,6 @@ .else PKG_SUFX?= .tbz .endif -# where pkg_add records its dirty deeds. -PKG_DBDIR?= /var/db/pkg MOTIFLIB?= -L${X11BASE}/lib -lXm -lXp