[139293] trunk/dports/python/py-numpy
michaelld at macports.org
michaelld at macports.org
Tue Aug 11 02:12:40 PDT 2015
Revision: 139293
https://trac.macports.org/changeset/139293
Author: michaelld at macports.org
Date: 2015-08-11 02:12:40 -0700 (Tue, 11 Aug 2015)
Log Message:
-----------
py*-numpy:
+ add +openblas variant, which conflicts with +atlas, and set environment variables for each variant or lack thereof;
+ hopefully addresses ticket #45926;
+ rev-bump for changes.
Modified Paths:
--------------
trunk/dports/python/py-numpy/Portfile
Added Paths:
-----------
trunk/dports/python/py-numpy/files/patch-numpy_core_setup.py.openblas.diff
Modified: trunk/dports/python/py-numpy/Portfile
===================================================================
--- trunk/dports/python/py-numpy/Portfile 2015-08-11 07:53:43 UTC (rev 139292)
+++ trunk/dports/python/py-numpy/Portfile 2015-08-11 09:12:40 UTC (rev 139293)
@@ -7,7 +7,7 @@
PortGroup compilers 1.0
github.setup numpy numpy 1.9.2 v
-revision 1
+revision 2
name py-numpy
categories-append math
license BSD
@@ -51,8 +51,7 @@
destroot.env-append ARCHFLAGS="[get_canonical_archflags ld]"
}
- variant atlas description {Use the MacPorts' ATLAS libraries \
- instead of Apple's Accelerate framework} {
+ variant atlas description conflicts openblas {Use MacPorts ATLAS Libraries} {
depends_lib-append port:atlas
if {[variant_isset universal]} {
@@ -60,6 +59,10 @@
}
}
+ variant openblas conflicts atlas description "Use MacPorts OpenBLAS Libraries" {
+ depends_lib-append path:lib/libopenblas.dylib:openblas
+ }
+
# when using ATLAS (whether by default or specified by the user via
# the +atlas variant) ...
if {[variant_isset atlas]} {
@@ -102,18 +105,36 @@
}
}
- build.env-append ATLAS=${prefix}/lib \
+ # use MacPorts atlas
+ build.env-append OPENBLAS=None \
+ ATLAS=${prefix}/lib \
LAPACK=${prefix}/lib \
BLAS=${prefix}/lib
- destroot.env-append ATLAS=${prefix}/lib \
+ destroot.env-append OPENBLAS=None \
+ ATLAS=${prefix}/lib \
LAPACK=${prefix}/lib \
BLAS=${prefix}/lib
+ } elseif {[variant_isset openblas]} {
+
+ # use MacPorts OpenBLAS
+ build.env-append OPENBLAS=${prefix}/lib \
+ ATLAS=None
+ destroot.env-append OPENBLAS=${prefix}/lib \
+ ATLAS=None
+ # force LDFLAGS for correct linking of the modules
+ # for non-Apple GCC compilers
+ patchfiles-append patch-numpy_linalg_setup.py.diff \
+ patch-numpy_core_setup.py.openblas.diff
+
} else {
- build.env-append ATLAS=None \
+ # use Accelerate BLAS
+ build.env-append OPENBLAS=None \
+ ATLAS=None \
LAPACK=/usr/lib \
BLAS=/usr/lib
- destroot.env-append ATLAS=None \
+ destroot.env-append OPENBLAS=None \
+ ATLAS=None \
LAPACK=/usr/lib \
BLAS=/usr/lib
}
Added: trunk/dports/python/py-numpy/files/patch-numpy_core_setup.py.openblas.diff
===================================================================
--- trunk/dports/python/py-numpy/files/patch-numpy_core_setup.py.openblas.diff (rev 0)
+++ trunk/dports/python/py-numpy/files/patch-numpy_core_setup.py.openblas.diff 2015-08-11 09:12:40 UTC (rev 139293)
@@ -0,0 +1,12 @@
+--- numpy/core/setup.py.orig
++++ numpy/core/setup.py
+@@ -980,7 +980,8 @@
+ join('blasdot', 'cblas.h'),
+ ],
+ include_dirs = ['blasdot'],
+- extra_info = blas_info
++ extra_info = blas_info,
++ extra_link_args=['-undefined dynamic_lookup -bundle']
+ )
+
+ #######################################################################
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150811/8bba5f9d/attachment.html>
More information about the macports-changes
mailing list