1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-26 05:02:18 +00:00

- finish g77 to gfortran conversion

- change maintainer address to FreeBSD.org one
- fold in changes suggested by [1]

PR:             107022, 108807 (based on) [1]
Submitted by:   thinker@heaven.branda.to [1]
Approved by: ehaupt (mentor)
This commit is contained in:
Diane Bruce 2007-02-09 18:54:54 +00:00
parent 88defe86a2
commit 8c1ef3292f
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=184729
4 changed files with 57 additions and 8 deletions

View File

@ -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

View File

@ -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)

View File

@ -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'):

View File

@ -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%%