| @@ -1,72 +1,72 @@ | | | @@ -1,72 +1,72 @@ |
1 | # $NetBSD: Makefile,v 1.95 2022/05/25 19:09:25 tnn Exp $ | | 1 | # $NetBSD: Makefile,v 1.96 2022/05/25 19:22:20 tnn Exp $ |
2 | | | 2 | |
3 | DISTNAME= numpy-1.22.4 | | 3 | DISTNAME= numpy-1.22.4 |
4 | PKGNAME= ${PYPKGPREFIX}-${DISTNAME} | | 4 | PKGNAME= ${PYPKGPREFIX}-${DISTNAME} |
5 | PKGREVISION= 1 | | 5 | PKGREVISION= 2 |
6 | CATEGORIES= math python | | 6 | CATEGORIES= math python |
7 | MASTER_SITES= ${MASTER_SITE_PYPI:=n/numpy/} | | 7 | MASTER_SITES= ${MASTER_SITE_PYPI:=n/numpy/} |
8 | EXTRACT_SUFX= .zip | | 8 | EXTRACT_SUFX= .zip |
9 | | | 9 | |
10 | MAINTAINER= pkgsrc-users@NetBSD.org | | 10 | MAINTAINER= pkgsrc-users@NetBSD.org |
11 | HOMEPAGE= https://www.numpy.org/ | | 11 | HOMEPAGE= https://www.numpy.org/ |
12 | COMMENT= Array processing for numbers, strings, records, and objects | | 12 | COMMENT= Array processing for numbers, strings, records, and objects |
13 | LICENSE= modified-bsd | | 13 | LICENSE= modified-bsd |
14 | | | 14 | |
15 | TEST_DEPENDS+= ${PYPKGPREFIX}-hypothesis-[0-9]*:../../devel/py-hypothesis | | 15 | TEST_DEPENDS+= ${PYPKGPREFIX}-hypothesis-[0-9]*:../../devel/py-hypothesis |
16 | TEST_DEPENDS+= ${PYPKGPREFIX}-nose-[0-9]*:../../devel/py-nose | | 16 | TEST_DEPENDS+= ${PYPKGPREFIX}-nose-[0-9]*:../../devel/py-nose |
17 | TEST_DEPENDS+= ${PYPKGPREFIX}-test-[0-9]*:../../devel/py-test | | 17 | TEST_DEPENDS+= ${PYPKGPREFIX}-test-[0-9]*:../../devel/py-test |
18 | | | 18 | |
19 | # error: 'for' loop initial declarations are only allowed in C99 mode | | 19 | # error: 'for' loop initial declarations are only allowed in C99 mode |
20 | USE_LANGUAGES= c99 c++11 fortran | | 20 | USE_LANGUAGES= c99 c++11 fortran |
21 | | | 21 | |
22 | .include "../../math/py-numpy/Makefile.make_env" | | 22 | .include "../../math/py-numpy/Makefile.make_env" |
23 | | | 23 | |
24 | REPLACE_PYTHON+= *.py */*.py */*/*.py */*/*/*.py */*/*/*/*.py | | 24 | REPLACE_PYTHON+= *.py */*.py */*/*.py */*/*/*.py */*/*/*/*.py |
25 | | | 25 | |
26 | PYTHON_VERSIONS_INCOMPATIBLE= 27 37 | | 26 | PYTHON_VERSIONS_INCOMPATIBLE= 27 37 |
27 | | | 27 | |
28 | USE_PKG_RESOURCES= yes | | 28 | USE_PKG_RESOURCES= yes |
29 | | | 29 | |
30 | # XXX Avoid picking up other compilers when installed | | 30 | # XXX Avoid picking up other compilers when installed |
31 | .include "../../mk/compiler.mk" | | 31 | .include "../../mk/compiler.mk" |
32 | | | 32 | |
33 | .if defined(PKGSRC_FORTRAN) && ${PKGSRC_FORTRAN} == "g95" | | 33 | .if defined(PKGSRC_FORTRAN) && ${PKGSRC_FORTRAN} == "g95" |
34 | PYSETUPBUILDARGS+= --fcompiler=g95 | | 34 | PYSETUPBUILDARGS+= --fcompiler=g95 |
35 | .elif defined(PKGSRC_FORTRAN) && ${PKGSRC_FORTRAN} == "gfortran" | | 35 | .elif defined(PKGSRC_FORTRAN) && ${PKGSRC_FORTRAN} == "gfortran" |
36 | PYSETUPBUILDARGS+= --fcompiler=gnu95 | | 36 | PYSETUPBUILDARGS+= --fcompiler=gnu95 |
37 | .elif !empty(PKGSRC_COMPILER:Mgcc) | | 37 | .elif !empty(PKGSRC_COMPILER:Mgcc) |
38 | PYSETUPBUILDARGS+= --fcompiler=gnu | | 38 | PYSETUPBUILDARGS+= --fcompiler=gnu |
39 | .endif | | 39 | .endif |
40 | | | 40 | |
41 | # This package bypasses the wrappers and calls the compilers directly when | | 41 | # This package bypasses the wrappers and calls the compilers directly when |
42 | # linking, so ensure that we pass through requisite options. | | 42 | # linking, so ensure that we pass through requisite options. |
43 | LDFLAGS+= ${_COMPILER_ABI_FLAG.${ABI}} | | 43 | LDFLAGS+= ${_COMPILER_ABI_FLAG.${ABI}} |
44 | | | 44 | |
45 | BLAS_ACCEPTED= ${_BLAS_TYPES} accelerate.framework | | 45 | BLAS_ACCEPTED= ${_BLAS_TYPES} accelerate.framework |
46 | BLAS_C_INTERFACE= yes | | 46 | BLAS_C_INTERFACE= yes |
47 | CPPFLAGS+= ${BLAS_INCLUDES} | | 47 | CPPFLAGS+= ${BLAS_INCLUDES} |
48 | | | 48 | |
49 | .include "../../mk/bsd.prefs.mk" | | 49 | .include "../../mk/bsd.prefs.mk" |
50 | | | 50 | |
51 | # numpy fails using the gold linker with: | | 51 | # numpy fails using the gold linker with: |
52 | # fatal error: --sysroot=: must take a non-empty argument | | 52 | # fatal error: --sysroot=: must take a non-empty argument |
53 | # Work around it on DragonFly by specifying the classic gnu linker | | 53 | # Work around it on DragonFly by specifying the classic gnu linker |
54 | MAKE_ENV.DragonFly+= LDVER=ld.bfd | | 54 | MAKE_ENV.DragonFly+= LDVER=ld.bfd |
55 | | | 55 | |
56 | pre-install: | | 56 | pre-install: |
57 | ${RM} -f ${WRKSRC}/numpy/core/include/numpy/npy_common.h.orig | | 57 | ${RM} -f ${WRKSRC}/numpy/core/include/numpy/npy_common.h.orig |
58 | | | 58 | |
59 | post-install: | | 59 | post-install: |
60 | cd ${DESTDIR}${PREFIX}/bin && ${RM} f2py || ${TRUE} | | 60 | cd ${DESTDIR}${PREFIX}/bin && ${RM} f2py || ${TRUE} |
61 | cd ${DESTDIR}${PREFIX}/bin && ${RM} f2py3 || ${TRUE} | | 61 | cd ${DESTDIR}${PREFIX}/bin && ${RM} f2py3 || ${TRUE} |
62 | | | 62 | |
63 | do-test: | | 63 | do-test: |
64 | cd ${WRKDIR} && \ | | 64 | cd ${WRKDIR} && \ |
65 | ${RUN} PYTHONPATH=${DESTDIR}${PREFIX}/${PYSITELIB} ${PYTHONBIN} -c "import numpy; numpy.test()" | | 65 | ${RUN} PYTHONPATH=${DESTDIR}${PREFIX}/${PYSITELIB} ${PYTHONBIN} -c "import numpy; numpy.test()" |
66 | | | 66 | |
67 | BUILDLINK_API_DEPENDS.py-cython+= ${PYPKGPREFIX}-cython>=0.29.21 | | 67 | BUILDLINK_API_DEPENDS.py-cython+= ${PYPKGPREFIX}-cython>=0.29.21 |
68 | .include "../../devel/py-cython/buildlink3.mk" | | 68 | .include "../../devel/py-cython/buildlink3.mk" |
69 | .include "../../lang/python/application.mk" | | 69 | .include "../../lang/python/application.mk" |
70 | .include "../../lang/python/egg.mk" | | 70 | .include "../../lang/python/egg.mk" |
71 | .include "../../mk/blas.buildlink3.mk" | | 71 | .include "../../mk/blas.buildlink3.mk" |
72 | .include "../../mk/bsd.pkg.mk" | | 72 | .include "../../mk/bsd.pkg.mk" |