[33493] trunk/dports/python

ram at macports.org ram at macports.org
Sun Jan 27 15:36:17 PST 2008


Revision: 33493
          http://trac.macosforge.org/projects/macports/changeset/33493
Author:   ram at macports.org
Date:     2008-01-27 15:36:15 -0800 (Sun, 27 Jan 2008)

Log Message:
-----------
py-scipy/py25-scipy: apply patch from upstream revision 3387 "Ported
veclib support from linalg to lib.blas" - fixes test_fblas1_simple

Revision Links:
--------------
    http://trac.macosforge.org/projects/macports/changeset/3387

Modified Paths:
--------------
    trunk/dports/python/py-scipy/Portfile
    trunk/dports/python/py25-scipy/Portfile

Added Paths:
-----------
    trunk/dports/python/py-scipy/files/
    trunk/dports/python/py-scipy/files/patch-changeset_r3387.diff
    trunk/dports/python/py25-scipy/files/
    trunk/dports/python/py25-scipy/files/patch-changeset_r3387.diff

Modified: trunk/dports/python/py-scipy/Portfile
===================================================================
--- trunk/dports/python/py-scipy/Portfile	2008-01-27 23:18:08 UTC (rev 33492)
+++ trunk/dports/python/py-scipy/Portfile	2008-01-27 23:36:15 UTC (rev 33493)
@@ -5,7 +5,7 @@
 
 name                    py-scipy
 version                 0.6.0
-revision                3
+revision                4
 categories              python
 platforms               darwin
 maintainers             ram openmaintainer
@@ -26,6 +26,8 @@
 
 worksrcdir              ${distname}
 
+patchfiles              patch-changeset_r3387.diff
+
 build.env               CCFLAGS="-I${prefix}/include -L${prefix}/lib"
 
 set fc_options          "config_fc --fcompiler gnu95 --f77exec ${prefix}/bin/gfortran-mp-4.2 --f90exec ${prefix}/bin/gfortran-mp-4.2"

