git: 054a651015be - main - www/py-adblock: fix build on powerpc64*
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 27 Oct 2021 23:58:09 UTC
The branch main has been updated by pkubaj: URL: https://cgit.FreeBSD.org/ports/commit/?id=054a651015bea4570f69c07fedd678ba077f30db commit 054a651015bea4570f69c07fedd678ba077f30db Author: Piotr Kubaj <pkubaj@FreeBSD.org> AuthorDate: 2021-10-27 23:52:41 +0000 Commit: Piotr Kubaj <pkubaj@FreeBSD.org> CommitDate: 2021-10-27 23:52:41 +0000 www/py-adblock: fix build on powerpc64* Python uses architecture name from "uname -m", but on FreeBSD it should actually use "uname -p". This causes pip to misrecognize valid wheel as wrong: ERROR: adblock-0.5.0-cp36-abi3-freebsd_13_0_RELEASE_p4_powerpc64.whl is not a supported wheel on this platform. This patch renames files on powerpc64* to end with powerpc.whl, which is acceptable for pip. --- www/py-adblock/Makefile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/www/py-adblock/Makefile b/www/py-adblock/Makefile index f535cabd658f..f9465416f6aa 100644 --- a/www/py-adblock/Makefile +++ b/www/py-adblock/Makefile @@ -99,6 +99,8 @@ CARGO_BUILD= no CARGO_INSTALL= no CARGO_TARGET_DIR= ${WRKSRC}/target +.include <bsd.port.options.mk> + # This is to prevent Mk/Uses/python.mk do-configure target from firing. do-configure: @@ -110,6 +112,10 @@ do-build: # Due to upstream not supplying a setup.py file or other way to install # using pip command for now... do-install: +.if ${ARCH:Mpowerpc64*} + @(cd ${INSTALL_WRKSRC}; \ + ${FIND} . -name "*whl" -exec sh -c 'mv {} `echo {} | sed -E -e "s/powerpc.*/powerpc.whl/"`' \;) +.endif @(cd ${INSTALL_WRKSRC} ; \ ${INSTALL_DATA} "target/release/libadblock.so" \ "${STAGEDIR}/${PREFIX}/lib" ; \