aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKai Knoblich <kai@FreeBSD.org>2022-09-10 10:33:40 +0000
committerKai Knoblich <kai@FreeBSD.org>2022-09-10 10:33:40 +0000
commit8978bbb9747c44ba8ddf8058ea3419c363e92bf2 (patch)
tree504dab78987e572d05d099311e6eb00164442204
parentcc4726e0c2ac7f5b84d45be4ac5af3747a491f4b (diff)
downloadports-8978bbb9747c44ba8ddf8058ea3419c363e92bf2.tar.gz
ports-8978bbb9747c44ba8ddf8058ea3419c363e92bf2.zip
www/py-adblock: Prepare for py-maturin >= 0.13.0
* Since the 0.13.0 release maturin no longer searches for the Python interpreters by default and uses the current interpreter found in the PATH environment variable. Thus set BINARY_ALIAS to give a specific Python interpreter during build. * Fix build as well if building the port for multiple Python flavors by using FLAVOR_DEFAULT_ALL in poudriere and BUILD_ALL_PYTHON_FLAVORS in the make.conf. * Add CONFLICTS_INSTALL because a shared library is installed outside of Python's site-lib directory. * No bump of PORTREVISION as the package content isn't changed. PR: 266211 (related) Approved by: portmgr (blanket)
-rw-r--r--www/py-adblock/Makefile9
1 files changed, 7 insertions, 2 deletions
diff --git a/www/py-adblock/Makefile b/www/py-adblock/Makefile
index 41feb5e1a0ab..3004f7141aee 100644
--- a/www/py-adblock/Makefile
+++ b/www/py-adblock/Makefile
@@ -100,6 +100,11 @@ CARGO_BUILD= no
CARGO_INSTALL= no
CARGO_TARGET_DIR= ${WRKSRC}/target
+CONFLICTS_INSTALL= py3[0-9]-adblock py3[0-9][0-9]-adblock # lib/libadblock.so
+
+# Required since maturin >= 0.13.0
+BINARY_ALIAS= python3=${PYTHON_CMD}
+
.include <bsd.port.options.mk>
# This is to prevent Mk/Uses/python.mk do-configure target from firing.
@@ -108,7 +113,7 @@ do-configure:
do-build:
@(cd ${BUILD_WRKSRC} ; \
PSL_PATH="${PREFIX}/share/public_suffix_list/public_suffix_list.dat" \
- ${SETENV} ${MAKE_ENV} maturin build --release ${WITH_DEBUG:D:U--strip})
+ ${SETENV} ${MAKE_ENV} maturin-${PYTHON_VER} build --release ${WITH_DEBUG:D:U--strip})
# Due to upstream not supplying a setup.py file or other way to install
# using pip command for now...
@@ -120,7 +125,7 @@ do-install:
@(cd ${INSTALL_WRKSRC} ; \
${INSTALL_DATA} "target/release/libadblock.so" \
"${STAGEDIR}/${PREFIX}/lib" ; \
- ${SETENV} ${MAKE_ENV} pip install --isolated --root=${STAGEDIR} \
+ ${SETENV} ${MAKE_ENV} pip-${PYTHON_VER} install --isolated --root=${STAGEDIR} \
--ignore-installed --no-deps target/wheels/*.whl)
post-install: