View | Details | Raw Unified | Return to bug 251626 | Differences between
and this patch

Collapse All | Expand All

(-)b/math/py-numpy/Makefile (-13 / +11 lines)
Lines 1-16 Link Here
1
# Created by: Tony Maher
1
# Created by: Tony Maher
2
2
3
PORTNAME=	numpy
3
PORTNAME=	numpy
4
PORTVERSION=	1.16.6
4
PORTVERSION=	1.20.3
5
PORTREVISION=	1
6
PORTEPOCH=	1
5
PORTEPOCH=	1
7
CATEGORIES=	math python
6
CATEGORIES=	math python
8
MASTER_SITES=	CHEESESHOP \
7
MASTER_SITES=	CHEESESHOP \
9
		https://docs.scipy.org/doc/${PORTNAME}-${PORTVERSION}/:doc
8
		https://numpy.org/doc/${PORTVERSION:R}/:doc
10
PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
9
PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
11
DISTFILES=	${DISTNAME}${EXTRACT_SUFX} \
10
DISTFILES=	${DISTNAME}${EXTRACT_SUFX} \
12
		${PORTNAME}-ref-${PORTVERSION:R}.1.pdf:doc \
11
		${PORTNAME}-ref.pdf:doc \
13
		${PORTNAME}-user-${PORTVERSION:R}.1.pdf:doc
12
		${PORTNAME}-user.pdf:doc
13
DIST_SUBDIR=	${PORTNAME}-${PORTVERSION:R}
14
EXTRACT_ONLY=	${DISTNAME}${EXTRACT_SUFX}
14
EXTRACT_ONLY=	${DISTNAME}${EXTRACT_SUFX}
15
15
16
MAINTAINER=	python@FreeBSD.org
16
MAINTAINER=	python@FreeBSD.org
Lines 21-27 LICENSE_FILE= ${WRKSRC}/LICENSE.txt Link Here
21
21
22
TEST_DEPENDS=	${PYTHON_PKGNAMEPREFIX}pytest>=0:devel/py-pytest@${PY_FLAVOR}
22
TEST_DEPENDS=	${PYTHON_PKGNAMEPREFIX}pytest>=0:devel/py-pytest@${PY_FLAVOR}
23
23
24
USES=		compiler:c11 fortran python:3.6+ zip
24
USES=		compiler:c11 fortran python:3.7+ zip
25
USE_PYTHON=	allflavors autoplist concurrent cython distutils
25
USE_PYTHON=	allflavors autoplist concurrent cython distutils
26
26
27
GCCLIBDIR_CMDS=	${FC} -print-file-name=libgfortran.so | ${SED} -e s/libgfortran.so//
27
GCCLIBDIR_CMDS=	${FC} -print-file-name=libgfortran.so | ${SED} -e s/libgfortran.so//
Lines 49-62 SUITESPARSE_LIB_DEPENDS=libumfpack.so:math/suitesparse-umfpack Link Here
49
post-extract:
49
post-extract:
50
	@${TOUCH} ${WRKSRC}/numpy/f2py/tests/src/temp
50
	@${TOUCH} ${WRKSRC}/numpy/f2py/tests/src/temp
51
51
52
post-patch:
52
pre-configure-SUITESPARSE-off:
53
	@${REINPLACE_CMD} -e 's|%%FC%%|${FC}|' ${WRKSRC}/numpy/distutils/fcompiler/gnu.py
54
	@${CP} ${FILESDIR}/site.cfg ${WRKSRC}/site.cfg
55
56
post-patch-SUITESPARSE-off:
57
	@${REINPLACE_CMD} -e 's|:%%LOCALBASE%%/include/suitesparse||' ${WRKSRC}/site.cfg
53
	@${REINPLACE_CMD} -e 's|:%%LOCALBASE%%/include/suitesparse||' ${WRKSRC}/site.cfg
