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

Collapse All | Expand All

(-)w/math/py-numpy/Makefile (-7 / +9 lines)
Lines 1-77 Link Here
1
# Created by: Tony Maher
1
# Created by: Tony Maher
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	numpy
4
PORTNAME=	numpy
5
PORTVERSION=	1.16.6
5
PORTVERSION=	1.19.4
6
PORTEPOCH=	1
6
PORTEPOCH=	1
7
CATEGORIES=	math python
7
CATEGORIES=	math python
8
MASTER_SITES=	CHEESESHOP \
8
MASTER_SITES=	CHEESESHOP \
9
		https://docs.scipy.org/doc/${PORTNAME}-${PORTVERSION}/:doc
9
		https://numpy.org/doc/${PORTVERSION:R}/:doc
10
PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
10
PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
11
DISTFILES=	${DISTNAME}${EXTRACT_SUFX} \
11
DISTFILES=	${DISTNAME}${EXTRACT_SUFX} \
12
		${PORTNAME}-ref-${PORTVERSION:R}.1.pdf:doc \
12
		${PORTNAME}-ref.pdf:doc \
13
		${PORTNAME}-user-${PORTVERSION:R}.1.pdf:doc
13
		${PORTNAME}-user.pdf:doc
14
EXTRACT_ONLY=	${DISTNAME}${EXTRACT_SUFX}
14
EXTRACT_ONLY=	${DISTNAME}${EXTRACT_SUFX}
15
15
16
MAINTAINER=	python@FreeBSD.org
16
MAINTAINER=	python@FreeBSD.org
17
COMMENT=	The New Numeric Extension to Python
17
COMMENT=	The New Numeric Extension to Python
18
18
19
LICENSE=	BSD3CLAUSE
19
LICENSE=	BSD3CLAUSE
20
LICENSE_FILE=	${WRKSRC}/LICENSE.txt
20
LICENSE_FILE=	${WRKSRC}/LICENSE.txt
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
		${PYTHON_PKGNAMEPREFIX}hypothesis>=0:devel/py-hypothesis@${PY_FLAVOR}
23
24
24
USES=		compiler:c11 fortran python zip
25
USES=		compiler:c11 fortran python zip
25
USE_PYTHON=	allflavors autoplist concurrent cython distutils
26
USE_PYTHON=	allflavors autoplist concurrent cython distutils
26
27
27
GCCLIBDIR_CMDS=	${FC} -print-file-name=libgfortran.so | ${SED} -e s/libgfortran.so//
28
GCCLIBDIR_CMDS=	${FC} -print-file-name=libgfortran.so | ${SED} -e s/libgfortran.so//
28
LDFLAGS+=	-shared
29
LDFLAGS+=	-shared
29
PYDISTUTILS_BUILDARGS=		--fcompiler=gnu95
30
PYDISTUTILS_BUILDARGS=		--fcompiler=gnu95
30
PYDISTUTILS_CONFIGUREARGS=	--fcompiler=gnu95
31
PYDISTUTILS_CONFIGUREARGS=	--fcompiler=gnu95
31
32
32
PORTDOCS=	*
33
PORTDOCS=	*
33
34
34
OPTIONS_DEFINE=		DOCS SUITESPARSE
35
OPTIONS_DEFINE=		DOCS SUITESPARSE
35
OPTIONS_SINGLE=		BLASLIB
36
OPTIONS_SINGLE=		BLASLIB
36
OPTIONS_SINGLE_BLASLIB=	ATLAS NETLIB OPENBLAS
37
OPTIONS_SINGLE_BLASLIB=	ATLAS NETLIB OPENBLAS
37
OPTIONS_DEFAULT=	OPENBLAS SUITESPARSE
38
OPTIONS_DEFAULT=	OPENBLAS SUITESPARSE
38
SUITESPARSE_DESC=	Use AMD and UMFPACK in SuiteSparse
39
SUITESPARSE_DESC=	Use AMD and UMFPACK in SuiteSparse
39
40
40
ATLAS_USES=		blaslapack:atlas
41
ATLAS_USES=		blaslapack:atlas
41
ATLAS_VARS=		BLASLIBS="ptf77blas, ptcblas" BLASNAME=atlas LAPACKLIBS=alpack LIBRARIES=atlas_libs
42
ATLAS_VARS=		BLASLIBS="ptf77blas, ptcblas" BLASNAME=atlas LAPACKLIBS=alpack LIBRARIES=atlas_libs
42
NETLIB_USES=		blaslapack:netlib
43
NETLIB_USES=		blaslapack:netlib
43
NETLIB_VARS=		BLASLIBS="blas, cblas" BLASNAME=atlas LAPACKLIBS=lapack LIBRARIES=atlas_libs
44
NETLIB_VARS=		BLASLIBS="blas, cblas" BLASNAME=atlas LAPACKLIBS=lapack LIBRARIES=atlas_libs
44
NETLIB_LIB_DEPENDS=	libcblas.so:math/cblas
45
NETLIB_LIB_DEPENDS=	libcblas.so:math/cblas
45
OPENBLAS_USES=		blaslapack:openblas
46
OPENBLAS_USES=		blaslapack:openblas
46
OPENBLAS_VARS=		BLASLIBS="openblas, gfortran" BLASNAME=openblas LAPACKLIBS="openblas, gfortran" LIBRARIES=libraries
47
OPENBLAS_VARS=		BLASLIBS="openblas, gfortran" BLASNAME=openblas LAPACKLIBS="openblas, gfortran" LIBRARIES=libraries
47
SUITESPARSE_LIB_DEPENDS=libumfpack.so:math/suitesparse
48
SUITESPARSE_LIB_DEPENDS=libumfpack.so:math/suitesparse
48
49
49
post-extract:
50
post-extract:
50
	@${TOUCH} ${WRKSRC}/numpy/f2py/tests/src/temp
