port callback example

James Gregurich bayoubengal at mac.com
Tue Feb 8 14:55:47 PST 2011


On Feb 8, 2011, at 2:45 PM, Daniel J. Luke wrote:

> On Feb 8, 2011, at 5:38 PM, James Gregurich wrote:
>> 
>> muniversal overrides configure. In that function, there is a loop over universal_archs_to_use. I want the portfile to be able intercept each iteration of that loop and take an action based on the current configure.XXX variables.
> 
> I don't know why you need a callback for that.
> 
> muniversal just runs the configure (build, and destroot) phase multiple times. If you really need to, you can probably inspect the variables and do what you need to inside of the configure phase

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?


> 
>> the reason for the need:
>> 
>> To build the boost port for arm, I need to use muniversal since the "combined" architecture setting is specific to powerpc/intel.  In the boost portfile, I need a user-config.jam for each arch.
>> 
>> NOTE: I have looked into modifying the boost build system so that "combined" works for armv6 and armv7. It should be doable, but I want to get the system working for the existing structure of boost since the whole point of this exercise is to prove the existing structure of macports can be extended to cover the needs of various ports.
> 
> ... and this probably belongs on -dev and not -users

oops.  that was unintentional.



More information about the macports-dev mailing list