Compiler Portgroup ...
Sean Farley
sean at macports.org
Thu Feb 27 16:17:12 PST 2014
Ryan Schmidt <ryandesign at macports.org> writes:
> On Feb 26, 2014, at 13:46, Sean Farley <sean at macports.org> wrote:
>
>> The important part that I didn't really document is that compilers.setup
>> has to be the last call.
>
> If that’s so, just make the portgroup error out if the calls are not in the right order.
Good call.
>> In all the examples, I have compilers/mpi calls
>> after the PortGroup but before everything else and also with the setup
>> call last.
>>
>> I think you'll get the desired outcome if you change the order to:
>> --- snip ---
>> PortSystem 1.0
>> PortGroup python 1.0
>> PortGroup github 1.0
>> PortGroup compilers 1.0
>>
>> compilers.choose f77 f90 fc
>> compilers.setup require_fortran
>>
>> github.setup obspy obspy 4d67519
>> --- snip ---
>>
>> If this were Python, I could make lazily evaluated properties for this
>> but, unfortunately, this is not Python and my Tcl is pretty mediocre.
>
> Tcl also has lazily-evaluated properties; we use them all over the place in MacPorts.
Well, it's more of the magic that happens with the MacPorts phases and
making sure that's all setup correctly. Something happens when a
portfile is evaluated that makes, for example, mpi.cc not available
until way too late (i.e. pre-configure)
More information about the macports-dev
mailing list