git: 38419d1c4ee5 - main - math/py-mnnpy: fix build on powerpc* with CPUTYPE

From: Piotr Kubaj <pkubaj_at_FreeBSD.org>
Date: Wed, 30 Jul 2025 21:18:31 UTC
The branch main has been updated by pkubaj:

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

commit 38419d1c4ee50b19a3f2cb6caaeb4398990b8fd7
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2025-07-30 14:44:36 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2025-07-30 21:18:25 +0000

    math/py-mnnpy: fix build on powerpc* with CPUTYPE
    
    -march is not supported on powerpc*.
---
 math/py-mnnpy/Makefile | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/math/py-mnnpy/Makefile b/math/py-mnnpy/Makefile
index 87667c377ea6..505523b429e4 100644
--- a/math/py-mnnpy/Makefile
+++ b/math/py-mnnpy/Makefile
@@ -25,7 +25,11 @@ USE_PYTHON=	distutils cython autoplist
 
 post-patch:
 .if defined(CPUTYPE)
+.  if ${ARCH:Mpowerpc*}
+	@${REINPLACE_CMD} -e "s|'-march=native'|'-mcpu=${CPUTYPE}'|" ${WRKSRC}/setup.py
+.  else
 	@${REINPLACE_CMD} -e "s|'-march=native'|'-march=${CPUTYPE}'|" ${WRKSRC}/setup.py
+.  endif
 .else
 	@${REINPLACE_CMD} -e "s|'-march=native', ||" ${WRKSRC}/setup.py
 .endif