port callback example

Ryan Schmidt ryandesign at macports.org
Tue Feb 8 15:04:36 PST 2011

On Feb 8, 2011, at 16:55, James Gregurich wrote:

> Correct me if my understanding is wrong, but my analysis is that if I overrode configure in port using the muniversal portgroup, I would have to supply a new version of the entire configure function.  Is this incorrect?
> I also note that pre-configure and post-configure are only called once...not once-per-arch.
> As I see it, my only opportunity to patch the configure action is my supplying configure.cmd and configure.args. I don't see a way to add in code to configure.cmd that would output data to user-config.jam.
> Is my analysis wrong? If not, what is the recommended course of action if adding additional call-backs is undesirable?

One thing that has bothered me about muniversal is that the arch-specific directory is created at the beginning of its configure phase. This means that if I write a pre-configure block, that's too early to do anything in those arch-specific directories, because they don't exist yet. It would make more sense to me if muniversal would make those copies of the original directory in post-patch, say. That way, by pre-configure time, they'd all be there and you could write a pre-configure block in your port to do something with them. But I've never tried changing this behavior of muniversal to see if it breaks something.

More information about the macports-dev mailing list