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