Manual tweak misc/edfbrowser
[dports.git] / misc / py-numcodecs / Makefile
1 PORTNAME=       numcodecs
2 DISTVERSION=    0.11.0
3 PORTREVISION=   2
4 CATEGORIES=     misc python
5 MASTER_SITES=   PYPI
6 PKGNAMEPREFIX=  ${PYTHON_PKGNAMEPREFIX}
7
8 MAINTAINER=     yuri@FreeBSD.org
9 COMMENT=        Package providing buffer compression and transformation codecs for use
10 WWW=            https://numcodecs.readthedocs.io/en/stable/
11
12 LICENSE=        MIT
13 LICENSE_FILE=   ${WRKSRC}/LICENSE.txt
14
15 BUILD_DEPENDS=  ${PYTHON_PKGNAMEPREFIX}py-cpuinfo>0:sysutils/py-py-cpuinfo@${PY_FLAVOR}
16 RUN_DEPENDS=    ${PYTHON_PKGNAMEPREFIX}entrypoints>0:devel/py-entrypoints@${PY_FLAVOR} \
17                 ${PYNUMPY}
18 RUN_DEPENDS+=   ${PYTHON_PKGNAMEPREFIX}msgpack>0:devel/py-msgpack@${PY_FLAVOR} \
19                 ${PYTHON_PKGNAMEPREFIX}zfp>0:devel/py-zfp@${PY_FLAVOR}
20
21 USES=           python
22 USE_PYTHON=     distutils cython autoplist pytest # tests fail to find the library in the staged directory for some reason
23
24 CXXFLAGS_i386=  -msse2 # otherwise it fails to compile: #error SSE2 is not supported by the target architecture/platform and/or this compiler.
25
26 TEST_ENV=       ${MAKE_ENV} PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
27 TEST_WRKSRC=    ${WRKSRC}/numcodecs/tests
28
29 OPTIONS_DEFINE=         AVX2
30
31 AVX2_DESC=              Use AVX2 SIMD instructions
32 AVX2_CONFIGURE_ENV_OFF= DISABLE_NUMCODECS_AVX2=yes
33 AVX2_MAKE_ENV_OFF=      DISABLE_NUMCODECS_AVX2=yes
34
35 .include <bsd.port.options.mk>
36
37 .if ${ARCH} == i386
38 MAKE_ENV+=      DISABLE_NUMCODECS_SSE2=yes DISABLE_NUMCODECS_AVX2=yes
39 .endif
40
41 post-install:
42         @${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/numcodecs/*${PYTHON_EXT_SUFFIX}.so
43
44 .include <bsd.port.mk>