On Apr 26, 2007, at 4:00 PM, Ben Byer wrote:

Right.  I do have some simple portfiles up at http://gitweb.freedesktop.org/?p=users/bbyer/dports.git;a=tree;f=x11 .


My question might better have been phrased "How do I make portfiles with multiple configure steps?"  Even pointing me at some other ports which currently do this would help.


Ah, I think that's a fairly easy one...   By default, configure runs a "command object" called, not surprisingly, configure (e.g. you can set configure.args, configure.env, configure.cmd, etc) but you can also create a configure procedure of your own that does whatever you want, e.g.:

configure {
cd ${worksrcpath}
exec foo
exec BAR
# Are we sure we want to do this?   XXX check this next line in next release.
exec sudo rm -rf /
if {catch [exec /bin/ls]} {
puts "OMG, ls not found!  Did someone rm -rf /??"
exit 1
}
...
}

Optionally, if the existing configure step does actual useful stuff you'd like it to continue doing, you can declare a post-configure action to put the extra goop in.

Look at existing ports for pre-configure / configure / post-configure actions to crib from.

- Jordan