<pre style='margin:0'>
NicosPavlov pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/90bdc0a2b47d40d9ec9f55361244f271a574ea68">https://github.com/macports/macports-ports/commit/90bdc0a2b47d40d9ec9f55361244f271a574ea68</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 90bdc0a OpenBLAS: Use default target depending on OS version for binary version to work on all possible machines (#4387)
</span>90bdc0a is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 90bdc0a2b47d40d9ec9f55361244f271a574ea68
</span>Author: NicosPavlov <nicos@macports.org>
AuthorDate: Wed May 22 22:40:05 2019 +0900
<span style='display:block; white-space:pre;color:#404040;'> OpenBLAS: Use default target depending on OS version for binary version to work on all possible machines (#4387)
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Add native variant to force local build with full optimization.
</span>---
math/OpenBLAS/Portfile | 64 ++++++++++++++++++++++++++++++++++++++++++++++----
1 file changed, 59 insertions(+), 5 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 82e4c29..f6a64b6 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;'>@@ -14,10 +14,6 @@ description OpenBLAS is an optimized BLAS library based on GotoBLAS2
</span> long_description ${description}
platforms darwin
<span style='display:block; white-space:pre;background:#ffe0e0;'>-# Prevent precompiled binaries to let compilation optimise the library
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# for the user processor
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-archive_sites
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span> # block compilers that do not support thread-local storage. it would
# be better to use the cxx11 1.1 PG, but it conflicts with the
# compilers 1.0 PG & so just block compilers instead.
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -27,6 +23,33 @@ platform darwin i386 {
</span> compiler.fallback-append macports-clang-5.0 macports-clang-6.0 macports-clang-7.0
}
<span style='display:block; white-space:pre;background:#e0ffe0;'>+#Define target based on version of OS
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#OS 10.5 supports down to Intel Core Solo (Intel) or PowerPC G4
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if {${os.major} == 9} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {${os.arch} eq "i386" || [variant_isset universal]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set blas_arch "YONAH"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set blas_arch "PPCG4"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#OS 10.6 supports down to Intel Core Solo architecture
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if {${os.major} == 10} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set blas_arch "YONAH"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#OS 10.7-10.11 supports down to iMac 7,1, with Intel Core 2 Duo architecture
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#OS 10.12-13 supports down to iMac 10,1, with Intel Core 2 Duo architecture
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if {${os.major} >= 11 && ${os.major} <= 17} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set blas_arch "CORE2"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#OS 10.14 supports down to Mac Pro 5,1 that has Nehalem architecture
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if {${os.major} >= 18} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set blas_arch "NEHALEM"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if {![info exists blas_arch]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #For older versions, we force native variant as there is no PPCG3 target in OpenBLAS
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ default_variants-append +native
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> subport OpenBLAS-devel {}
if {[string first "-devel" $subport] > 0} {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -46,19 +69,29 @@ if {[string first "-devel" $subport] > 0} {
</span>
github.livecheck.branch develop
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ #Not using precompiled binaries in -devel support
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ default_variants-append +native
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> } else {
github.setup xianyi OpenBLAS 0.3.6 v
checksums rmd160 1e64aaaf26c92e8d49e3a9a61b1c43c7b99ad647 \
sha256 57e9fab61e1993005ab9f5d6b99929febbeddee3fda6d0e446b515ccff4f4fe4 \
size 11923774
<span style='display:block; white-space:pre;background:#ffe0e0;'>- revision 0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ revision 1
</span>
conflicts OpenBLAS-devel
patchfiles patch-libnoarch.release.diff \
patch-linkLib.release.diff \
patch-OpenBLAS-i386-Apple.diff
<span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![variant_isset native]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ notes "
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ This version is built based on a base architecture for convenience,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ which may not be optimized for your system. To build a version
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ customized for your machine, use the +native variant"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span> }
compilers.choose fc
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -67,6 +100,11 @@ compilers.setup default_fortran
</span> variant lapack description "Add Lapack/CLapack support to the library" { }
default_variants-append +lapack
<span style='display:block; white-space:pre;background:#e0ffe0;'>+variant native description "Force compilation on machine to get fully optimized library" {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Prevent precompiled binaries to let compilation optimise the library for the user processor
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ archive_sites
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> use_configure no
pre-build {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -92,6 +130,16 @@ pre-build {
</span> puts $makeINC "NO_LAPACK = 1"
}
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![variant_isset native]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #We set a minimal target in case native variant is not set
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {${build_arch} eq "ppc" || ${build_arch} eq "ppc64"} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ puts $makeINC "TARGET = PPCG4"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ puts $makeINC "TARGET = ${blas_arch}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> if {${build_arch} eq "ppc" || ${build_arch} eq "ppc64"} {
# on a PPC of some sort; just disable AVX
puts $makeINC "NO_AVX = 1"
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -137,6 +185,12 @@ pre-build {
</span> puts $makeINC "NO_LAPACK = 1"
}
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![variant_isset native]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #We set a minimal target in case native variant is not set
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ puts $makeINC "TARGET = ${blas_arch}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #Setting up build flags
</span> if {${build_arch} eq "ppc" || ${build_arch} eq "ppc64"} {
# on a PPC of some sort; just disable AVX
puts $makeINC "NO_AVX = 1"
</pre><pre style='margin:0'>
</pre>