Date: Sun, 31 Oct 1999 15:22:42 -0800 From: "David O'Brien" <obrien@FreeBSD.ORG> To: Cc@FreeBSD.ORG:Marcin Cieslak <saper@system.pl>, ports@FreeBSD.ORG Subject: Re: gif2png: 'optional' dependencies Message-ID: <19991031152242.B23583@dragon.nuxi.com> In-Reply-To: <Pine.BSF.4.10.9910261303450.29073-100000@picnic.mat.net>; from chuckr@picnic.mat.net on Tue, Oct 26, 1999 at 01:08:55PM -0400 References: <Pine.GSO.4.10.9910261842380.16153-100000@tricord.system.pl> <Pine.BSF.4.10.9910261303450.29073-100000@picnic.mat.net>
next in thread | previous in thread | raw e-mail | index | archive | help
> This is done by a lot of ports. Use a patch to change that line to > something easily replaced, like %%PREFIX%%/bin, and then use > a pre-install target to sed that: > > pre-install: > $(SED) -e "s/%%PREFIX%%/$(PREFIX)/" < infile >outfile A much cleaner way is: ${PERL} -pi.orig -e "s:/usr/bin/python:${PREFIX}/bin/python:" \ /path_to_file_to_change as one does not need to patch the file 1st and one does not need to mv the file to a temperary name before using sed (since sed cannot do in-place editing). -- -- David (obrien@NUXI.com) 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?19991031152242.B23583>