Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Sep 2024 06:19:53 GMT
From:      Po-Chuan Hsieh <sunpoet@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: ba4f0c871a3d - main - devel/pybind11_protobuf: Add make test
Message-ID:  <202409050619.4856Jrb1092493@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by sunpoet:

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

commit ba4f0c871a3d0b885b1995ffd2f565fb4e9acc01
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2024-09-05 05:24:53 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2024-09-05 06:17:45 +0000

    devel/pybind11_protobuf: Add make test
---
 devel/pybind11_protobuf/Makefile                           |  4 +++-
 .../files/patch-pybind11_protobuf-tests-CMakeLists.txt     | 14 ++++++++++++++
 2 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/devel/pybind11_protobuf/Makefile b/devel/pybind11_protobuf/Makefile
index 88cd22cc3eb7..ffb3f5236fde 100644
--- a/devel/pybind11_protobuf/Makefile
+++ b/devel/pybind11_protobuf/Makefile
@@ -13,8 +13,9 @@ BUILD_DEPENDS=	abseil>=20230125:devel/abseil \
 		pybind11>=2.11.1:devel/pybind11
 LIB_DEPENDS=	libabsl_base.so:devel/abseil \
 		libprotobuf.so:devel/protobuf
+TEST_DEPENDS=	${PYTHON_PKGNAMEPREFIX}absl-py>=0:devel/py-absl-py@${PY_FLAVOR}
 
-USES=		cmake compiler:c++17-lang python
+USES=		cmake:testing compiler:c++17-lang localbase python
 
 CFLAGS+=	-I${WRKSRC}
 CMAKE_ARGS=	-DCMAKE_INSTALL_PYDIR=${PYTHON_SITELIBDIR}
@@ -22,6 +23,7 @@ CMAKE_OFF=	BUILD_TESTING
 CMAKE_ON=	USE_SYSTEM_ABSEIL \
 		USE_SYSTEM_PROTOBUF \
 		USE_SYSTEM_PYBIND
+CMAKE_TESTING_ON=	BUILD_TESTING
 
 USE_GITHUB=	yes
 GH_ACCOUNT=	pybind
diff --git a/devel/pybind11_protobuf/files/patch-pybind11_protobuf-tests-CMakeLists.txt b/devel/pybind11_protobuf/files/patch-pybind11_protobuf-tests-CMakeLists.txt
new file mode 100644
index 000000000000..97096ac5e577
--- /dev/null
+++ b/devel/pybind11_protobuf/files/patch-pybind11_protobuf-tests-CMakeLists.txt
@@ -0,0 +1,14 @@
+--- pybind11_protobuf/tests/CMakeLists.txt.orig	2024-08-09 17:15:35 UTC
++++ pybind11_protobuf/tests/CMakeLists.txt
+@@ -2,10 +2,9 @@
+ # Evaluate if Protobuf uses the system package, otherwise explicitly include the
+ # required macro
+ #
+-FetchContent_GetProperties(Protobuf SOURCE_DIR Protobuf_SOURCE_DIR)
+ if(Protobuf_SOURCE_DIR)
+   # Use macros from content made available by FetchContent
+-  include(${Protobuf_SOURCE_DIR}/cmake/protobuf-generate.cmake)
++  include(${Protobuf_SOURCE_DIR}/lib/cmake/protobuf/protobuf-generate.cmake)
+ endif()
+ 
+ # cmake-format: off



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202409050619.4856Jrb1092493>