summaryrefslogtreecommitdiff
path: root/math/py-numarray
diff options
context:
space:
mode:
authordbj <dbj@pkgsrc.org>2015-01-27 05:04:06 +0000
committerdbj <dbj@pkgsrc.org>2015-01-27 05:04:06 +0000
commit5c28f351465ccdeda47e0bba93841d3367b36497 (patch)
tree8f383ec6fc4ec223a6608f92fc544557bcca7e95 /math/py-numarray
parentb88422c70f13c83ad82ad12d4031c5a0bb493335 (diff)
downloadpkgsrc-5c28f351465ccdeda47e0bba93841d3367b36497.tar.gz
use the Accelerate framework on Darwin instead of the obsolete vecLib
Diffstat (limited to 'math/py-numarray')
-rw-r--r--math/py-numarray/Makefile5
-rw-r--r--math/py-numarray/distinfo5
-rw-r--r--math/py-numarray/patches/patch-Include_numarray_arraybase.h17
-rw-r--r--math/py-numarray/patches/patch-Src___dotblas.c16
-rw-r--r--math/py-numarray/patches/patch-cfg__packages.py24
5 files changed, 63 insertions, 4 deletions
diff --git a/math/py-numarray/Makefile b/math/py-numarray/Makefile
index 17f5bd49abf..c465b179eab 100644
--- a/math/py-numarray/Makefile
+++ b/math/py-numarray/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.19 2014/05/09 07:37:11 wiz Exp $
+# $NetBSD: Makefile,v 1.20 2015/01/27 05:05:30 dbj Exp $
DISTNAME= numarray-1.5.2
PKGNAME= ${PYPKGPREFIX}-numarray-1.5.2
@@ -11,8 +11,7 @@ HOMEPAGE= http://www.numpy.org/old_array_packages.html
COMMENT= Array manipulation
PLIST_VARS+= blas
-.if exists(/System/Library/Frameworks/vecLib.framework/Headers)
-BUILDLINK_PASSTHRU_DIRS+= /System/Library/Frameworks/vecLib.framework/Headers
+.if exists(/System/Library/Frameworks/Accelerate.framework)
PLIST.blas= yes
.endif
diff --git a/math/py-numarray/distinfo b/math/py-numarray/distinfo
index bdd3b233ade..9f888fb0c8e 100644
--- a/math/py-numarray/distinfo
+++ b/math/py-numarray/distinfo
@@ -1,6 +1,9 @@
-$NetBSD: distinfo,v 1.8 2006/10/17 14:25:43 drochner Exp $
+$NetBSD: distinfo,v 1.9 2015/01/27 05:05:30 dbj Exp $
SHA1 (numarray-1.5.2.tar.gz) = 17f6c4bb5f0d97e93923b8ca4f55fccc1ee985e9
RMD160 (numarray-1.5.2.tar.gz) = 51cc7681958cada32c515872e8def6fc0ff296ca
Size (numarray-1.5.2.tar.gz) = 1196014 bytes
+SHA1 (patch-Include_numarray_arraybase.h) = 4ea0b49b50a7cb0e9c9cb539eab5e750584795f7
+SHA1 (patch-Src___dotblas.c) = fcb6109d0c73ad50e0c33c79d6655a1b4cfeca0d
SHA1 (patch-aa) = 6edaab221c6d52a47e5a52b3039e37b8fef814b1
+SHA1 (patch-cfg__packages.py) = 6ded69dabce1942624daa588fe3c64ef67758e34
diff --git a/math/py-numarray/patches/patch-Include_numarray_arraybase.h b/math/py-numarray/patches/patch-Include_numarray_arraybase.h
new file mode 100644
index 00000000000..83ab066dd68
--- /dev/null
+++ b/math/py-numarray/patches/patch-Include_numarray_arraybase.h
@@ -0,0 +1,17 @@
+$NetBSD: patch-Include_numarray_arraybase.h,v 1.1 2015/01/27 05:05:30 dbj Exp $
+
+--- Include/numarray/arraybase.h.orig 2006-01-23 11:45:03.000000000 +0000
++++ Include/numarray/arraybase.h
+@@ -42,7 +42,12 @@ typedef struct { Float64 r, i; } Complex
+
+ #if LP64
+ typedef long int Int64;
++#ifdef __APPLE__
++/* match the definition in MacTypes.h */
++typedef unsigned long long UInt64;
++#else
+ typedef unsigned long int UInt64;
++#endif
+ typedef Int64 Long;
+ #else /* 32-bit platforms */
+ typedef Int32 Long;
diff --git a/math/py-numarray/patches/patch-Src___dotblas.c b/math/py-numarray/patches/patch-Src___dotblas.c
new file mode 100644
index 00000000000..5a8a7af1086
--- /dev/null
+++ b/math/py-numarray/patches/patch-Src___dotblas.c
@@ -0,0 +1,16 @@
+$NetBSD: patch-Src___dotblas.c,v 1.1 2015/01/27 05:05:30 dbj Exp $
+
+--- Src/_dotblas.c.orig 2006-07-24 20:11:35.000000000 +0000
++++ Src/_dotblas.c
+@@ -12,7 +12,11 @@ static char module_doc[] =
+ #include "Python.h"
+ #include "libnumarray.h"
+ #include "arrayobject.h"
++#ifdef __APPLE__
++#include <Accelerate/Accelerate.h>
++#else
+ #include <cblas.h>
++#endif
+
+ #include <stdio.h>
+
diff --git a/math/py-numarray/patches/patch-cfg__packages.py b/math/py-numarray/patches/patch-cfg__packages.py
new file mode 100644
index 00000000000..011f6ea51f5
--- /dev/null
+++ b/math/py-numarray/patches/patch-cfg__packages.py
@@ -0,0 +1,24 @@
+$NetBSD: patch-cfg__packages.py,v 1.1 2015/01/27 05:05:30 dbj Exp $
+
+The vecLib framework has been obsolete since at least osx 10.3
+use the Accelerate framework instead
+
+--- cfg_packages.py.orig 2005-07-21 13:57:10.000000000 +0000
++++ cfg_packages.py
+@@ -28,13 +28,12 @@ if USE_LAPACK:
+ lapack_link_args = []
+ lapack_include_dirs = ["Packages/LinearAlgebra2/Src"]
+
+- if os.path.exists('/System/Library/Frameworks/vecLib.framework'):
++ if os.path.exists('/System/Library/Frameworks/Accelerate.framework'):
+ # use Apple's optimized BLAS implementation
+ lapack_libs = []
+- lapack_link_args = ['-framework', 'vecLib']
+- lapack_compile_args = ['-framework', 'vecLib']
++ lapack_link_args = ['-framework', 'Accelerate']
++ lapack_compile_args = ['-framework', 'Accelerate']
+ lapack_dirs = []
+- lapack_include_dirs += ['/System/Library/Frameworks/vecLib.framework/Headers']
+ elif USE_ABSOFT: # Absoft Fortran
+ lapack_dirs = ['/usr/local/lib/atlas', '/opt/absoft/lib']
+ lapack_libs = ['lapack', 'f77blas', 'cblas', 'atlas',