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 @@ -1,74 +1,74 @@ # Provide support for Meson based projects # # Feature: meson # Usage: USES=meson # # The following files are bundled in source tar files. # meson.build - Instructions for meson like autoconf configure, # there is no changeable parts in the file. # meson_options.txt - All the options meson understands # # Variables for ports: # MESON_ARGS - Arguments passed to meson # format: -Denable_foo=true # MESON_BUILD_DIR - Path to the build directory relative to ${WRKSRC} # Default: _build # # MAINTAINER: gnome@FreeBSD.org .if !defined(_INCLUDE_USES_MESON_MK) _INCLUDE_USES_MESON_MK= yes # Sanity check . if !empty(meson_ARGS) 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" # meson might have issues with non-unicode locales USE_LOCALE?= en_US.UTF-8 CONFIGURE_ARGS+= --prefix ${PREFIX} \ --mandir man \ --infodir ${INFO_PATH} # Disable color output. Meson forces it on by default, Ninja # strips it before it goes to the log, but Samurai does not, so we # might end up with ANSI escape sequences in the logs. CONFIGURE_ARGS+= -Db_colorout=never # meson has it own strip mechanic INSTALL_TARGET= install # should we have strip separate from WITH_DEBUG? . if defined(WITH_DEBUG) CONFIGURE_ARGS+= --buildtype debug . else CONFIGURE_ARGS+= --buildtype release \ --strip . endif HAS_CONFIGURE= yes CONFIGURE_CMD= meson # Pull in manual set settings and from options CONFIGURE_ARGS+= ${MESON_ARGS} BUILD_WRKSRC= ${WRKSRC}/${MESON_BUILD_DIR} INSTALL_WRKSRC= ${WRKSRC}/${MESON_BUILD_DIR} TEST_WRKSRC= ${WRKSRC}/${MESON_BUILD_DIR} TEST_TARGET= test MESON_BUILD_DIR?= _build CONFIGURE_LOG= ${MESON_BUILD_DIR}/meson-logs/meson-log.txt # Add meson build dir at the end. CONFIGURE_ARGS+= ${MESON_BUILD_DIR} .endif #!defined(_INCLUDE_USES_MESON_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 @@ -1,36 +1,36 @@ PORTNAME= meson-python DISTVERSION= 0.12.1 CATEGORIES= devel python MASTER_SITES= PYPI PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} DISTNAME= meson_python-${DISTVERSION} MAINTAINER= vishwin@FreeBSD.org COMMENT= Meson Python build backend (PEP-517) 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 USE_PYTHON= autoplist concurrent pep517 NO_ARCH= yes .include .if ${PYTHON_REL} < 31100 BUILD_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}tomli>=1.0.0:textproc/py-tomli@${PY_FLAVOR} RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}tomli>=1.0.0:textproc/py-tomli@${PY_FLAVOR} .endif .if ${PYTHON_REL} < 31000 BUILD_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}typing-extensions>=3.7.4:devel/py-typing-extensions@${PY_FLAVOR} RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}typing-extensions>=3.7.4:devel/py-typing-extensions@${PY_FLAVOR} .endif .include diff --git a/devel/meson/Makefile b/devel/meson/Makefile index 00d2889f4baf..83793c5990b8 100644 --- a/devel/meson/Makefile +++ b/devel/meson/Makefile @@ -1,34 +1,40 @@ PORTNAME= meson PORTVERSION= 1.0.1 CATEGORIES= devel python MASTER_SITES= https://github.com/mesonbuild/${PORTNAME}/releases/download/${PORTVERSION}/ MAINTAINER= desktop@FreeBSD.org COMMENT= High performance build system WWW= https://mesonbuild.com/ LICENSE= APACHE20 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 # https://github.com/mesonbuild/meson/issues/6016 TEST_ENV= ${MAKE_ENV:NCC=*:NCXX=*} # Hide from regular build to avoid accidental dependency on symlinks .if make(test) # helper_create_binary_wrapper, test_python_module, test cases/*.py BINARY_ALIAS+= python3=${PYTHON_CMD:T} python=${PYTHON_CMD:T} do-test: create-binary-alias # force if run late .endif +.include + +.if ${PYTHON_VER} != ${PYTHON_DEFAULT} +PKGNAMESUFFIX= ${PYTHON_PKGNAMESUFFIX} +.endif + do-test: @(cd ${TEST_WRKSRC} && ${SETENV} ${TEST_ENV} ${PYTHON_CMD} ${WRKSRC}/run_unittests.py) -.include +.include