diff --git a/devel/Makefile b/devel/Makefile index 5d9709d789e8..7518ca0b7b97 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -5618,6 +5618,7 @@ SUBDIR += py-zope.traversing SUBDIR += py3c SUBDIR += pybind11 + SUBDIR += pybind11-json SUBDIR += pybugz SUBDIR += pycanberra SUBDIR += pycharm-ce diff --git a/devel/pybind11-json/Makefile b/devel/pybind11-json/Makefile new file mode 100644 index 000000000000..c0042be07e39 --- /dev/null +++ b/devel/pybind11-json/Makefile @@ -0,0 +1,39 @@ +PORTNAME= pybind11-json +DISTVERSION= 0.2.13 +CATEGORIES= devel python + +MAINTAINER= yuri@FreeBSD.org +COMMENT= Using nlohmann::json with pybind11 +WWW= https://github.com/pybind/pybind11_json + +LICENSE= BSD3CLAUSE +LICENSE_FILE= ${WRKSRC}/LICENSE + +BUILD_DEPENDS= pybind11>0:devel/pybind11 \ + nlohmann-json>0:devel/nlohmann-json +RUN_DEPENDS= pybind11>:devel/pybind11 \ + nlohmann-json>0:devel/nlohmann-json +TEST_DEPENDS= googletest>0:devel/googletest + +USES= cmake:testing compiler:c++11-lang python:build + +USE_GITHUB= yes +GH_ACCOUNT= pybind +GH_PROJECT= ${PORTNAME:S/-/_/} + +CMAKE_OFF= PYBIND11_TEST + +CMAKE_TESTING_ON= BUILD_TESTS +CMAKE_TESTING_TARGET= ${ALL_TARGET} + +NO_ARCH= yes + +PLIST_FILES= include/pybind11_json/pybind11_json.hpp \ + share/cmake/pybind11_json/pybind11_jsonConfig.cmake \ + share/cmake/pybind11_json/pybind11_jsonConfigVersion.cmake \ + share/cmake/pybind11_json/pybind11_jsonTargets.cmake + +post-test: # workaround for https://github.com/pybind/pybind11_json/issues/60 + @${BUILD_WRKSRC}/test/test_pybind11_json + +.include diff --git a/devel/pybind11-json/distinfo b/devel/pybind11-json/distinfo new file mode 100644 index 000000000000..d31d49741035 --- /dev/null +++ b/devel/pybind11-json/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1666059027 +SHA256 (pybind-pybind11_json-0.2.13_GH0.tar.gz) = 6b12ddb4930a3135322890318fc15c4a69134f21120ea82163827c11411107a3 +SIZE (pybind-pybind11_json-0.2.13_GH0.tar.gz) = 9512 diff --git a/devel/pybind11-json/pkg-descr b/devel/pybind11-json/pkg-descr new file mode 100644 index 000000000000..e6f01e051cbe --- /dev/null +++ b/devel/pybind11-json/pkg-descr @@ -0,0 +1,3 @@ +pybind11_json is an nlohmann::json to pybind11 bridge, it allows you to +automatically convert nlohmann::json to py::object and the other way around. +Simply include the header, and the automatic conversion will be enabled.