[110141] trunk/dports/math/fftw-3/Portfile
Adam Mercer
ram at macports.org
Tue Aug 27 05:44:12 PDT 2013
Jeremy
This change seems to have broken fftw-3. It hardcodes the dependency
on libgcc, therefore libgcc-devel can't be used. 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.
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.
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
>
More information about the macports-dev
mailing list