diff options
author | Diane Bruce <db@FreeBSD.org> | 2007-02-09 18:54:54 +0000 |
---|---|---|
committer | Diane Bruce <db@FreeBSD.org> | 2007-02-09 18:54:54 +0000 |
commit | 8c1ef3292fd261803d56707c5591fa4ef0e13567 (patch) | |
tree | d32f1a8e3348a458d6ea3443f2743666e5d2a307 /math | |
parent | 88defe86a2d0de255e181a401a12dd599e0d9832 (diff) | |
download | ports-8c1ef3292fd261803d56707c5591fa4ef0e13567.tar.gz ports-8c1ef3292fd261803d56707c5591fa4ef0e13567.zip |
Notes
Diffstat (limited to 'math')
-rw-r--r-- | math/py-numpy/Makefile | 20 | ||||
-rw-r--r-- | math/py-numpy/files/patch-numpy-distutils-fcompiler-gnu.py | 13 | ||||
-rw-r--r-- | math/py-numpy/files/patch-numpy-distutils-system_info.py | 21 | ||||
-rw-r--r-- | math/py-numpy/files/site.cfg | 11 |
4 files changed, 57 insertions, 8 deletions
diff --git a/math/py-numpy/Makefile b/math/py-numpy/Makefile index c5818c72bdd0..5a2fcf3ef06c 100644 --- a/math/py-numpy/Makefile +++ b/math/py-numpy/Makefile @@ -18,7 +18,7 @@ DISTFILES= numpy-${PORTVERSION:S/r/rc/}${EXTRACT_SUFX}:source \ numpy.pdf:doc EXTRACT_ONLY= numpy-${PORTVERSION:S/r/rc/}${EXTRACT_SUFX} -MAINTAINER= db@db.net +MAINTAINER= db@FreeBSD.org COMMENT= The New Numeric Extension to Python CONFLICTS= f2py-* @@ -58,10 +58,24 @@ pre-fetch: post-extract: @${CP} ${DISTDIR}/numpy.pdf ${WRKDIR} +BUILD_DEPENDS+= gfortran42:${PORTSDIR}/lang/gcc42 +FC= gfortran42 +F77= gfortran42 +GCCLIBDIR= `${FC} -print-file-name=` post-patch: -.if defined(WITH_ATLAS) - @${CP} ${FILESDIR}/site.cfg ${WRKSRC} +.ifdef WITH_ATLAS + @${CP} ${FILESDIR}/site.cfg ${WRKSRC}/site.cfg + @${REINPLACE_CMD} -e "s+%%GCCLIBDIR%%+${GCCLIBDIR}+" \ + -e "s+%%LOCALBASE%%+${LOCALBASE}+" \ + -e "s+%%ATLASLIBS%%+lapack, blas+" ${WRKSRC}/site.cfg +.else + @${CP} ${FILESDIR}/site.cfg ${WRKSRC}/site.cfg + @${REINPLACE_CMD} -e "s+%%GCCLIBDIR%%+${GCCLIBDIR}+" \ + -e "s+%%LOCALBASE%%+${LOCALBASE}+" \ + -e "s+%%ATLASLIBS%%+alapack_r, f77blas_r, cblas_r, atlas_r+" \ + ${WRKSRC}/site.cfg .endif + @${REINPLACE_CMD} -e "s+%%GCCLIBDIR%%+${GCCLIBDIR}+" ${WRKSRC}/numpy/distutils/system_info.py post-install: ${INSTALL_MAN} ${WRKSRC}/numpy/f2py/f2py.1 ${MAN1PREFIX}/man/man1 diff --git a/math/py-numpy/files/patch-numpy-distutils-fcompiler-gnu.py b/math/py-numpy/files/patch-numpy-distutils-fcompiler-gnu.py index 9df2af8562a5..db87e27b91ac 100644 --- a/math/py-numpy/files/patch-numpy-distutils-fcompiler-gnu.py +++ b/math/py-numpy/files/patch-numpy-distutils-fcompiler-gnu.py @@ -1,5 +1,14 @@ ---- numpy/distutils/fcompiler/gnu.py~ Mon Oct 9 16:46:59 2006 -+++ numpy/distutils/fcompiler/gnu.py Wed Jan 17 12:26:12 2007 +--- numpy/distutils/fcompiler/gnu.py.orig Mon Oct 9 03:46:59 2006 ++++ numpy/distutils/fcompiler/gnu.py Thu Jan 25 21:48:15 2007 +@@ -22,7 +22,7 @@ + # GNU Fortran 0.5.25 20010319 (prerelease) + # Redhat: GNU Fortran (GCC 3.2.2 20030222 (Red Hat Linux 3.2.2-5)) 3.2.2 20030222 (Red Hat Linux 3.2.2-5) + +- for fc_exe in map(find_executable,['g77','f77']): ++ for fc_exe in map(find_executable,['gfortran', 'gfortran41', 'gfortran42', 'g77','f77']): + if os.path.isfile(fc_exe): + break + executables = { @@ -247,7 +247,7 @@ # OS X: GNU Fortran 95 (GCC) 4.1.0 # GNU Fortran 95 (GCC) 4.2.0 20060218 (experimental) diff --git a/math/py-numpy/files/patch-numpy-distutils-system_info.py b/math/py-numpy/files/patch-numpy-distutils-system_info.py index c0615d0d0386..61723c4174ed 100644 --- a/math/py-numpy/files/patch-numpy-distutils-system_info.py +++ b/math/py-numpy/files/patch-numpy-distutils-system_info.py @@ -1,5 +1,5 @@ --- numpy/distutils/system_info.py.orig Tue Oct 3 00:35:22 2006 -+++ numpy/distutils/system_info.py Sat Dec 9 22:51:47 2006 ++++ numpy/distutils/system_info.py Sun Feb 4 19:46:15 2007 @@ -860,6 +860,8 @@ atlas_1 = None for d in lib_dirs: @@ -9,3 +9,22 @@ lapack_atlas = self.check_libs2(d,['lapack_atlas'],[]) if atlas is not None: lib_dirs2 = [d] + self.combine_paths(d,['atlas*','ATLAS*']) +@@ -935,6 +937,7 @@ + else: + info['language'] = 'f77' + ++ info['language'] = 'f77' + self.set_info(**info) + + class atlas_blas_info(atlas_info): +@@ -1188,8 +1191,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'): diff --git a/math/py-numpy/files/site.cfg b/math/py-numpy/files/site.cfg index badb3f67e602..2988e7f30aee 100644 --- a/math/py-numpy/files/site.cfg +++ b/math/py-numpy/files/site.cfg @@ -1,3 +1,10 @@ +[DEFAULT] +lapack_type=atlas +library_dirs = /usr/lib:%%LOCALBASE%%/lib:%%GCCLIBDIR%% +include_dirs = /usr/include:%%LOCALBASE/include +src_dirs = %%LOCALBASE%%/src +# search static libraries (.a) in preference to shared ones (.so) +search_static_first = 0 [atlas] -library_dirs = /usr/local/lib -atlas_libs = alapack_r, f77blas_r, cblas_r, atlas_r +library_dirs = %%LOCALBASE%%, %%GCCLIBDIR%% +atlas_libs = %%ATLASLIBS%% |