Date: Tue, 07 Sep 1999 23:06:58 -0700 (PDT) From: John Polstra <jdp@polstra.com> To: Bill Fenner <fenner@research.att.com> Cc: ports@freebsd.org Subject: Re: Handling distfiles in multiple subdirs on master site: how? Message-ID: <XFMail.990907230658.jdp@polstra.com> In-Reply-To: <199909050240.TAA23475@windsor.research.att.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Bill Fenner wrote: > > The canonical way to do this is kind of ugly: > > MASTER_SITES= http://m3.polymtl.ca/m3htbin/download/m3/pkg/pm3-1.1.13/ \ > http://m3.polymtl.ca/m3htbin/download/m3/pkg/pm3-1.1.13/libs \ > http://m3.polymtl.ca/m3htbin/download/m3/pkg/pm3-1.1.13/graphics/gr-libs > DISTFILES= set.tgz m3config.tgz ui > > especially since it causes a bunch of errors to occur before actually > fetching the right files. Right, I don't like it because of its n**2 problem with too many combinations of master site / distfile that aren't right. If the fetch step can just be made to preserve the directory structure of the DISTFILES entries, then everything will work fine. I made a shell script that does that, and pointed FETCH_CMD at it. Once I did that, everything fetched and built OK. Here's the script. It uses the fact that all of my MASTER_SITES end in "pm3-1.1.13" to figure out where the master site portion ends and the distfile portion begins. But that wouldn't be needed if this functionality were supported in <bsd.port.mk> directly. #! /bin/sh PATH=/bin:/usr/bin:/sbin:/usr/sbin export PATH url=$1 path=${url##*/pm3-1.1.13/} dir=${path%/*} minusA= if [ `sysctl -n kern.osreldate` -ge 300000 ]; then minusA="-A" fi mkdir -p ${dir} || exit exec fetch $minusA -o ${path} ${url} John -- John Polstra jdp@polstra.com John D. Polstra & Co., Inc. Seattle, Washington USA "No matter how cynical I get, I just can't keep up." -- Nora Ephron To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.990907230658.jdp>