aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPiotr Kubaj <pkubaj@FreeBSD.org>2021-10-27 23:52:41 +0000
committerPiotr Kubaj <pkubaj@FreeBSD.org>2021-10-27 23:52:41 +0000
commit054a651015bea4570f69c07fedd678ba077f30db (patch)
tree4da4f5122e86ff903005cd7979ef69427882d36f
parent962d7764a4fc1a26d8b5a638264cedd52ef84529 (diff)
downloadports-054a651015bea4570f69c07fedd678ba077f30db.tar.gz
ports-054a651015bea4570f69c07fedd678ba077f30db.zip
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.
-rw-r--r--www/py-adblock/Makefile6
1 files changed, 6 insertions, 0 deletions
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" ; \