[110141] trunk/dports/math/fftw-3/Portfile

Jeremy Huddleston Sequoia jeremyhu at macports.org
Tue Aug 27 08:35:07 PDT 2013


On Aug 27, 2013, at 5:44, Adam Mercer <ram at macports.org> wrote:

> Jeremy
> 
> This change seems to have broken fftw-3. It hardcodes the dependency
> on libgcc, therefore libgcc-devel can't be used.

Ah crap.  Thanks.  Sorry.  I wish this was caught earlier.  I'll update the recipe and the ports that are currently using it.


> Also it seems to
> allow you to specify multiple gcc versions, for example:
> 
> $ sudo port install fftw-3 +gcc47 +gcc48
> 
> doesn't complain and uses gfortran-mp-4.8 as the compiler.

It sure does.  Odd.  I'm wondering why that conflict is not working any more.  It was in the first version of the recipe, but I changed some things around to fix handling of the default variant, and it seems the conflict isn't being picked up now for some reason.

> This seems to be a step backwards from the previous version, what does
> this fix in relation to how it was done before. There are a lot of
> regressions and nothing that I can see fixed. At this point I'm
> tempted to revert your change but would like to understand why it was
> made first.

Please see the long discussion that has been happening on macports-dev about this recipe and the information provided at http://trac.macports.org/wiki/PortfileRecipes#fortran which discusses this recipe and the information provide at http://trac.macports.org/wiki/PortfileRecipes#gcc which discusses the reasons against the old version.

I'll push a fix for the libgcc-devel changes now, and I welcome suggestions about the conflict issue, but that might be better placed on the other thread...

--Jeremy


