git: 98f11926f60a - main - devel/pybind11-json: New port: Using nlohmann::json with pybind11

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Tue, 18 Oct 2022 02:29:36 UTC
The branch main has been updated by yuri:

URL: https://cgit.FreeBSD.org/ports/commit/?id=98f11926f60aebc5e357916486ab5d646daf43f1

commit 98f11926f60aebc5e357916486ab5d646daf43f1
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2022-10-18 02:28:55 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2022-10-18 02:29:33 +0000

    devel/pybind11-json: New port: Using nlohmann::json with pybind11
---
 devel/Makefile                |  1 +
 devel/pybind11-json/Makefile  | 39 +++++++++++++++++++++++++++++++++++++++
 devel/pybind11-json/distinfo  |  3 +++
 devel/pybind11-json/pkg-descr |  3 +++
 4 files changed, 46 insertions(+)

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 <bsd.port.mk>
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.