From owner-freebsd-ports@FreeBSD.ORG Fri Dec 8 06:22:25 2006 Return-Path: X-Original-To: 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 5070616A596 for ; Fri, 8 Dec 2006 06:22:25 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.FreeBSD.org (Postfix) with SMTP id 6D5B043CB5 for ; Fri, 8 Dec 2006 06:21:20 +0000 (GMT) (envelope-from dougb@FreeBSD.org) Received: (qmail 1086 invoked by uid 399); 8 Dec 2006 06:22:15 -0000 Received: from localhost (HELO ?192.168.0.5?) (dougb@dougbarton.us@127.0.0.1) by localhost with SMTP; 8 Dec 2006 06:22:15 -0000 X-Originating-IP: 127.0.0.1 Message-ID: <45790495.6010403@FreeBSD.org> Date: Thu, 07 Dec 2006 22:22:13 -0800 From: Doug Barton Organization: http://www.freebsd.org/ User-Agent: Thunderbird 1.5.0.8 (X11/20061125) MIME-Version: 1.0 To: Wesley Shields References: <45749998.3070308@FreeBSD.org> <20061204232125.GA42307@atarininja.org> <790a9fff0612050838s66c655fapfde80d4038f64ca2@mail.gmail.com> <20061205172803.GA51892@atarininja.org> <4575C568.70905@FreeBSD.org> <20061205194146.GC52966@atarininja.org> <20061205203120.GA53894@atarininja.org> <4575EBA8.3020601@FreeBSD.org> <20061206014049.GA43656@atarininja.org> <20061207183103.GA73597@atarininja.org> <45787EAD.4030104@FreeBSD.org> In-Reply-To: <45787EAD.4030104@FreeBSD.org> X-Enigmail-Version: 0.94.1.0 Content-Type: multipart/mixed; boundary="------------080806020304090104040301" Cc: ports@freebsd.org Subject: Re: distfile belongs to? 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: Fri, 08 Dec 2006 06:22:25 -0000 This is a multi-part message in MIME format. --------------080806020304090104040301 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Doug Barton wrote: > Wesley Shields wrote: > >> Part 2 (the bsd.port.mk piece) is the patch posted by Doug with Ade's >> suggestions. > > You missed the second patch I sent with the ${file%:*} changes. One more for fun. :) I was looking through bsd.port.mk for another purpose tonight and came across ${ALLFILES}. Not only does it combine dist and patch files into one variable, it has the benefit of not adding the : stuff to the filenames in the first place. Learning as I go, Doug --------------080806020304090104040301 Content-Type: text/plain; name="package-distinfo.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="package-distinfo.diff" Index: bsd.port.mk =================================================================== RCS file: /usr/local/ncvs/ports/Mk/bsd.port.mk,v retrieving revision 1.544 diff -u -r1.544 bsd.port.mk --- bsd.port.mk 30 Sep 2006 19:25:45 -0000 1.544 +++ bsd.port.mk 8 Dec 2006 06:11:25 -0000 @@ -5395,11 +5395,20 @@ # files exist. .if !target(generate-plist) +.if defined(DIST_SUBDIR) +PDS= ${DIST_SUBDIR}/ +.endif generate-plist: @${ECHO_MSG} "===> Generating temporary packing list" @${MKDIR} `${DIRNAME} ${TMPPLIST}` @if [ ! -f ${DESCR} ]; then ${ECHO_CMD} "** Missing pkg-descr for ${PKGNAME}."; exit 1; fi @>${TMPPLIST} + @for file in ${ALLFILES}; do \ + distsize=`${GREP} "^SIZE (${PDS}$${file})" ${MD5_FILE} | ${CUT} -f4 -d' '`; \ + distsha256=`${GREP} "^SHA256 (${PDS}$${file})" ${MD5_FILE} | ${CUT} -f4 -d' '`; \ + distmd5=`${GREP} "^MD5 (${PDS}$${file})" ${MD5_FILE} | ${CUT} -f4 -d' '`; \ + ${ECHO_CMD} "@comment DISTFILE:${PDS}$${file}:SIZE=$${distsize}:SHA256=$${distsha256}:MD5=$${distmd5}" >> ${TMPPLIST}; \ + done @for file in ${PLIST_FILES}; do \ ${ECHO_CMD} $${file} | ${SED} ${PLIST_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} >> ${TMPPLIST}; \ done --------------080806020304090104040301--