math/py-mnnpy: Make march compiler argument depend on CPUTYPE
Reported by: fallout
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
PORTNAME= mnnpy
|
||||
DISTVERSION= 0.1.9.5
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= math python
|
||||
MASTER_SITES= PYPI
|
||||
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
|
||||
@@ -22,6 +23,13 @@ RUN_DEPENDS= ${PY_DEPENDS}
|
||||
USES= python
|
||||
USE_PYTHON= distutils cython autoplist
|
||||
|
||||
post-patch:
|
||||
.if defined(CPUTYPE)
|
||||
@${REINPLACE_CMD} -e "s|'-march=native'|'-march=${CPUTYPE}'|" ${WRKSRC}/setup.py
|
||||
.else
|
||||
@${REINPLACE_CMD} -e "s|'-march=native', ||" ${WRKSRC}/setup.py
|
||||
.endif
|
||||
|
||||
post-install:
|
||||
@${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/mnnpy/_utils.cpython-39.so
|
||||
|
||||
|
||||
Reference in New Issue
Block a user