From owner-freebsd-ports@FreeBSD.ORG Wed Feb 21 06:14:27 2007 Return-Path: X-Original-To: freebsd-ports@freebsd.org Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5A9AD16D042 for ; Wed, 21 Feb 2007 06:14:27 +0000 (UTC) (envelope-from adamlsd@gmail.com) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.250]) by mx1.freebsd.org (Postfix) with ESMTP id 1BDC613C47E for ; Wed, 21 Feb 2007 06:14:26 +0000 (UTC) (envelope-from adamlsd@gmail.com) Received: by an-out-0708.google.com with SMTP id c24so561123ana for ; Tue, 20 Feb 2007 22:14:26 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:mime-version:to:message-id:content-type:cc:subject:from:date:x-mailer:sender; b=EZgNVsgldNPXM9531RoN+aKHR4KQGWdtmLKc9CdgTdtWFYgyrn6UIsSv0SljalCG2jlX83xwSUlhusvPX+haq4qYiTIN8DPzronCOcMGD/Ty+E5pgK9OtKTTyHQXUCUduOf5Hb/1BW/BBTO4HbpbvjSYcFTF93gMnm2mL8SM4P0= Received: by 10.100.124.5 with SMTP id w5mr3320188anc.1172036863363; Tue, 20 Feb 2007 21:47:43 -0800 (PST) Received: from ?192.168.123.216? ( [24.190.113.211]) by mx.google.com with ESMTP id c2sm3947811ana.2007.02.20.21.47.42; Tue, 20 Feb 2007 21:47:42 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v752.2) To: freebsd-ports@freebsd.org Message-Id: <130A582E-0AAE-4BEB-A00A-C7E485AA1711@fsl.cs.sunysb.edu> Content-Type: multipart/mixed; boundary=Apple-Mail-1-456132600 From: Adam Martin Date: Wed, 21 Feb 2007 00:47:40 -0500 X-Mailer: Apple Mail (2.752.2) Sender: Adam Martin Cc: Subject: Patch to add package-smart target 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, 21 Feb 2007 06:14:27 -0000 --Apple-Mail-1-456132600 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Hello, I wasn't sure who to send this to, but Benno Rice suggested ports@ and kris@, so I've done both. I've created a patch for a target that I've added to bsd.ports.mk (in /usr/ports/Mk/) a while back, to fix what I consider a "problem" in package-recursive. package-recursive always re-builds a tarball for every package in the dependancy chain, even if said tarball exists. package-smart will skip that step for all tarballs that already exist. (It's not perfect, but I thought somebody should look at it, and see what they can do with it.) The patch is attached. Regards, -- ADAM David Alan Martin --Apple-Mail-1-456132600 Content-Transfer-Encoding: 7bit Content-Type: application/octet-stream; x-unix-mode=0644; name=adam.patch Content-Disposition: attachment; filename=adam.patch --- bsd.port.orig Wed Feb 21 00:37:56 2007 +++ bsd.port.mk Fri Jan 26 19:58:07 2007 @@ -5199,6 +5211,23 @@ (cd $$dir; ${MAKE} package-noinstall); \ done +#Changes to add the package-smart target by ADAM David Alan Martin, +#2006.10.17 +.if exists(${PACKAGES}) +package-smart: package + @for dir in $$(${ALL-DEPENDS-LIST}); do \ + (cd $$dir; ${MAKE} package-smart-dependancy); \ + done + +package-smart-dependancy: + @if [ ! -e ${PKGFILE} ]; then \ + ${MAKE} package-noinstall; \ + else\ + ${ECHO} "Package ${PKGFILE} exists... skipping.";\ + fi;\ + +.endif + --Apple-Mail-1-456132600--