Date: Tue, 05 Dec 2006 14:19:55 -0800 From: Doug Barton <dougb@FreeBSD.org> To: Wesley Shields <wxs@atarininja.org> Cc: ports@freebsd.org Subject: Re: distfile belongs to? Message-ID: <4575F08B.8000408@FreeBSD.org> In-Reply-To: <4575EBA8.3020601@FreeBSD.org> References: <17771.24717.95357.989644@jerusalem.litteratus.org> <456B70E9.4030408@FreeBSD.org> <20061204213106.GA42084@atarininja.org> <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>
next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format. --------------000407080205040708070806 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Here is a better version of this patch which works with ports like shells/bash that use the : stuff for the distfiles. Doug -- This .signature sanitized for your protection --------------000407080205040708070806 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 5 Dec 2006 22:16:53 -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 ${DISTFILES} ${PATCHFILES}; 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%:*}:$${distsize}:$${distsha256}:$${distmd5}" >> ${TMPPLIST}; \ + done @for file in ${PLIST_FILES}; do \ ${ECHO_CMD} $${file} | ${SED} ${PLIST_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} >> ${TMPPLIST}; \ done --------------000407080205040708070806--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4575F08B.8000408>