Date: Wed, 11 Apr 2001 09:43:40 +0200 From: Stijn Hoop <stijn@win.tue.nl> To: Adam Kranzel <adam@alameda.edu> Cc: freebsd-ports@freebsd.org Subject: Re: Question about making a port prefix-clean Message-ID: <20010411094340.A20170@pcwin002.win.tue.nl> In-Reply-To: <01041100123400.17830@teru.dyndns.org>; from adam@alameda.edu on Wed, Apr 11, 2001 at 12:12:34AM -0700 References: <01041100123400.17830@teru.dyndns.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi, On Wed, Apr 11, 2001 at 12:12:34AM -0700, Adam Kranzel wrote: > I am working on my first port (of Slash'Em, which is a variant of Nethack), > and have a question about making it prefix-clean. > > There are 6 patches necessary, 5 of which are to makefiles, and thus easy to > make prefix-clean. However one patch is to a pregenerated .h file, which > (among other things) defines the directory to install to. > Since it is a .h file not a makefile, I can't use the standard make variables > to change it for prefix-cleaness. > Is there a way to do this? I'm guessing they are generated in the 'make configure' step? You can define a post-configure target, which gets run after make configure. You could then patch them using sed or perl. For example: post-configure: ${PERL} -pi -e "s@/usr/local@${PREFIX}@g" ${WRKSRC}/foo.h or something like that. Note that this is hackish; however it should work. Maybe other people have better solutions than this :) > I have checked the various Nethack ports (which mine originally derived > from), and they have not dealt with this, and have just left it as is, and > thus not prefix-clean. > I have also checked the porters handbook and not found anything. It's not exactly a common situation... > If there is a way to do it I will also fix the Nethack ports, and submit > patches :) That would be cool. --Stijn -- Q: Why is Batman better than Bill Gates? A: Batman was able to beat the Penguin. 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?20010411094340.A20170>