Added: trunk/dports/python/py-scipy/files/patch-changeset_r3387.diff
===================================================================
--- trunk/dports/python/py-scipy/files/patch-changeset_r3387.diff	                        (rev 0)
+++ trunk/dports/python/py-scipy/files/patch-changeset_r3387.diff	2008-01-27 23:36:15 UTC (rev 33493)
@@ -0,0 +1,65 @@
+--- scipy/lib/blas/setup.py
++++ scipy/lib/blas/setup.py
+@@ -21,4 +21,20 @@
+ 
+ #--------------------
++
++def needs_cblas_wrapper(info):
++    """Returns true if needs c wrapper around cblas for calling from
++    fortran."""
++    r_accel = re.compile("Accelerate")
++    r_vec = re.compile("vecLib")
++    res = False
++    try:
++        tmpstr = info['extra_link_args']
++        for i in tmpstr:
++            if r_accel.search(i) or r_vec.search(i):
++                res = True
++    except KeyError:
++        pass
++
++    return res
+ 
+ tmpl_empty_cblas_pyf = '''
+@@ -63,12 +79,17 @@
+             'drotmg srotmg drotm srotm'.split())
+ 
++    depends = [__file__, 'fblas_l?.pyf.src', 'fblas.pyf.src','fblaswrap.f.src',
++               'fblaswrap_veclib_c.c.src']
+     # fblas:
++    if needs_cblas_wrapper(blas_opt):
++        sources = ['fblas.pyf.src', 'fblaswrap_veclib_c.c.src'],
++    else:
++        sources = ['fblas.pyf.src','fblaswrap.f.src']
+     config.add_extension('fblas',
+-                         sources = ['fblas.pyf.src','fblaswrap.f.src'],
+-                         depends = [__file__,'fblas_l?.pyf.src'],
++                         sources = sources,
++                         depends = depends,
+                          f2py_options = ['skip:']+skip_names['fblas']+[':'],
+                          extra_info = blas_opt
+                          )
+-
+     # cblas:
+     def get_cblas_source(ext, build_dir):
+--- scipy/lib/blas/fblaswrap_veclib_c.c.src
++++ scipy/lib/blas/fblaswrap_veclib_c.c.src
+@@ -0,0 +1,18 @@
++#include <vecLib/vecLib.h>
++
++//#define WRAP_F77(a) wcblas_##a##_
++#define WRAP_F77(a) w##a##_
++
++/**begin repeat
++#p2=c,z,c,z#
++#s2=u,u,c,c#
++#ctype2=complex,double complex,complex,double complex#
++*/
++
++void WRAP_F77(@p2 at dot@s2@)(@ctype2@ *dot at s2@, const int *N, const @ctype2@ *X, const int *incX, const @ctype2@ *Y, const int *incY)
++{
++    cblas_ at p2@dot at s2@_sub(*N, X, *incX, Y, *incY, dot at s2@);
++}
++
++/**end repeat**/
++

Modified: trunk/dports/python/py25-scipy/Portfile
===================================================================
--- trunk/dports/python/py25-scipy/Portfile	2008-01-27 23:18:08 UTC (rev 33492)
+++ trunk/dports/python/py25-scipy/Portfile	2008-01-27 23:36:15 UTC (rev 33493)
@@ -5,7 +5,7 @@
 
 name                    py25-scipy
 version                 0.6.0
-revision                3
+revision                4
 categories              python
 platforms               darwin
 maintainers             ram openmaintainer
@@ -26,6 +26,8 @@
 
 worksrcdir              ${distname}
 
+patchfiles              patch-changeset_r3387.diff
+
 build.env               CCFLAGS="-I${prefix}/include -L${prefix}/lib"
 
 set fc_options          "config_fc --fcompiler gnu95 --f77exec ${prefix}/bin/gfortran-mp-4.2 --f90exec ${prefix}/bin/gfortran-mp-4.2"

Added: trunk/dports/python/py25-scipy/files/patch-changeset_r3387.diff
===================================================================
--- trunk/dports/python/py25-scipy/files/patch-changeset_r3387.diff	                        (rev 0)
+++ trunk/dports/python/py25-scipy/files/patch-changeset_r3387.diff	2008-01-27 23:36:15 UTC (rev 33493)
@@ -0,0 +1,65 @@
+--- scipy/lib/blas/setup.py
++++ scipy/lib/blas/setup.py
+@@ -21,4 +21,20 @@
+ 
+ #--------------------
++
++def needs_cblas_wrapper(info):
++    """Returns true if needs c wrapper around cblas for calling from
++    fortran."""
++    r_accel = re.compile("Accelerate")
++    r_vec = re.compile("vecLib")
++    res = False
++    try:
++        tmpstr = info['extra_link_args']
++        for i in tmpstr:
++            if r_accel.search(i) or r_vec.search(i):
++                res = True
++    except KeyError:
++        pass
++
++    return res
+ 
+ tmpl_empty_cblas_pyf = '''
+@@ -63,12 +79,17 @@
+             'drotmg srotmg drotm srotm'.split())
+ 
++    depends = [__file__, 'fblas_l?.pyf.src', 'fblas.pyf.src','fblaswrap.f.src',
++               'fblaswrap_veclib_c.c.src']
+     # fblas:
++    if needs_cblas_wrapper(blas_opt):
++        sources = ['fblas.pyf.src', 'fblaswrap_veclib_c.c.src'],
++    else:
++        sources = ['fblas.pyf.src','fblaswrap.f.src']
+     config.add_extension('fblas',
+-                         sources = ['fblas.pyf.src','fblaswrap.f.src'],
+-                         depends = [__file__,'fblas_l?.pyf.src'],
++                         sources = sources,
++                         depends = depends,
+                          f2py_options = ['skip:']+skip_names['fblas']+[':'],
+                          extra_info = blas_opt
+                          )
+-
+     # cblas:
+     def get_cblas_source(ext, build_dir):
+--- scipy/lib/blas/fblaswrap_veclib_c.c.src
++++ scipy/lib/blas/fblaswrap_veclib_c.c.src
+@@ -0,0 +1,18 @@
++#include <vecLib/vecLib.h>
++
++//#define WRAP_F77(a) wcblas_##a##_
++#define WRAP_F77(a) w##a##_
++
++/**begin repeat
++#p2=c,z,c,z#
++#s2=u,u,c,c#
++#ctype2=complex,double complex,complex,double complex#
++*/
++
++void WRAP_F77(@p2 at dot@s2@)(@ctype2@ *dot at s2@, const int *N, const @ctype2@ *X, const int *incX, const @ctype2@ *Y, const int *incY)
++{
++    cblas_ at p2@dot at s2@_sub(*N, X, *incX, Y, *incY, dot at s2@);
++}
++
++/**end repeat**/
++

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080127/dc0933d4/attachment.html


More information about the macports-changes mailing list