<pre style='margin:0'>
Michael Dickens (michaelld) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/cf680f7f4dc7821f1a1ae8a0ff61e8d339e8b615">https://github.com/macports/macports-ports/commit/cf680f7f4dc7821f1a1ae8a0ff61e8d339e8b615</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new cf680f7 OpenBLAS[-devel]: fix +clang and +gcc* variants to not conflict; default to +clang (for C/C++) and +gcc6 (for Fortran). If -clang is selected, then the +gcc* variant is used as the compiler suite. Addresses ticket https://trac.macports.org/ticket/53348 .
</span>cf680f7 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit cf680f7f4dc7821f1a1ae8a0ff61e8d339e8b615
</span>Author: Michael Dickens <michaelld@macports.org>
AuthorDate: Wed Feb 1 10:19:25 2017 -0500
<span style='display:block; white-space:pre;color:#404040;'> OpenBLAS[-devel]: fix +clang and +gcc* variants to not conflict; default to +clang (for C/C++) and +gcc6 (for Fortran). If -clang is selected, then the +gcc* variant is used as the compiler suite. Addresses ticket https://trac.macports.org/ticket/53348 .
</span>---
math/OpenBLAS/Portfile | 101 +++++++++++++++++++++++++++++++------------------
1 file changed, 64 insertions(+), 37 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/math/OpenBLAS/Portfile b/math/OpenBLAS/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index 8388fd3..1ef520b 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/math/OpenBLAS/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/math/OpenBLAS/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -45,43 +45,80 @@ checksums rmd160 11f85eb4bb382e10298ac40d1e1fd4ecc46bb3da \
</span>
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>-variant gcc45 conflicts gcc46 gcc47 gcc48 gcc49 gcc5 gcc6 clang \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- description "Use Gcc45 as compiler" {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- configure.compiler macports-gcc-4.5
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# declare +clang variant
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+variant clang description "Use Clang as C/C++ compiler (required for AVX)" {}
</span>
<span style='display:block; white-space:pre;background:#ffe0e0;'>-variant gcc46 conflicts gcc45 gcc47 gcc48 gcc49 gcc5 gcc6 clang \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- description "Use Gcc46 as compiler" {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- configure.compiler macports-gcc-4.6
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# default to +clang if the processor has avx instructions
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if {![catch {sysctl hw.optional.avx1_0} has_avx] && $has_avx == 1 &&
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ![variant_isset clang]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ default_variants +clang
</span> }
<span style='display:block; white-space:pre;background:#ffe0e0;'>-variant gcc47 conflicts gcc45 gcc46 gcc48 gcc49 gcc5 gcc6 clang \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- description "Use Gcc47 as compiler" {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- configure.compiler macports-gcc-4.7
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# it is OK to use -clang, so don't check for that condition here
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# declare +gcc* variants
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set GCC_VERSIONS_NO_DOT {45 46 47 48 49 5 6 7}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+foreach this_gcc_version_no_dot ${GCC_VERSIONS_NO_DOT} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set ndx [lsearch -exact ${this_gcc_version_no_dot} ${this_gcc_version_no_dot}]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set this_conflicts [lreplace ${this_gcc_version_no_dot} ${ndx} ${ndx}]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[variant_isset clang]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set this_description "Use gcc${this_gcc_version_no_dot} as Fortran compiler"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set this_description "Use gcc${this_gcc_version_no_dot} for the compiler suite"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ eval [subst {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ variant gcc${this_gcc_version_no_dot} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ conflicts ${this_conflicts} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ description ${this_description} {}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }]
</span> }
<span style='display:block; white-space:pre;background:#ffe0e0;'>-variant gcc48 conflicts gcc45 gcc46 gcc47 gcc49 gcc5 gcc6 clang \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- description "Use Gcc48 as compiler" {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- configure.compiler macports-gcc-4.8
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# set default +gcc* variant: default to +gcc6 if not other +gcc*
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# variant is selected. this variant is used for Fortran, no matter
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# whether +clang is selected or not. if +clang is not selected or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# -clang is selected, then use the selected +gcc* variant for the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# compiler suite.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set GCC_VER_NO_DOT 0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+foreach this_gcc_version_no_dot ${GCC_VERSIONS_NO_DOT} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[variant_isset gcc${this_gcc_version_no_dot}]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set GCC_VER_NO_DOT ${this_gcc_version_no_dot}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ break
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span> }
<span style='display:block; white-space:pre;background:#ffe0e0;'>-variant gcc49 conflicts gcc45 gcc46 gcc47 gcc48 gcc5 gcc6 clang \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- description "Use Gcc49 as compiler" {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- configure.compiler macports-gcc-4.9
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if {${GCC_VER_NO_DOT} == 0} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ default_variants +gcc6
</span> }
<span style='display:block; white-space:pre;background:#ffe0e0;'>-variant gcc5 conflicts gcc45 gcc46 gcc47 gcc48 gcc49 gcc6 clang \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- description "Use Gcc5 as compiler" {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- configure.compiler macports-gcc-5
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# make sure -gcc6 was not selected alone
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set GCC_VER_NO_DOT 0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+foreach this_gcc_version_no_dot ${GCC_VERSIONS_NO_DOT} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[variant_isset gcc${this_gcc_version_no_dot}]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set GCC_VER_NO_DOT ${this_gcc_version_no_dot}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ break
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span> }
<span style='display:block; white-space:pre;background:#ffe0e0;'>-variant gcc6 conflicts gcc45 gcc46 gcc47 gcc48 gcc49 gcc5 clang \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- description "Use Gcc6 as compiler" {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- configure.compiler macports-gcc-6
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if {${GCC_VER_NO_DOT} == 0} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_error "\n\nYou must select a Fortran compiler variant; you cannot select -gcc6 alone.\n"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return -code error "Invalid variant selection."
</span> }
<span style='display:block; white-space:pre;background:#ffe0e0;'>-variant clang conflicts gcc45 gcc46 gcc47 gcc48 gcc49 gcc5 gcc6 \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- description "Use Clang as compiler" {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set GCC_VER_DOT [join [split ${GCC_VER_NO_DOT} ""] "."]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# set compilers to use
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if {[variant_isset clang]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # use selected +gcc* for Fortran only
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_build-append port:gcc${GCC_VER_NO_DOT}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.fc ${prefix}/bin/gfortran-mp-${GCC_VER_DOT}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> if {[vercmp $xcodeversion 5.0] >= 0} {
configure.compiler clang
} else {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -94,21 +131,11 @@ variant clang conflicts gcc45 gcc46 gcc47 gcc48 gcc49 gcc5 gcc6 \
</span> configure.compiler macports-clang-3.4
}
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- depends_build-append port:gcc5
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- configure.fc ${prefix}/bin/gfortran-mp-5
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+} else {
</span>
<span style='display:block; white-space:pre;background:#ffe0e0;'>-}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # use selected +gcc* for the whole compiler suite
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.compiler macports-gcc-${GCC_VER_DOT}
</span>
<span style='display:block; white-space:pre;background:#ffe0e0;'>-if {![variant_isset gcc45] && ![variant_isset gcc46] && ![variant_isset gcc47] && \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ![variant_isset gcc48] && ![variant_isset gcc49] && ![variant_isset gcc5] && \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ![variant_isset gcc6] && ![variant_isset clang]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if { ![catch {sysctl hw.optional.avx1_0} has_avx] && $has_avx == 1 } {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #Use clang if the processor has avx instructions
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- default_variants +clang
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } else {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #Else, use gcc5 as default
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- default_variants +gcc5
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span> }
variant lapack description "Add Lapack/CLapack support to the library" { }
</pre><pre style='margin:0'>
</pre>