diff options
| author | Yuri Victorovich <yuri@FreeBSD.org> | 2026-04-07 05:02:56 +0000 |
|---|---|---|
| committer | Yuri Victorovich <yuri@FreeBSD.org> | 2026-04-07 09:58:09 +0000 |
| commit | a9e1854d594b78a9f4574ec7a790ff9825d6a607 (patch) | |
| tree | cd8b6f8ba888be75224b3281e0fdc4109aa8ed0c | |
| parent | 6e895a45b8f8064c02d6e13551bfaae32a41b364 (diff) | |
devel/py-ninja: New port: Python package providing the Ninja build tool
| -rw-r--r-- | devel/Makefile | 1 | ||||
| -rw-r--r-- | devel/py-ninja/Makefile | 25 | ||||
| -rw-r--r-- | devel/py-ninja/distinfo | 3 | ||||
| -rw-r--r-- | devel/py-ninja/files/patch-CMakeLists.txt | 11 | ||||
| -rw-r--r-- | devel/py-ninja/files/patch-pyproject.toml | 13 | ||||
| -rw-r--r-- | devel/py-ninja/pkg-descr | 3 |
6 files changed, 56 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile index 029421b21cab..d97685a5c6db 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -5382,6 +5382,7 @@ SUBDIR += py-nbformat SUBDIR += py-nbval SUBDIR += py-nest-asyncio + SUBDIR += py-ninja SUBDIR += py-node-semver SUBDIR += py-nodeenv SUBDIR += py-nose diff --git a/devel/py-ninja/Makefile b/devel/py-ninja/Makefile new file mode 100644 index 000000000000..c029f6905269 --- /dev/null +++ b/devel/py-ninja/Makefile @@ -0,0 +1,25 @@ +PORTNAME= ninja +DISTVERSION= 1.13.0 +CATEGORIES= devel python +MASTER_SITES= PYPI +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= yuri@FreeBSD.org +COMMENT= Python package providing the Ninja build tool +WWW= https://github.com/scikit-build/ninja-python-distributions + +LICENSE= APACHE20 BSD2CLAUSE +LICENSE_COMB= dual +LICENSE_FILE= ${WRKSRC}/LICENSE_Apache_20 + +BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}scikit-build-core>=0.10:devel/py-scikit-build-core@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}hatch-fancy-pypi-readme>=22.3:devel/py-hatch-fancy-pypi-readme@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}setuptools-scm>0:devel/py-setuptools-scm@${PY_FLAVOR} +RUN_DEPENDS= ninja:devel/ninja + +USES= cmake:indirect python +USE_PYTHON= pep517 autoplist + +MAKE_ENV+= NINJA_PYTHON_DIST_ALLOW_NINJA_DEP=1 + +.include <bsd.port.mk> diff --git a/devel/py-ninja/distinfo b/devel/py-ninja/distinfo new file mode 100644 index 000000000000..d05fe6670ef5 --- /dev/null +++ b/devel/py-ninja/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1775500352 +SHA256 (ninja-1.13.0.tar.gz) = 4a40ce995ded54d9dc24f8ea37ff3bf62ad192b547f6c7126e7e25045e76f978 +SIZE (ninja-1.13.0.tar.gz) = 242558 diff --git a/devel/py-ninja/files/patch-CMakeLists.txt b/devel/py-ninja/files/patch-CMakeLists.txt new file mode 100644 index 000000000000..550a644742a9 --- /dev/null +++ b/devel/py-ninja/files/patch-CMakeLists.txt @@ -0,0 +1,11 @@ +--- CMakeLists.txt.orig 2026-04-06 13:19:14.054748000 UTC ++++ CMakeLists.txt 2026-04-06 13:19:14.097244000 UTC +@@ -33,5 +33,7 @@ + ) + endif() + +-install(TARGETS ninja COMPONENT python DESTINATION "${SKBUILD_SCRIPTS_DIR}") ++if(NOT DEFINED ENV{NINJA_PYTHON_DIST_ALLOW_NINJA_DEP}) ++ install(TARGETS ninja COMPONENT python DESTINATION "${SKBUILD_SCRIPTS_DIR}") ++endif() + install(FILES "${ninja_SOURCE_DIR}/misc/ninja_syntax.py" COMPONENT python DESTINATION ninja) diff --git a/devel/py-ninja/files/patch-pyproject.toml b/devel/py-ninja/files/patch-pyproject.toml new file mode 100644 index 000000000000..bec91cfeff06 --- /dev/null +++ b/devel/py-ninja/files/patch-pyproject.toml @@ -0,0 +1,13 @@ +--- pyproject.toml.orig 2026-04-06 13:12:36.737527000 UTC ++++ pyproject.toml 2026-04-06 13:13:02.176526000 UTC +@@ -84,6 +84,10 @@ + replacement = "" + + ++[tool.scikit-build.cmake.define] ++BUILD_TESTING = false ++RUN_NINJA_TEST = false ++ + [tool.cibuildwheel] + archs = ["auto64", "auto32"] + build = "cp39-*" diff --git a/devel/py-ninja/pkg-descr b/devel/py-ninja/pkg-descr new file mode 100644 index 000000000000..e500b6408583 --- /dev/null +++ b/devel/py-ninja/pkg-descr @@ -0,0 +1,3 @@ +This Python package provides access to the Ninja build system from Python. +It installs the ninja binary and the ninja_syntax module for programmatically +generating Ninja build files. |
