From thinker@heaven.branda.to  Fri Dec 22 01:42:13 2006
Return-Path: <thinker@heaven.branda.to>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id A8D8716A403
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 22 Dec 2006 01:42:13 +0000 (UTC)
	(envelope-from thinker@heaven.branda.to)
Received: from heaven.branda.to (219-84-62-131-adsl-tpe.dynamic.so-net.net.tw [219.84.62.131])
	by mx1.freebsd.org (Postfix) with SMTP id 7BC0E13C447
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 22 Dec 2006 01:42:12 +0000 (UTC)
	(envelope-from thinker@heaven.branda.to)
Received: (qmail 29118 invoked by uid 1000); 22 Dec 2006 01:42:09 -0000
Message-Id: <20061222014209.29117.qmail@heaven.branda.to>
Date: 22 Dec 2006 01:42:09 -0000
From: Aho K.F.Li <thinker@branda.to>
Reply-To: Aho K.F.Li <thinker@branda.to>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: py-numpy is not work with default installation
X-Send-Pr-Version: 3.113
X-GNATS-Notify: tonymaher@optusnet.com.au

>Number:         107058
>Category:       ports
>Synopsis:       py-numpy is not work with default installation
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-python
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Dec 22 01:50:11 GMT 2006
>Closed-Date:    Sun Dec 24 11:39:25 GMT 2006
>Last-Modified:  Sun Dec 24 11:39:25 GMT 2006
>Originator:     Aho K.F. Li
>Release:        FreeBSD 7.0-CURRENT i386
>Organization:
Thinker
>Environment:
System: FreeBSD cowboy.branda.to 7.0-CURRENT FreeBSD 7.0-CURRENT #0: Sat Nov 4 2 0:49:51 CST 2006 thinker@cowboy.branda.to:/usr/src/sys/i386/compile/cowboy i386


	
>Description:
	py-numpy is broken with default installation when alapack is
	installed before py-numpy being.
	
>How-To-Repeat:
	install alapack
	make the port of py-numpy
	run python & import py-numpy
	python yells a run-time errror
	
>Fix:

	copy following files into py-numpy/files/ .
	

--- patch-numpy-distutils-system_info.py begins here ---
--- numpy/distutils/system_info.py.orig	Mon Jul 31 00:08:48 2006
+++ numpy/distutils/system_info.py	Sun Dec 17 23:24:50 2006
@@ -855,6 +855,8 @@
         atlas_1 = None
         for d in lib_dirs:
             atlas = self.check_libs2(d,atlas_libs,[])
+            if atlas is not None:
+                atlas['libraries'].extend(['g2c', 'm', 'pthread'])
             lapack_atlas = self.check_libs2(d,['lapack_atlas'],[])
             if atlas is not None:
                 lib_dirs2 = [d] + self.combine_paths(d,['atlas*','ATLAS*'])
@@ -1183,8 +1185,9 @@
         atlas_version = None
         need_lapack = 0
         need_blas = 0
+        lapack_type = self.cp.get(self.section, 'lapack_type').strip()
         info = {}
-        if atlas_info:
+        if lapack_type == 'atlas' and atlas_info:
             version_info = atlas_info.copy()
             atlas_version = get_atlas_version(**version_info)
             if not atlas_info.has_key('define_macros'):
--- patch-numpy-distutils-system_info.py ends here ---

--- patch-site.cfg begins here ---
--- site.cfg.orig	Wed Aug 23 03:01:25 2006
+++ site.cfg	Sun Dec 17 23:25:51 2006
@@ -1,3 +1,6 @@
+[DEFAULT]
+lapack_type = blas
+
 [atlas]
 library_dirs = /usr/lib/atlas/3dnow/
 atlas_libs = lapack, blas
--- patch-site.cfg ends here ---

--- site.cfg begins here ---
[DEFAULT]
lapack_type = atlas

[atlas]
library_dirs = /usr/local/lib
atlas_libs = alapack_r, f77blas_r, cblas_r, atlas_r
--- site.cfg ends here ---


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->freebsd-python 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Fri Dec 22 02:00:41 UTC 2006 
Responsible-Changed-Why:  
freebsd-python@ wants to have py- PRs 

http://www.freebsd.org/cgi/query-pr.cgi?pr=107058 
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Fri Dec 22 02:00:50 UTC 2006 
State-Changed-Why:  
Awaiting maintainers feedback 

http://www.freebsd.org/cgi/query-pr.cgi?pr=107058 
State-Changed-From-To: feedback->closed 
State-Changed-By: linimon 
State-Changed-When: Sun Dec 24 11:38:55 UTC 2006 
State-Changed-Why:  
Duplicate of ports/107022. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=107058 
>Unformatted:
