git: 316d64c81e7b - main - devel/meson-python: add

From: Charlie Li <vishwin_at_FreeBSD.org>
Date: Thu, 09 Mar 2023 04:49:18 UTC
The branch main has been updated by vishwin:

URL: https://cgit.FreeBSD.org/ports/commit/?id=316d64c81e7b25c4dbda295a70a516bceb22c2f5

commit 316d64c81e7b25c4dbda295a70a516bceb22c2f5
Author:     Charlie Li <vishwin@FreeBSD.org>
AuthorDate: 2023-03-09 04:48:14 +0000
Commit:     Charlie Li <vishwin@FreeBSD.org>
CommitDate: 2023-03-09 04:48:14 +0000

    devel/meson-python: add
    
    PEP-517 build backend that uses Meson
---
 devel/Makefile               |  1 +
 devel/meson-python/Makefile  | 36 ++++++++++++++++++++++++++++++++++++
 devel/meson-python/distinfo  |  3 +++
 devel/meson-python/pkg-descr |  4 ++++
 4 files changed, 44 insertions(+)

diff --git a/devel/Makefile b/devel/Makefile
index a19460ba0c0f..3f40131175c1 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -1566,6 +1566,7 @@
     SUBDIR += mercurial
     SUBDIR += mergify
     SUBDIR += meson
+    SUBDIR += meson-python
     SUBDIR += microsoft-gsl
     SUBDIR += mill
     SUBDIR += mimalloc
diff --git a/devel/meson-python/Makefile b/devel/meson-python/Makefile
new file mode 100644
index 000000000000..283d6ce78041
--- /dev/null
+++ b/devel/meson-python/Makefile
@@ -0,0 +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 \
+		${PYTHON_PKGNAMEPREFIX}pyproject-metadata>=0.6.1:devel/py-pyproject-metadata@${PY_FLAVOR}
+RUN_DEPENDS=	meson>=0.63.3:devel/meson \
+		${PYTHON_PKGNAMEPREFIX}pyproject-metadata>=0.6.1:devel/py-pyproject-metadata@${PY_FLAVOR}
+
+USES=		python
+USE_PYTHON=	autoplist concurrent pep517
+
+NO_ARCH=	yes
+
+.include <bsd.port.pre.mk>
+
+.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 <bsd.port.post.mk>
diff --git a/devel/meson-python/distinfo b/devel/meson-python/distinfo
new file mode 100644
index 000000000000..8acce15fdbdc
--- /dev/null
+++ b/devel/meson-python/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1678312697
+SHA256 (meson_python-0.12.1.tar.gz) = 3d5b3e581d70a58a97b9c116a75e97a76cc4b4c7e75fa0658fc8392371e2f2c2
+SIZE (meson_python-0.12.1.tar.gz) = 44039
diff --git a/devel/meson-python/pkg-descr b/devel/meson-python/pkg-descr
new file mode 100644
index 000000000000..e82e5e6d96e3
--- /dev/null
+++ b/devel/meson-python/pkg-descr
@@ -0,0 +1,4 @@
+Python build backend (PEP-517) for Meson projects.
+
+It enables Python package authors to use Meson as the build backend
+for their packages.