[110140] trunk/dports/science/scotch/Portfile
jeremyhu at macports.org
jeremyhu at macports.org
Tue Aug 27 00:41:34 PDT 2013
Revision: 110140
https://trac.macports.org/changeset/110140
Author: jeremyhu at macports.org
Date: 2013-08-27 00:41:34 -0700 (Tue, 27 Aug 2013)
Log Message:
-----------
scotch: Use fortran recipe. Fixes build on Mavericks
Modified Paths:
--------------
trunk/dports/science/scotch/Portfile
Modified: trunk/dports/science/scotch/Portfile
===================================================================
--- trunk/dports/science/scotch/Portfile 2013-08-27 07:36:26 UTC (rev 110139)
+++ trunk/dports/science/scotch/Portfile 2013-08-27 07:41:34 UTC (rev 110140)
@@ -38,27 +38,52 @@
sha1 3866deea3199bc364d31ec46c63adcb799a8cf48 \
rmd160 38ed5135e401767d0df8ecea6bcf8f7e4a60a464
+# openmpi is not universal
+universal_variant no
+
use_configure no
-variant gcc44 conflicts gcc45 gcc46 gcc47 description {Build with gcc 4.4} {}
-variant gcc45 conflicts gcc44 gcc46 gcc47 description {Build with gcc 4.5} {}
-variant gcc46 conflicts gcc44 gcc45 gcc47 description {Build with gcc 4.6} {}
-variant gcc47 conflicts gcc44 gcc45 gcc46 description {Build with gcc 4.7} {}
+set gcc_versions {4.3 4.4 4.5 4.6 4.7 4.8 4.9}
+set default_fortran_variant +gcc48
-if {[variant_isset gcc44]} {
- configure.compiler macports-gcc-4.4
-} elseif {[variant_isset gcc45]} {
- configure.compiler macports-gcc-4.5
-} elseif {[variant_isset gcc46]} {
- configure.compiler macports-gcc-4.6
-} else {
- default_variants +gcc47
- configure.compiler macports-gcc-4.7
+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}} {}
+
+ 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 universal {
+if {${default_fortran_variant} != ""} {
+ default_variants-append "${default_fortran_variant}"
}
+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}
+ }
+}
+
set archflags [get_canonical_archflags]
depends_lib-append port:openmpi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130827/0017a25e/attachment.html>
More information about the macports-changes
mailing list