58
54
59
pre-configure:
55
pre-configure:
56
	@${REINPLACE_CMD} -e 's|%%FC%%|${FC}|' ${WRKSRC}/numpy/distutils/fcompiler/gnu.py
57
	@${CP} ${FILESDIR}/site.cfg ${WRKSRC}/site.cfg
60
	${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
58
	${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
61
		-e 's|%%BLASLIBS%%|${BLASLIBS}|; s|%%BLASNAME%%|${BLASNAME}|' \
59
		-e 's|%%BLASLIBS%%|${BLASLIBS}|; s|%%BLASNAME%%|${BLASNAME}|' \
62
		-e 's|%%LAPACKLIBS%%|${LAPACKLIBS}|; s|%%LIBRARIES%%|${LIBRARIES}|' \
60
		-e 's|%%LAPACKLIBS%%|${LAPACKLIBS}|; s|%%LIBRARIES%%|${LIBRARIES}|' \
Lines 68-75 post-install: Link Here
68
66
69
post-install-DOCS-on:
67
post-install-DOCS-on:
70
	@${MKDIR} ${STAGEDIR}${DOCSDIR}
68
	@${MKDIR} ${STAGEDIR}${DOCSDIR}
71
	${INSTALL_DATA} ${DISTDIR}/${PORTNAME}-ref-${PORTVERSION:R}.1.pdf ${STAGEDIR}${DOCSDIR}
69
	${INSTALL_DATA} ${_DISTDIR}/${PORTNAME}-ref.pdf ${STAGEDIR}${DOCSDIR}
72
	${INSTALL_DATA} ${DISTDIR}/${PORTNAME}-user-${PORTVERSION:R}.1.pdf ${STAGEDIR}${DOCSDIR}
70
	${INSTALL_DATA} ${_DISTDIR}/${PORTNAME}-user.pdf ${STAGEDIR}${DOCSDIR}
73
71
74
do-test:
72
do-test:
75
	@cd ${WRKSRC} && ${PYTHON_CMD} runtests.py
73
	@cd ${WRKSRC} && ${PYTHON_CMD} runtests.py
(-)b/math/py-numpy/distinfo (-7 / +7 lines)
Lines 1-7 Link Here
1
TIMESTAMP = 1588013658
1
TIMESTAMP = 1621965044
2
SHA256 (numpy-1.16.6.zip) = e5cf3fdf13401885e8eea8170624ec96225e2174eb0c611c6f26dd33b489e3ff
2
SHA256 (numpy-1.20/numpy-1.20.3.zip) = e55185e51b18d788e49fe8305fd73ef4470596b33fc2c1ceb304566b99c71a69
3
SIZE (numpy-1.16.6.zip) = 5143340
3
SIZE (numpy-1.20/numpy-1.20.3.zip) = 7761912
4
SHA256 (numpy-ref-1.16.1.pdf) = 5296c4949c92d00ae2c94ce65b78369b8081995dc72447bb20b6518bfaed3552
4
SHA256 (numpy-1.20/numpy-ref.pdf) = 39514faf26f4fecb697d771ba83e9340e35d3afd22478ab7e641f9daed67e84a
5
SIZE (numpy-ref-1.16.1.pdf) = 5175448
5
SIZE (numpy-1.20/numpy-ref.pdf) = 7362241
6
SHA256 (numpy-user-1.16.1.pdf) = aa8c591eee4c537768854f19e3cf4b861280828c19eb9d2e6194ea230570ea75
6
SHA256 (numpy-1.20/numpy-user.pdf) = 20cc665d19cbb4a2dfe7505a06dc23ae978982fec27e3108ddb332110bc2a94c
7
SIZE (numpy-user-1.16.1.pdf) = 592508
7
SIZE (numpy-1.20/numpy-user.pdf) = 4977046
(-)b/math/py-numpy/files/patch-numpy-distutils-exec_command.py (-2 / +2 lines)
Lines 1-6 Link Here
1
--- numpy/distutils/exec_command.py.orig	2017-09-29 20:10:10 UTC
1
--- numpy/distutils/exec_command.py.orig	2021-05-08 18:35:28 UTC
2
+++ numpy/distutils/exec_command.py
2
+++ numpy/distutils/exec_command.py
3
@@ -231,7 +231,7 @@ def _exec_command(command, use_shell=Non
3
@@ -261,7 +261,7 @@ def _exec_command(command, use_shell=None, use_tee = N
4
 
4
 
5
     if os.name == 'posix' and use_shell:
5
     if os.name == 'posix' and use_shell:
6
         # On POSIX, subprocess always uses /bin/sh, override
6
         # On POSIX, subprocess always uses /bin/sh, override
(-)b/math/py-numpy/files/patch-numpy-distutils-fcompiler-__init__.py (-2 / +2 lines)
Lines 1-6 Link Here
1
--- numpy/distutils/fcompiler/__init__.py.orig	2019-01-31 02:31:08 UTC
1
--- numpy/distutils/fcompiler/__init__.py.orig	2021-05-09 10:38:00 UTC
2
+++ numpy/distutils/fcompiler/__init__.py
2
+++ numpy/distutils/fcompiler/__init__.py
3
@@ -177,7 +177,7 @@ class FCompiler(CCompiler):
3
@@ -171,7 +171,7 @@ class FCompiler(CCompiler):
4
     # gnu95 compiler type when there are F90 sources.
4
     # gnu95 compiler type when there are F90 sources.
5
     suggested_f90_compiler = None
5
     suggested_f90_compiler = None
6
 
6
 
(-)b/math/py-numpy/files/patch-numpy-distutils-fcompiler-gnu.py (-4 / +4 lines)
Lines 1-6 Link Here
1
--- numpy/distutils/fcompiler/gnu.py.orig	2015-09-13 16:21:27 UTC
1
--- numpy/distutils/fcompiler/gnu.py.orig	2021-05-08 21:14:06 UTC
2
+++ numpy/distutils/fcompiler/gnu.py
2
+++ numpy/distutils/fcompiler/gnu.py
3
@@ -83,7 +83,7 @@ class GnuFCompiler(FCompiler):
3
@@ -79,7 +79,7 @@ class GnuFCompiler(FCompiler):
4
             return None
4
             return None
5
         return v[1]
5
         return v[1]
6
 
6
 
Lines 9-15 Link Here
9
     executables = {
9
     executables = {
10
         'version_cmd'  : [None, "-dumpversion"],
10
         'version_cmd'  : [None, "-dumpversion"],
11
         'compiler_f77' : [None, "-g", "-Wall", "-fno-second-underscore"],
11
         'compiler_f77' : [None, "-g", "-Wall", "-fno-second-underscore"],
12
@@ -107,11 +107,13 @@ class GnuFCompiler(FCompiler):
12
@@ -103,11 +103,13 @@ class GnuFCompiler(FCompiler):
13
         for key in ['version_cmd', 'compiler_f77', 'linker_so', 'linker_exe']:
13
         for key in ['version_cmd', 'compiler_f77', 'linker_so', 'linker_exe']:
14
             executables[key].append('-mno-cygwin')
14
             executables[key].append('-mno-cygwin')
15
 
15
 
Lines 24-30 Link Here
24
         if sys.platform == 'darwin':
24
         if sys.platform == 'darwin':
25
             target = os.environ.get('MACOSX_DEPLOYMENT_TARGET', None)
25
             target = os.environ.get('MACOSX_DEPLOYMENT_TARGET', None)
26
             # If MACOSX_DEPLOYMENT_TARGET is set, we simply trust the value
26
             # If MACOSX_DEPLOYMENT_TARGET is set, we simply trust the value
27
@@ -265,7 +267,7 @@ class Gnu95FCompiler(GnuFCompiler):
27
@@ -287,7 +289,7 @@ class Gnu95FCompiler(GnuFCompiler):
28
                     self.executables[key].append('-mno-cygwin')
28
                     self.executables[key].append('-mno-cygwin')
29
         return v
29
         return v
30
 
30
 
(-)b/math/py-numpy/files/patch-numpy-distutils-system_info.py (-45 / +3 lines)
Lines 1-6 Link Here
1
--- numpy/distutils/system_info.py.orig	2019-08-27 21:01:36 UTC
1
--- numpy/distutils/system_info.py.orig	2021-05-09 10:38:00 UTC
2
+++ numpy/distutils/system_info.py
2
+++ numpy/distutils/system_info.py
3
@@ -172,6 +172,8 @@ def _c_string_literal(s):
3
@@ -209,6 +209,8 @@ def _c_string_literal(s):
4
     Convert a python string into a literal suitable for inclusion into C code
4
     Convert a python string into a literal suitable for inclusion into C code
5
     """
5
     """
6
     # only these three characters are forbidden in C strings
6
     # only these three characters are forbidden in C strings
Lines 9-15 Link Here
9
     s = s.replace('\\', r'\\')
9
     s = s.replace('\\', r'\\')
10
     s = s.replace('"',  r'\"')
10
     s = s.replace('"',  r'\"')
11
     s = s.replace('\n', r'\n')
11
     s = s.replace('\n', r'\n')
12
@@ -1112,8 +1114,8 @@ class atlas_info(system_info):
12
@@ -1322,8 +1324,8 @@ class atlas_info(system_info):
13
     dir_env_var = 'ATLAS'
13
     dir_env_var = 'ATLAS'
14
     _lib_names = ['f77blas', 'cblas']
14
     _lib_names = ['f77blas', 'cblas']
15
     if sys.platform[:7] == 'freebsd':
15
     if sys.platform[:7] == 'freebsd':
Lines 20-64 Link Here
20
     else:
20
     else:
21
         _lib_atlas = ['atlas']
21
         _lib_atlas = ['atlas']
22
         _lib_lapack = ['lapack']
22
         _lib_lapack = ['lapack']
23
@@ -1633,11 +1635,6 @@ class blas_opt_info(system_info):
24
             self.set_info(**blis_info)
25
             return
26
 
27
-        openblas_info = get_info('openblas')
28
-        if openblas_info:
29
-            self.set_info(**openblas_info)
30
-            return
31
-
32
         atlas_info = get_info('atlas_3_10_blas_threads')
33
         if not atlas_info:
34
             atlas_info = get_info('atlas_3_10_blas')
35
@@ -1730,18 +1727,17 @@ class blas_info(system_info):
36
                 # check we can link (find library)
37
                 # some systems have separate cblas and blas libs. First
38
                 # check for cblas lib, and if not present check for blas lib.
39
-                try:
40
-                    c.link_executable(obj, os.path.join(tmpdir, "a.out"),
41
-                                      libraries=["cblas"],
42
-                                      library_dirs=info['library_dirs'],
43
-                                      extra_postargs=info.get('extra_link_args', []))
44
-                    res = "cblas"
45
-                except distutils.ccompiler.LinkError:
46
-                    c.link_executable(obj, os.path.join(tmpdir, "a.out"),
47
-                                      libraries=["blas"],
48
-                                      library_dirs=info['library_dirs'],
49
-                                      extra_postargs=info.get('extra_link_args', []))
50
-                    res = "blas"
51
+                res = None
52
+                for libname in ['cblas', 'blas', 'openblas']:
53
+                    try:
54
+                        c.link_executable(obj, os.path.join(tmpdir, "a.out"),
55
+                                          libraries=[libname],
56
+                                          library_dirs=info['library_dirs'],
57
+                                          extra_postargs=info.get('extra_link_args', []))
58
+                        res = libname
59
+                        break
60
+                    except distutils.ccompiler.LinkError:
61
+                        pass
62
             except distutils.ccompiler.CompileError:
63
                 res = None
64
         finally:

Return to bug 251626