Date: Thu, 12 Sep 2002 17:34:07 -0400 From: Alan E <alane@geeksrus.net> To: FreeBSD Ports List <ports@freebsd.org> Cc: Akinori MUSHA <knu@freebsd.org> Subject: neat pkgtools.conf trick Message-ID: <20020912213407.GA85405@wwweasel.geeksrus.net>
next in thread | raw e-mail | index | archive | help
In pkgtools.conf, there's a way to set make args, but no way to set the environment based on the port being built. Well, yes there is .... In the BEFOREBUILD array, you can specify a ruby block as "proc". So, you can do this: 'audio/lame*' => proc { |origin| ENV['CFLAGS'] = '-O3 -pipe'; "true" } The assignment returns the string assigned, so you have to add the "true" so that's the command that actually gets executed by the shell (which is a no-op). Hey knu, did you know that you could do that? -- Alan Eldridge Unix/C(++) IT Pro, 20 yrs, seeking new employment. (http://wwweasel.geeksrus.net/~alane/resume.txt) KDE, KDE-FreeBSD Teams (http://www.kde.org, http://freebsd.kde.org/) 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?20020912213407.GA85405>