Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Aug 2023 00:26:15 GMT
From:      Yuri Victorovich <yuri@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: bfaa9b92afdc - main - math/py-mnnpy: Make march compiler argument depend on CPUTYPE
Message-ID:  <202308160026.37G0QFOJ008025@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by yuri:

URL: https://cgit.FreeBSD.org/ports/commit/?id=bfaa9b92afdc9275aec98f145b2e731865fa6ecd

commit bfaa9b92afdc9275aec98f145b2e731865fa6ecd
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2023-08-16 00:25:16 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2023-08-16 00:26:13 +0000

    math/py-mnnpy: Make march compiler argument depend on CPUTYPE
    
    Reported by:    fallout
---
 math/py-mnnpy/Makefile | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/math/py-mnnpy/Makefile b/math/py-mnnpy/Makefile
index adf1fd1e9a0b..30ff2a05ed11 100644
--- a/math/py-mnnpy/Makefile
+++ b/math/py-mnnpy/Makefile
@@ -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
 


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202308160026.37G0QFOJ008025>