51
	@${TOUCH} ${WRKSRC}/numpy/f2py/tests/src/temp
51
52
52
post-patch:
53
post-patch:
53
	@${REINPLACE_CMD} -e 's|%%FC%%|${FC}|' ${WRKSRC}/numpy/distutils/fcompiler/gnu.py
54
	@${REINPLACE_CMD} -e 's|%%FC%%|${FC}|' ${WRKSRC}/numpy/distutils/fcompiler/gnu.py
54
	@${CP} ${FILESDIR}/site.cfg ${WRKSRC}/site.cfg
55
	@${CP} ${FILESDIR}/site.cfg ${WRKSRC}/site.cfg
55
56
56
post-patch-SUITESPARSE-off:
57
post-patch-SUITESPARSE-off:
57
	@${REINPLACE_CMD} -e 's|:%%LOCALBASE%%/include/suitesparse||' ${WRKSRC}/site.cfg
58
	@${REINPLACE_CMD} -e 's|:%%LOCALBASE%%/include/suitesparse||' ${WRKSRC}/site.cfg
58
59
59
pre-configure:
60
pre-configure:
60
	${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
61
	${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
61
		-e 's|%%BLASLIBS%%|${BLASLIBS}|; s|%%BLASNAME%%|${BLASNAME}|' \
62
		-e 's|%%BLASLIBS%%|${BLASLIBS}|; s|%%BLASNAME%%|${BLASNAME}|' \
62
		-e 's|%%LAPACKLIBS%%|${LAPACKLIBS}|; s|%%LIBRARIES%%|${LIBRARIES}|' \
63
		-e 's|%%LAPACKLIBS%%|${LAPACKLIBS}|; s|%%LIBRARIES%%|${LIBRARIES}|' \
63
			${WRKSRC}/site.cfg
64
			${WRKSRC}/site.cfg
64
	@${REINPLACE_CMD} -e "s|%%GCCLIBDIR%%|$$(${GCCLIBDIR_CMDS})|" ${WRKSRC}/site.cfg ${WRKSRC}/numpy/distutils/system_info.py
65
	@${REINPLACE_CMD} -e "s|%%GCCLIBDIR%%|$$(${GCCLIBDIR_CMDS})|" ${WRKSRC}/site.cfg ${WRKSRC}/numpy/distutils/system_info.py
65
66
66
post-install:
67
post-install:
67
	${FIND} ${STAGEDIR}${PYTHON_SITELIBDIR} -name '*.so' | ${XARGS} ${STRIP_CMD}
68
	${FIND} ${STAGEDIR}${PYTHON_SITELIBDIR} -name '*.so' | ${XARGS} ${STRIP_CMD}
69
	${REINPLACE_CMD} -e '\|_examples/$$|d' ${_PYTHONPKGLIST}
68
70
69
post-install-DOCS-on:
71
post-install-DOCS-on:
70
	@${MKDIR} ${STAGEDIR}${DOCSDIR}
72
	@${MKDIR} ${STAGEDIR}${DOCSDIR}
71
	${INSTALL_DATA} ${DISTDIR}/${PORTNAME}-ref-${PORTVERSION:R}.1.pdf ${STAGEDIR}${DOCSDIR}
73
	${INSTALL_DATA} ${DISTDIR}/${PORTNAME}-ref.pdf ${STAGEDIR}${DOCSDIR}
72
	${INSTALL_DATA} ${DISTDIR}/${PORTNAME}-user-${PORTVERSION:R}.1.pdf ${STAGEDIR}${DOCSDIR}
74
	${INSTALL_DATA} ${DISTDIR}/${PORTNAME}-user.pdf ${STAGEDIR}${DOCSDIR}
73
75
74
do-test:
76
do-test:
75
	@cd ${WRKSRC} && ${PYTHON_CMD} runtests.py
77
	@cd ${WRKSRC} && ${PYTHON_CMD} runtests.py
76
78
77
.include <bsd.port.mk>
79
.include <bsd.port.mk>
(-)w/math/py-numpy/distinfo (-7 / +7 lines)
Lines 1-7 Link Here
1
TIMESTAMP = 1588013658
1
TIMESTAMP = 1606923411
2
SHA256 (numpy-1.16.6.zip) = e5cf3fdf13401885e8eea8170624ec96225e2174eb0c611c6f26dd33b489e3ff
2
SHA256 (numpy-1.19.4.zip) = 141ec3a3300ab89c7f2b0775289954d193cc8edb621ea05f99db9cb181530512
3
SIZE (numpy-1.16.6.zip) = 5143340
3
SIZE (numpy-1.19.4.zip) = 7315971
4
SHA256 (numpy-ref-1.16.1.pdf) = 5296c4949c92d00ae2c94ce65b78369b8081995dc72447bb20b6518bfaed3552
4
SHA256 (numpy-ref.pdf) = 5fcfceb4c483bfe73ddf9ef5bd980e174dc5a540586c0f474b48c6a662ed51ef
5
SIZE (numpy-ref-1.16.1.pdf) = 5175448
5
SIZE (numpy-ref.pdf) = 7127190
6
SHA256 (numpy-user-1.16.1.pdf) = aa8c591eee4c537768854f19e3cf4b861280828c19eb9d2e6194ea230570ea75
6
SHA256 (numpy-user.pdf) = 4dc62ac6ee0838f83d13e2761851a9931f73301ef99d4eea44297228a644aeb5
7
SIZE (numpy-user-1.16.1.pdf) = 592508
7
SIZE (numpy-user.pdf) = 4045474
(-)w/math/py-numpy/files/patch-numpy-distutils-system_info.py (-42 lines)
Lines 1-64 Link Here
1
--- numpy/distutils/system_info.py.orig	2019-08-27 21:01:36 UTC
1
--- numpy/distutils/system_info.py.orig	2019-08-27 21:01:36 UTC
2
+++ numpy/distutils/system_info.py
2
+++ numpy/distutils/system_info.py
3
@@ -172,6 +172,8 @@ def _c_string_literal(s):
3
@@ -172,6 +172,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
7
+    if s is None:
7
+    if s is None:
8
+        return '"None"'
8
+        return '"None"'
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
@@ -1112,8 +1114,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':
16
-        _lib_atlas = ['atlas_r']
16
-        _lib_atlas = ['atlas_r']
17
-        _lib_lapack = ['alapack_r']
17
-        _lib_lapack = ['alapack_r']
18
+        _lib_atlas = ['atlas']
18
+        _lib_atlas = ['atlas']
19
+        _lib_lapack = ['alapack']
19
+        _lib_lapack = ['alapack']
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