Update to 1.16.1

- Move TEST_DEPENDS upward
- Simplify Makefile

Changes:	https://github.com/numpy/numpy/releases
PR:		235721
Exp-run by:	antoine
This commit is contained in:
Sunpoet Po-Chuan Hsieh 2019-02-21 16:11:06 +00:00
parent a8776ad77c
commit f9d7c5e40d
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=493516
6 changed files with 51 additions and 73 deletions

View file

@ -2,8 +2,7 @@
# $FreeBSD$
PORTNAME= numpy
PORTVERSION= 1.15.4
PORTREVISION= 1
PORTVERSION= 1.16.1
PORTEPOCH= 1
CATEGORIES= math python
MASTER_SITES= CHEESESHOP \
@ -20,71 +19,52 @@ COMMENT= The New Numeric Extension to Python
LICENSE= BSD3CLAUSE
LICENSE_FILE= ${WRKSRC}/LICENSE.txt
TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>=0:devel/py-pytest@${PY_FLAVOR}
USES= fortran python zip
USE_PYTHON= allflavors autoplist concurrent cython distutils
GCCLIBDIR_CMDS= ${FC} -print-file-name=libgfortran.so | ${SED} -e s/libgfortran.so//
LDFLAGS+= -shared
PYDISTUTILS_BUILDARGS= --fcompiler=gnu95
PYDISTUTILS_CONFIGUREARGS= --fcompiler=gnu95
LDFLAGS+= -shared
OPTIONS_DEFINE= DOCS SUITESPARSE
OPTIONS_SINGLE= BLASLIB
OPTIONS_DEFAULT= NETLIB SUITESPARSE
OPTIONS_SINGLE_BLASLIB= ATLAS NETLIB OPENBLAS
SUITESPARSE_DESC= Use AMD and UMFPACK in SuiteSparse
TESTS_DESC= Install test suite requirements
PORTDOCS= *
GCCLIBDIR_CMDS= ${FC} -print-file-name=libgfortran.so | ${SED} -e s/libgfortran.so//
OPTIONS_DEFINE= DOCS SUITESPARSE
OPTIONS_SINGLE= BLASLIB
OPTIONS_SINGLE_BLASLIB= ATLAS NETLIB OPENBLAS
OPTIONS_DEFAULT= NETLIB SUITESPARSE
SUITESPARSE_DESC= Use AMD and UMFPACK in SuiteSparse
TESTS_DESC= Install test suite requirements
ATLAS_USES= blaslapack:atlas
ATLAS_VARS= BLASLIBS="ptf77blas, ptcblas" BLASNAME=atlas LAPACKLIBS=alpack LIBRARIES=atlas_libs
NETLIB_USES= blaslapack:netlib
NETLIB_VARS= BLASLIBS="blas, cblas" BLASNAME=atlas LAPACKLIBS=lapack LIBRARIES=atlas_libs
NETLIB_LIB_DEPENDS= libcblas.so:math/cblas
OPENBLAS_USES= blaslapack:openblas
OPENBLAS_VARS= BLASLIBS="openblasp, gfortran" BLASNAME=openblas LAPACKLIBS="openblasp, gfortran" LIBRARIES=libraries
SUITESPARSE_LIB_DEPENDS=libumfpack.so:math/suitesparse
TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>=0:devel/py-pytest@${PY_FLAVOR}
post-extract:
@${TOUCH} ${WRKSRC}/numpy/f2py/tests/src/temp
post-patch:
@${REINPLACE_CMD} -e "s|%%FC%%|${FC}|" ${WRKSRC}/numpy/distutils/fcompiler/gnu.py
@${REINPLACE_CMD} -e 's|%%FC%%|${FC}|' ${WRKSRC}/numpy/distutils/fcompiler/gnu.py
@${CP} ${FILESDIR}/site.cfg ${WRKSRC}/site.cfg
post-patch-SUITESPARSE-off:
@${REINPLACE_CMD} -e 's|:%%LOCALBASE%%/include/suitesparse||' ${WRKSRC}/site.cfg
pre-configure:
@${REINPLACE_CMD} -e "s|%%GCCLIBDIR%%|$$(${GCCLIBDIR_CMDS})|" \
-e "s|%%LOCALBASE%%|${LOCALBASE}|g" \
${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
-e 's|%%BLASLIBS%%|${BLASLIBS}|; s|%%BLASNAME%%|${BLASNAME}|' \
-e 's|%%LAPACKLIBS%%|${LAPACKLIBS}|; s|%%LIBRARIES%%|${LIBRARIES}|' \
${WRKSRC}/site.cfg
@${REINPLACE_CMD} -e "s|%%GCCLIBDIR%%|$$(${GCCLIBDIR_CMDS})|" ${WRKSRC}/numpy/distutils/system_info.py
pre-configure-ATLAS-on:
@${REINPLACE_CMD} -e "s|%%BLASNAME%%|atlas|" \
-e "s|%%LIBRARIES%%|atlas_libs|" \
-e "s|%%BLASLIBS%%|%%ATLASLIBS%%|" \
-e "s|%%LAPACKLIBS%%|alapack|" \
-e "s|%%ATLASLIBS%%|ptf77blas, ptcblas|" \
${WRKSRC}/site.cfg
pre-configure-NETLIB-on:
@${REINPLACE_CMD} -e "s|%%BLASNAME%%|atlas|" \
-e "s|%%LIBRARIES%%|atlas_libs|" \
-e "s|%%BLASLIBS%%|blas, cblas|" \
-e "s|%%LAPACKLIBS%%|lapack|" \
${WRKSRC}/site.cfg
pre-configure-OPENBLAS-on:
@${REINPLACE_CMD} -e "s|%%BLASNAME%%|openblas|" \
-e "s|%%LIBRARIES%%|libraries|" \
-e "s|%%LAPACKLIBS%%|%%BLASLIBS%%|" \
-e "s|%%BLASLIBS%%|openblasp, gfortran|" \
${WRKSRC}/site.cfg
pre-configure-SUITESPARSE-off:
@${REINPLACE_CMD} -e "s|:%%LOCALBASE%%/include/suitesparse||" ${WRKSRC}/site.cfg
@${REINPLACE_CMD} -e "s|%%GCCLIBDIR%%|$$(${GCCLIBDIR_CMDS})|" ${WRKSRC}/site.cfg ${WRKSRC}/numpy/distutils/system_info.py
post-install:
# ${INSTALL_MAN} ${WRKSRC}/doc/f2py/f2py.1 ${STAGEDIR}${MANPREFIX}/man/man1/f2py.1
${FIND} ${STAGEDIR}${PYTHON_SITELIBDIR} -name '*.so' | ${XARGS} ${STRIP_CMD}
post-install-DOCS-on:

View file

@ -1,7 +1,7 @@
TIMESTAMP = 1541439997
SHA256 (numpy-1.15.4.zip) = 3d734559db35aa3697dadcea492a423118c5c55d176da2f3be9c98d4803fc2a7
SIZE (numpy-1.15.4.zip) = 4473522
SHA256 (numpy-ref-1.15.4.pdf) = c05f5f70172018541d6159f8797e06e38ed3ca1de9dafc85964754b7ae2a7ccc
SIZE (numpy-ref-1.15.4.pdf) = 4843444
SHA256 (numpy-user-1.15.4.pdf) = a2827d1c1756c511566b66d2a1c00dec292e47ae98b1a7882a9fe4104ea3820d
SIZE (numpy-user-1.15.4.pdf) = 596191
TIMESTAMP = 1549058561
SHA256 (numpy-1.16.1.zip) = 31d3fe5b673e99d33d70cfee2ea8fe8dccd60f265c3ed990873a88647e3dd288
SIZE (numpy-1.16.1.zip) = 5070040
SHA256 (numpy-ref-1.16.1.pdf) = 5296c4949c92d00ae2c94ce65b78369b8081995dc72447bb20b6518bfaed3552
SIZE (numpy-ref-1.16.1.pdf) = 5175448
SHA256 (numpy-user-1.16.1.pdf) = aa8c591eee4c537768854f19e3cf4b861280828c19eb9d2e6194ea230570ea75
SIZE (numpy-user-1.16.1.pdf) = 592508

View file

@ -1,11 +1,11 @@
--- numpy/distutils/fcompiler/__init__.py.orig 2008-04-06 23:03:15.000000000 +0900
+++ numpy/distutils/fcompiler/__init__.py 2008-04-06 23:08:56.000000000 +0900
@@ -179,7 +179,7 @@
--- numpy/distutils/fcompiler/__init__.py.orig 2019-01-31 02:31:08 UTC
+++ numpy/distutils/fcompiler/__init__.py
@@ -177,7 +177,7 @@ class FCompiler(CCompiler):
# gnu95 compiler type when there are F90 sources.
suggested_f90_compiler = None
- compile_switch = "-c"
+ compile_switch = "-c -fPIC"
+ compile_switch = "-fPIC"
object_switch = "-o " # Ending space matters! It will be stripped
# but if it is missing then object_switch
# will be prefixed to object file name by

View file

@ -1,6 +1,15 @@
--- numpy/distutils/system_info.py.orig 2016-10-03 23:42:24 UTC
--- numpy/distutils/system_info.py.orig 2019-01-31 02:31:08 UTC
+++ numpy/distutils/system_info.py
@@ -1038,8 +1038,8 @@ class atlas_info(system_info):
@@ -169,6 +169,8 @@ def _c_string_literal(s):
Convert a python string into a literal suitable for inclusion into C code
"""
# only these three characters are forbidden in C strings
+ if s is None:
+ return '"None"'
s = s.replace('\\', r'\\')
s = s.replace('"', r'\"')
s = s.replace('\n', r'\n')
@@ -1109,8 +1111,8 @@ class atlas_info(system_info):
dir_env_var = 'ATLAS'
_lib_names = ['f77blas', 'cblas']
if sys.platform[:7] == 'freebsd':
@ -11,8 +20,8 @@
else:
_lib_atlas = ['atlas']
_lib_lapack = ['lapack']
@@ -1574,11 +1574,6 @@ class blas_opt_info(system_info):
self.set_info(**blas_mkl_info)
@@ -1630,11 +1632,6 @@ class blas_opt_info(system_info):
self.set_info(**blis_info)
return
- openblas_info = get_info('openblas')

View file

@ -1,14 +1,14 @@
--- numpy/f2py/f2py2e.py.orig 2014-10-26 10:36:14.000000000 -0400
+++ numpy/f2py/f2py2e.py 2014-12-11 07:52:11.000000000 -0500
@@ -516,6 +516,7 @@
--- numpy/f2py/f2py2e.py.orig 2019-01-31 02:31:08 UTC
+++ numpy/f2py/f2py2e.py
@@ -599,6 +599,7 @@ def run_compile():
include_dirs, sources = filter_files('-I', '', sources, remove_prefix=1)
library_dirs, sources = filter_files('-L', '', sources, remove_prefix=1)
libraries, sources = filter_files('-l', '', sources, remove_prefix=1)
+ extra_link_args, sources = filter_files('-Wl,|-B|-f','',sources,remove_prefix=0)
undef_macros, sources = filter_files('-U', '', sources, remove_prefix=1)
define_macros, sources = filter_files('-D', '', sources, remove_prefix=1)
using_numarray = 0
@@ -551,6 +552,7 @@
for i in range(len(define_macros)):
@@ -625,6 +626,7 @@ def run_compile():
'undef_macros': undef_macros,
'extra_objects': extra_objects,
'f2py_options': f2py_flags,

View file

@ -1,11 +0,0 @@
--- numpy/f2py/setup.py.orig 2015-08-11 17:03:43 UTC
+++ numpy/f2py/setup.py
@@ -55,7 +55,7 @@ def configuration(parent_package='', top
config.make_svn_version_py()
def generate_f2py_py(build_dir):
- f2py_exe = 'f2py' + os.path.basename(sys.executable)[6:]
+ f2py_exe = 'f2py'
if f2py_exe[-4:] == '.exe':
f2py_exe = f2py_exe[:-4] + '.py'
if 'bdist_wininst' in sys.argv and f2py_exe[-3:] != '.py':