[packages/python-numpy] Fix compilation with PLD gcc-fortran

jajcus jajcus at pld-linux.org
Thu Jul 18 09:39:22 CEST 2013


commit 065b92674f2faaff2917f50bc8b50fa3cc3e9e7c
Author: Jacek Konieczny <j.konieczny at eggsoft.pl>
Date:   Thu Jul 18 09:29:49 2013 +0200

    Fix compilation with PLD gcc-fortran
    
    Also: BR gcc-fortran for consistent results.

 python-numpy-fortran-version.patch | 16 ++++++++++++++++
 python-numpy.spec                  |  3 +++
 2 files changed, 19 insertions(+)
---
diff --git a/python-numpy.spec b/python-numpy.spec
index 0223876..b7d5fd2 100644
--- a/python-numpy.spec
+++ b/python-numpy.spec
@@ -13,6 +13,7 @@ License:	BSD
 Group:		Libraries/Python
 Source0:	http://downloads.sourceforge.net/numpy/%{module}-%{version}.tar.gz
 # Source0-md5:	0ab72b3b83528a7ae79c6df9042d61c6
+Patch0:		%{name}-fortran-version.patch
 URL:		http://sourceforge.net/projects/numpy/
 %if %{with python2}
 BuildRequires:	python-devel
@@ -22,6 +23,7 @@ BuildRequires:	python-devel
 BuildRequires:	python3-devel >= 1:3.3
 BuildRequires:	python3-2to3
 %endif
+BuildRequires:	gcc-fortran
 BuildRequires:	lapack-devel >= 3.1.1-2
 BuildRequires:	rpm-pythonprov
 # -- dropped some time ago
@@ -239,6 +241,7 @@ Generator interfejsów z Fortranu do Pythona 3.
 
 %prep
 %setup -q -n %{module}-%{version}
+%patch0 -p1
 
 %build
 CC="%{__cc}"; export CC
diff --git a/python-numpy-fortran-version.patch b/python-numpy-fortran-version.patch
new file mode 100644
index 0000000..54593e0
--- /dev/null
+++ b/python-numpy-fortran-version.patch
@@ -0,0 +1,16 @@
+diff -dur numpy-1.7.1.orig/numpy/distutils/fcompiler/gnu.py numpy-1.7.1/numpy/distutils/fcompiler/gnu.py
+--- numpy-1.7.1.orig/numpy/distutils/fcompiler/gnu.py	2013-04-07 07:04:05.000000000 +0200
++++ numpy-1.7.1/numpy/distutils/fcompiler/gnu.py	2013-07-18 09:20:06.000000000 +0200
+@@ -36,10 +36,10 @@
+         m = re.match(r'GNU Fortran', version_string)
+         if not m:
+             return None
+-        m = re.match(r'GNU Fortran\s+95.*?([0-9-.]+)', version_string)
++        m = re.match(r'GNU Fortran\s+95.*?(\d[0-9-.]*)', version_string)
+         if m:
+             return ('gfortran', m.group(1))
+-        m = re.match(r'GNU Fortran.*?([0-9-.]+)', version_string)
++        m = re.match(r'GNU Fortran.*?(\d[0-9-.]*)', version_string)
+         if m:
+             v = m.group(1)
+             if v.startswith('0') or v.startswith('2') or v.startswith('3'):
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-numpy.git/commitdiff/0bec99aa254f4af4ad74e3582bf9b224c3be89d0



More information about the pld-cvs-commit mailing list