-
Notifications
You must be signed in to change notification settings - Fork 727
/
Makefile
42 lines (32 loc) · 1.21 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
PORTNAME= meson
PORTVERSION= 1.3.2
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
BUILD_DEPENDS= ${PY_SETUPTOOLS} \
${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR}
TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest-xdist>0:devel/py-pytest-xdist@${PY_FLAVOR}
USES= ninja:run python shebangfix
USE_PYTHON= autoplist pep517
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 <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.post.mk>