Fortan question & devel/fortrancl/Portfile ?
Peter Danecek
Peter.Danecek at bo.ingv.it
Tue Jan 29 04:11:35 PST 2013
Hi all,
I am just browsing some Portfiles to understand how to handle fortran
builds correctly.
At this point I came about something I may not understand in devel/
fortrancl/Portfile (or is it just a copy-paste bug?)
Why the g95 variant would depend on port:gcc45 ?
--- snip ---
variant gcc45 conflicts g95 description {build with gfortran-mp-4.5} {
depends_build-append port:gcc45
configure.compiler macports-gcc-4.5
}
variant g95 conflicts gcc45 description {build with g95} {
depends_build-append port:gcc45
configure.fc g95
}
--- snap ---
Now my question:
For the C compiler there is some default behaviour, how to choose the
right compiler without depending on the actual system setup. Only in
case a certain compiler version does not build, there is a possibility
to influence the choice (at least this is what I understood).
I did not find any clear indications on how to do "the right thing"
for Fortran compilers, and maybe there I no a completely clear
strategy (???) on how to make Fortran compilation independent of the
actual system. There are all these variants around. But for example if
I have installed several versions of gccXX with the respective
gfortran, I may end up with quite a mix of gfortran dependencies.
Then I observe that all these variants are usually conflicting.
However, I guess (in theory) there are actually two different
situations:
(1) I have some software written in fortran, and here obviously one
single compiler is be fine (for example python extensions).
(2) I want to compile the fortran bindings of a library, to be used
with "my preferred fortran compiler". Here I might want to install
bindings for different compilers (or versions).
I guess, however the second case is not supported for the moment.
So which are the knobs to look at, when creating ports of fortran
programs (or programs with fortran bindings)?
Maybe I just missed the right place to look at?
Thanks!
~petr
More information about the macports-dev
mailing list