From owner-freebsd-ports@FreeBSD.ORG Wed Aug 9 23:59:21 2006 Return-Path: X-Original-To: ports@FreeBSD.org Delivered-To: freebsd-ports@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B241516A4DD; Wed, 9 Aug 2006 23:59:21 +0000 (UTC) (envelope-from jhein@timing.com) Received: from Daffy.timing.com (ns1int.timing.com [206.168.13.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4675843D58; Wed, 9 Aug 2006 23:59:21 +0000 (GMT) (envelope-from jhein@timing.com) Received: from gromit.timing.com (gromit.timing.com [206.168.13.209]) by Daffy.timing.com (8.13.1/8.13.1) with ESMTP id k79NxK7A034988; Wed, 9 Aug 2006 17:59:20 -0600 (MDT) (envelope-from jhein@timing.com) Received: from gromit.timing.com (localhost [127.0.0.1]) by gromit.timing.com (8.13.6/8.13.6) with ESMTP id k79NxJfi050379; Wed, 9 Aug 2006 17:59:19 -0600 (MDT) (envelope-from jhein@gromit.timing.com) Received: (from jhein@localhost) by gromit.timing.com (8.13.6/8.13.6/Submit) id k79NxIke050376; Wed, 9 Aug 2006 17:59:18 -0600 (MDT) (envelope-from jhein) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17626.30422.650339.960580@gromit.timing.com> Date: Wed, 9 Aug 2006 17:59:18 -0600 From: John E Hein To: =?ISO-8859-1?Q?G=E1bor_K=F6vesd=E1n?= , ports@FreeBSD.org In-Reply-To: <17626.29481.909830.326948@gromit.timing.com> References: <17626.25183.846983.515718@gromit.timing.com> <17626.25444.563099.956775@gromit.timing.com> <44DA6FC9.3040404@FreeBSD.org> <17626.29481.909830.326948@gromit.timing.com> X-Mailer: VM 7.19 under Emacs 21.3.1 X-Virus-Scanned: ClamAV version 0.87.1, clamav-milter version 0.87 on Daffy.timing.com X-Virus-Status: Clean Cc: Subject: Re: support for DESTDIR: security/openssh-portable 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: Wed, 09 Aug 2006 23:59:21 -0000 John E Hein wrote at 17:43 -0600 on Aug 9, 2006: > Well, the part that makes it annoying to duplicate in all ports is not > the two separate words (CHROOT DESTDIR), but that you have to test > defined(DESTDIR) && !empty(DESTDIR) before you can figure out whether > to use ${CHROOT} ${DESTDIR} or not. > > So having that test to assign CHROOTDESTDIR or leave it empty in > bsd.port.mk allows the port writer to just always invoke it without > having to worry about testing for DESTDIR. You could pass this var to pkg-install scripts, too (put it in the standard *SUB* lists). That way you don't have to do the dance that was added to security/clamav/files/pkg-install.in: if [ -n "%%DESTDIR%%" ]; then PW="/usr/sbin/chroot %%DESTDIR%% pw" CHOWN="/usr/sbin/chroot %%DESTDIR%% chown" MKDIR="/usr/sbin/chroot %%DESTDIR%% mkdir -p" else PW="pw" CHOWN="chown" MKDIR="mkdir -p" fi but rather just: PW="%%CHROOTDESTDIR%% pw" CHOWN="%%CHROOTDESTDIR%% chown" MKDIR="%%CHROOTDESTDIR%% mkdir -p"