Compiler Portgroup ...

Peter Danecek Peter.Danecek at bo.ingv.it
Wed Feb 26 09:14:31 PST 2014


Sean,

I am looking into the compilers Portgroup again. But I have the impression to know really what I am actually doing. See details below.

On 10 Feb 2014, at 22:03, Sean Farley <sean at macports.org> wrote:

> 
> Peter.Danecek at bo.ingv.it writes:
> 
>> Unfortunately, I have no complete picture of how this port group is supposed to be used and miss some documentation, nothing found in Guide 5.9, introductory comment in the tcl file, no Recipe. 
> 
> Patches would be welcomed :-) but, yes, you are correct. I have very
> little documentation since some of these ideas are still fluid and open
> to discussion.

I could try to contribute once I have understood the logic. Anyway, if you still consider this WIP, maybe just add a somewhat extended Usage comment to the tcl file itself and change it along with this file. Ones, this is consolidated we could add documentation to the Guide at that point the `Recipes` might not be necessary any more.

> You could take a look at netcdf-fortran to see how a port can require a
> fortran compiler. Probably, the best way to document this stuff is to
> ask questions on the mailing list so everyone can remain in the loop
> (and it can help guide me to write documentation).

I am not sure if the cited port is really representative for the situation I am interested in, i.e. replacing the Fortran recipe. This is from the cited netcdf-fortran Portfile:

--- snip ---
PortSystem                  1.0
PortGroup                   muniversal 1.0
PortGroup                   mpi 1.0

compilers.choose            f77 f90 fc
mpi.setup                   require_fortran

mpi.enforce_variant         hdf5-18

[…]
--- snip ---

So it actually used the MPI portgroup not the compilers group directly. Okay, the MPI group used compiles. So I tried replacing mpi.* with compilers.*. It somehow works, but I do not get the the desired result. 

My Portfile now starts this way:
--- snip ---
PortSystem          1.0
PortGroup           python 1.0
PortGroup           github 1.0
PortGroup           compilers 1.0

github.setup        obspy obspy 4d67519
compilers.setup     require_fortran
compilers.choose    f77 f90 fc
--- snip ---

1) there is no default variant set. I would expect that if I require Fortran (the only motivation to care about all this), this would be set to some defaults which would work;

2) When testing with the +gcc48 (the former default) the port now compiles also C extensions with the selected GCC variant. This might be okay for the particular port. But actually this was what the Fortran recipe wanted to avoid.

So would be the correct use here? I just want to replace the recipe here.

>> I also wonder if the Recipes "Providing compiler variants" and "Selecting a Fortran Compiler" should not be replaced/updated at this (some) point.
> 
> That was what I was thinking, too.

Thanks!
~petr

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1762 bytes
Desc: not available
URL: <https://lists.macosforge.org/pipermail/macports-dev/attachments/20140226/104474a4/attachment.p7s>


More information about the macports-dev mailing list