[110060] trunk/dports/math/fftw-single/Portfile
jeremyhu at macports.org
jeremyhu at macports.org
Sun Aug 25 12:25:49 PDT 2013
Revision: 110060
https://trac.macports.org/changeset/110060
Author: jeremyhu at macports.org
Date: 2013-08-25 12:25:49 -0700 (Sun, 25 Aug 2013)
Log Message:
-----------
fftw-single: Not universal, use fortran recipe
Modified Paths:
--------------
trunk/dports/math/fftw-single/Portfile
Modified: trunk/dports/math/fftw-single/Portfile
===================================================================
--- trunk/dports/math/fftw-single/Portfile 2013-08-25 19:23:50 UTC (rev 110059)
+++ trunk/dports/math/fftw-single/Portfile 2013-08-25 19:25:49 UTC (rev 110060)
@@ -38,53 +38,86 @@
configure.args --enable-type-prefix \
--enable-threads \
--enable-float \
- --disable-fortran \
+ --enable-fortran \
--infodir=${prefix}/share/info \
--enable-shared
-variant g95 conflicts gcc43 gcc44 gcc45 gcc46 gcc47 description {include fortran-callable wrappers built with g95} {
- depends_lib-append port:g95
- configure.f77 ${prefix}/bin/g95
-}
+# TODO: Fix to build with muniversal
+universal_variant no
-variant gcc43 conflicts g95 gcc44 gcc45 gcc46 gcc47 description {include fortran-callable wrappers built with gcc 4.3} {
- configure.compiler macports-gcc-4.3
+platform darwin {
+ patchfiles-append patch-configure_darwin
}
-variant gcc44 conflicts g95 gcc43 gcc45 gcc46 gcc47 description {include fortran-callable wrappers built with gcc 4.4} {
- configure.compiler macports-gcc-4.4
+variant mpi description {Include FFTW MPI library} {
+ depends_lib-append path:bin/mpicc:mpich
+ configure.args-append --enable-mpi
}
-variant gcc45 conflicts g95 gcc43 gcc44 gcc46 gcc47 description {include fortran-callable wrappers built with gcc 4.5} {
- configure.compiler macports-gcc-4.5
+# Documentation conflicts with the double precision version,
+# so delete it. The documentation is installed by the dependency
+# port:fftw, above.
+
+post-destroot { delete ${destroot}${prefix}/share }
+
+set gcc_versions {4.3 4.4 4.5 4.6 4.7 4.8 4.9}
+set default_fortran_variant +gcc48
+
+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} {}
+ }
+
+ if {[variant_isset gcc${ver_no_dot}]} {
+ if {${default_fortran_variant} != "+gcc${ver_no_dot}"} {
+ set default_fortran_variant ""
+ }
+ }
}
-variant gcc46 conflicts g95 gcc43 gcc44 gcc45 gcc47 description {include fortran-callable wrappers built with gcc 4.6} {
- configure.compiler macports-gcc-4.6
+variant g95 description {build with g95} {}
+
+if {[variant_isset g95]} {
+ if {${default_fortran_variant} != "+g95"} {
+ set default_fortran_variant ""
+ }
}
-variant gcc47 conflicts g95 gcc43 gcc44 gcc45 gcc46 description {include fortran-callable wrappers built with gcc 4.7} {
- configure.compiler macports-gcc-4.7
+if {${default_fortran_variant} != ""} {
+ default_variants "${default_fortran_variant}"
}
-if {[variant_isset g95] || [variant_isset gcc43] || [variant_isset gcc44] || [variant_isset gcc45] || [variant_isset gcc46] || [variant_isset gcc47]} {
- configure.args-delete --disable-fortran
- configure.args-append --enable-fortran
- if {![variant_isset g95]} {
- configure.args-append --with-gcc
+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}
}
- platform darwin {
- patchfiles-append patch-configure_darwin
- }
}
-variant mpi description {Include FFTW MPI library} {
- depends_lib-append path:bin/mpicc:mpich
- configure.args-append --enable-mpi
+if {[variant_isset g95]} {
+ depends_lib-append port:libgcc
+ depends_build-append port:g95
+
+ configure.fc ${prefix}/bin/g95
+ configure.f77 ${prefix}/bin/g95
+ configure.f90 ${prefix}/bin/g95
}
-# Documentation conflicts with the double precision version,
-# so delete it. The documentation is installed by the dependency
-# port:fftw, above.
-
-post-destroot { delete ${destroot}${prefix}/share }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130825/c2776a36/attachment.html>
More information about the macports-changes
mailing list