> 
> Cheers
> 
> Adam
> 
> On Tue, Aug 27, 2013 at 2:51 AM,  <jeremyhu at macports.org> wrote:
>> Revision 110141 Author jeremyhu at macports.org Date 2013-08-27 00:51:14 -0700
>> (Tue, 27 Aug 2013)
>> 
>> Log Message
>> 
>> fftw-3: Use fortran recipe.  Always install fortran bits for the primary
>> arch.
>> 
>> Modified Paths
>> 
>> trunk/dports/math/fftw-3/Portfile
>> 
>> Diff
>> 
>> Modified: trunk/dports/math/fftw-3/Portfile (110140 => 110141)
>> 
>> --- trunk/dports/math/fftw-3/Portfile	2013-08-27 07:41:34 UTC (rev 110140)
>> +++ trunk/dports/math/fftw-3/Portfile	2013-08-27 07:51:14 UTC (rev 110141)
>> @@ -5,7 +5,7 @@
>> 
>> name            fftw-3
>> version         3.3.3
>> -revision        1
>> +revision        2
>> categories      math
>> license         GPL-2+
>> platforms       darwin
>> @@ -43,7 +43,6 @@
>> 
>> configure.args \
>>     --enable-threads \
>> -    --disable-fortran \
>>     --enable-shared
>> 
>> configure.cflags-append \
>> @@ -171,91 +170,63 @@
>>     }
>> }
>> 
>> -variant gcc43 description {compile using gcc43 toolchain} conflicts gcc44
>> gcc45 gcc46 gcc47 gcc48 g95 {
>> -    configure.compiler    macports-gcc-4.3
>> -    configure.args-delete --disable-fortran
>> -    if { ${os.arch} == "i386" } {
>> -        lappend merger_configure_args(ppc)     "--disable-fortran"
>> -        lappend merger_configure_args(ppc64)   "--disable-fortran"
>> -    } else {
>> -        lappend merger_configure_args(i386)    "--disable-fortran"
>> -        lappend merger_configure_args(x86_64)  "--disable-fortran"
>> -    }
>> +if { ${os.arch} == "i386" } {
>> +    lappend merger_configure_args(ppc)     "--disable-fortran"
>> +    lappend merger_configure_args(ppc64)   "--disable-fortran"
>> +} else {
>> +    lappend merger_configure_args(i386)    "--disable-fortran"
>> +    lappend merger_configure_args(x86_64)  "--disable-fortran"
>> }
>> 
>> -variant gcc44 description {compile using gcc44 toolchain} conflicts gcc43
>> gcc45 gcc46 gcc47 gcc48 g95 {
>> -    configure.compiler    macports-gcc-4.4
>> -    configure.args-delete --disable-fortran
>> -    if { ${os.arch} == "i386" } {
>> -        lappend merger_configure_args(ppc)     "--disable-fortran"
>> -        lappend merger_configure_args(ppc64)   "--disable-fortran"
>> -    } else {
>> -        lappend merger_configure_args(i386)    "--disable-fortran"
>> -        lappend merger_configure_args(x86_64)  "--disable-fortran"
>> -    }
>> -}
>> +set gcc_versions {4.3 4.4 4.5 4.6 4.7 4.8 4.9}
>> +set default_fortran_variant +gcc48
>> 
>> -variant gcc45 description {compile using gcc45 toolchain} conflicts gcc43
>> gcc44 gcc46 gcc47 gcc48 g95 {
>> -    configure.compiler    macports-gcc-4.5
>> -    configure.args-delete --disable-fortran
>> -    if { ${os.arch} == "i386" } {
>> -        lappend merger_configure_args(ppc)     "--disable-fortran"
>> -        lappend merger_configure_args(ppc64)   "--disable-fortran"
>> -    } else {
>> -        lappend merger_configure_args(i386)    "--disable-fortran"
>> -        lappend merger_configure_args(x86_64)  "--disable-fortran"
>> +foreach ver ${gcc_versions} {
>> +    set ver_no_dot [join [split ${ver} "."] ""]
>> +
>> +    variant gcc${ver_no_dot} description {build with gfortran from
>> gcc${ver_no_dot}} {}
>> +
>> +    variant gcc${ver_no_dot} conflicts g95 {}
>> +    variant g95 conflicts gcc${ver_no_dot} {}
>> +
>> +    foreach over ${gcc_versions} {
>> +        if {${ver} == ${over}} {
>> +            continue
>> +        }
>> +
>> +        set over_no_dot [join [split ${over} "."] ""]
>> +        variant gcc${ver_no_dot} conflicts gcc${over_no_dot} {}
>>     }
>> -}
>> 
>> -variant gcc46 description {compile using gcc46 toolchain} conflicts gcc43
>> gcc44 gcc45 gcc47 gcc48 g95 {
>> -    configure.compiler    macports-gcc-4.6
>> -    configure.args-delete --disable-fortran
>> -    if { ${os.arch} == "i386" } {
>> -        lappend merger_configure_args(ppc)     "--disable-fortran"
>> -        lappend merger_configure_args(ppc64)   "--disable-fortran"
>> -    } else {
>> -        lappend merger_configure_args(i386)    "--disable-fortran"
>> -        lappend merger_configure_args(x86_64)  "--disable-fortran"
>> +    if {[variant_isset gcc${ver_no_dot}]} {
>> +        if {${default_fortran_variant} != "+gcc${ver_no_dot}"} {
>> +            set default_fortran_variant ""
>> +        }
>>     }
>> }
>> 
>> -variant gcc47 description {compile using gcc47 toolchain} conflicts gcc43
>> gcc44 gcc45 gcc46 gcc48 g95 {
>> -    configure.compiler    macports-gcc-4.7
>> -    configure.args-delete --disable-fortran
>> -    if { ${os.arch} == "i386" } {
>> -        lappend merger_configure_args(ppc)     "--disable-fortran"
>> -        lappend merger_configure_args(ppc64)   "--disable-fortran"
>> -    } else {
>> -        lappend merger_configure_args(i386)    "--disable-fortran"
>> -        lappend merger_configure_args(x86_64)  "--disable-fortran"
>> +variant g95 description {build with g95} {}
>> +
>> +if {[variant_isset g95]} {
>> +    if {${default_fortran_variant} != "+g95"} {
>> +        set default_fortran_variant ""
>>     }
>> }
>> 
>> -variant gcc48 description {compile using gcc47 toolchain} conflicts gcc43
>> gcc44 gcc45 gcc46 gcc47 g95 {
>> -    configure.compiler    macports-gcc-4.8
>> -    configure.args-delete --disable-fortran
>> -    if { ${os.arch} == "i386" } {
>> -        lappend merger_configure_args(ppc)     "--disable-fortran"
>> -        lappend merger_configure_args(ppc64)   "--disable-fortran"
>> -    } else {
>> -        lappend merger_configure_args(i386)    "--disable-fortran"
>> -        lappend merger_configure_args(x86_64)  "--disable-fortran"
>> -    }
>> +if {${default_fortran_variant} != ""} {
>> +    default_variants-append "${default_fortran_variant}"
>> }
>> 
>> -variant g95 description {create Fortran wrappers using f95} conflicts gcc43
>> gcc44 gcc45 gcc46 gcc47 gcc48 {
>> -    depends_lib-append    port:g95
>> -    depends_skip_archcheck g95
>> -    configure.f77          g95
>> -    configure.args-delete --disable-fortran
>> -    if { ${os.arch} == "i386" } {
>> -        lappend merger_configure_args(ppc)     "--disable-fortran"
>> -        lappend merger_configure_args(ppc64)   "--disable-fortran"
>> -        lappend merger_configure_args(x86_64)  "--disable-fortran"
>> -    } else {
>> -        lappend merger_configure_args(i386)    "--disable-fortran"
>> -        lappend merger_configure_args(ppc64)   "--disable-fortran"
>> -        lappend merger_configure_args(x86_64)  "--disable-fortran"
>> +foreach ver ${gcc_versions} {
>> +    set ver_no_dot [join [split ${ver} "."] ""]
>> +
>> +    if {[variant_isset gcc${ver_no_dot}]} {
>> +        depends_lib-append port:libgcc
>> +        depends_build-append port:gcc${ver_no_dot}
>> +
>> +        configure.fc  ${prefix}/bin/gfortran-mp-${ver}
>> +        configure.f77 ${prefix}/bin/gfortran-mp-${ver}
>> +        configure.f90 ${prefix}/bin/gfortran-mp-${ver}
>>     }
>> }
>> 
>> 
>> 
>> _______________________________________________
>> macports-changes mailing list
>> macports-changes at lists.macosforge.org
>> https://lists.macosforge.org/mailman/listinfo/macports-changes
>> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4145 bytes
Desc: not available
URL: <http://lists.macosforge.org/pipermail/macports-dev/attachments/20130827/cce43325/attachment-0001.p7s>


More information about the macports-dev mailing list