On May 3, 2013, at 15:06, [email protected] wrote:
> Revision: 105716
> https://trac.macports.org/changeset/105716
> Author: [email protected]
> Date: 2013-05-03 13:06:13 -0700 (Fri, 03 May 2013)
> Log Message:
> -----------
> py-scikits-bvp_solver: New port.
> Added: trunk/dports/python/py-scikits-bvp_solver/Portfile
> + build.env-append CC=${configure.cc} \
> + F90=${configure.f90}
> +
> + variant gcc47 conflicts gcc48 gcc49 description {Use the gcc47 compiler
> (enables fortran code)} {
> + depends_lib-append port:gcc47
> + configure.compiler macports-gcc-4.7
> + configure.fc ${prefix}/bin/gfortran-mp-4.7
> + configure.f77 ${prefix}/bin/gfortran-mp-4.7
> + configure.f90 ${prefix}/bin/gfortran-mp-4.7
> + }
> +
> + variant gcc48 conflicts gcc47 gcc49 description {Use the gcc48 compiler
> (enables fortran code)} {
> + depends_lib-append port:gcc48
> + configure.compiler macports-gcc-4.8
> + configure.fc ${prefix}/bin/gfortran-mp-4.8
> + configure.f77 ${prefix}/bin/gfortran-mp-4.8
> + configure.f90 ${prefix}/bin/gfortran-mp-4.8
> + }
> +
> + variant gcc49 conflicts gcc47 gcc48 description {Use the gcc49 compiler
> (enables fortran code)} {
> + depends_lib-append port:gcc49
> + configure.compiler macports-gcc-4.9
> + configure.fc ${prefix}/bin/gfortran-mp-4.9
> + configure.f77 ${prefix}/bin/gfortran-mp-4.9
> + configure.f90 ${prefix}/bin/gfortran-mp-4.9
> + }
If you set configure.compiler, then configure.cc, configure.cxx, configure.fc,
configure.f77, configure.f90 and other similar variables are automatically set
to corresponding values for you.
Note that variants are evaluated after the rest of the portfile. This means
that when you set CC=${configure.cc} and F90=${configure.f90} in the build
environment, this will be done before the variants have been evaluated, so CC
would be the default MacPorts C compiler (e.g. clang on recent Xcode) and F90
would always be the empty string. This is probably not what you wanted. To set
them to the correct value for the selected gcc variant, enclose the
build.env-append invocation in a pre-build block. As luck would have it, the
python 1.0 portgroup already does this for you, so this can simply be removed
from the Portfile.
https://trac.macports.org/changeset/105825
_______________________________________________
macports-dev mailing list
[email protected]
https://lists.macosforge.org/mailman/listinfo/macports-dev