aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharlie Li <vishwin@FreeBSD.org>2023-03-09 19:45:19 +0000
committerCharlie Li <vishwin@FreeBSD.org>2023-03-11 16:35:57 +0000
commitb883eac8e32d2187ad18a7247699f77084cf0f06 (patch)
tree57cd25f538c82135adb71b7111027390408463eb
parent6153d1b8399a73b5bff782a334b7e382ae0a3ecc (diff)
downloadports-b883eac8e32d2187ad18a7247699f77084cf0f06.tar.gz
ports-b883eac8e32d2187ad18a7247699f77084cf0f06.zip
devel/meson: enable FLAVORs
Needed for devel/meson-python to function on non-default Python flavours/distributions, as meson is imported as a module. Existing USES=meson consumers not affected. Reported by: fluffy Differential Revision: https://reviews.freebsd.org/D39004
-rw-r--r--Mk/Uses/meson.mk2
-rw-r--r--devel/meson-python/Makefile4
-rw-r--r--devel/meson/Makefile10
3 files changed, 11 insertions, 5 deletions
diff --git a/Mk/Uses/meson.mk b/Mk/Uses/meson.mk
index 4411bb5b9f7b..9affd4b9ed4e 100644
--- a/Mk/Uses/meson.mk
+++ b/Mk/Uses/meson.mk
@@ -24,7 +24,7 @@ _INCLUDE_USES_MESON_MK= yes
IGNORE= Incorrect 'USES+= meson:${meson_ARGS}'. meson takes no arguments
. endif
-BUILD_DEPENDS+= meson>=0.57.1_1:devel/meson
+BUILD_DEPENDS+= meson:devel/meson
# meson uses ninja
.include "${USESDIR}/ninja.mk"
diff --git a/devel/meson-python/Makefile b/devel/meson-python/Makefile
index 283d6ce78041..144ee459712a 100644
--- a/devel/meson-python/Makefile
+++ b/devel/meson-python/Makefile
@@ -12,9 +12,9 @@ WWW= https://github.com/mesonbuild/meson-python
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE
-BUILD_DEPENDS= meson>=0.63.3:devel/meson \
+BUILD_DEPENDS= meson:devel/meson@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pyproject-metadata>=0.6.1:devel/py-pyproject-metadata@${PY_FLAVOR}
-RUN_DEPENDS= meson>=0.63.3:devel/meson \
+RUN_DEPENDS= meson:devel/meson@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pyproject-metadata>=0.6.1:devel/py-pyproject-metadata@${PY_FLAVOR}
USES= python
diff --git a/devel/meson/Makefile b/devel/meson/Makefile
index 00d2889f4baf..83793c5990b8 100644
--- a/devel/meson/Makefile
+++ b/devel/meson/Makefile
@@ -13,7 +13,7 @@ LICENSE_FILE= ${WRKSRC}/COPYING
TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest-xdist>0:devel/py-pytest-xdist@${PY_FLAVOR}
USES= ninja:run python:3.6+ shebangfix
-USE_PYTHON= autoplist distutils noflavors
+USE_PYTHON= autoplist distutils
SHEBANG_FILES= mesonbuild/rewriter.py \
mesonbuild/scripts/cmake_run_ctgt.py
NO_ARCH= yes
@@ -28,7 +28,13 @@ BINARY_ALIAS+= python3=${PYTHON_CMD:T} python=${PYTHON_CMD:T}
do-test: create-binary-alias # force if run late
.endif
+.include <bsd.port.pre.mk>
+
+.if ${PYTHON_VER} != ${PYTHON_DEFAULT}
+PKGNAMESUFFIX= ${PYTHON_PKGNAMESUFFIX}
+.endif
+
do-test:
@(cd ${TEST_WRKSRC} && ${SETENV} ${TEST_ENV} ${PYTHON_CMD} ${WRKSRC}/run_unittests.py)
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>