aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPo-Chuan Hsieh <sunpoet@FreeBSD.org>2024-08-15 16:00:06 +0000
committerPo-Chuan Hsieh <sunpoet@FreeBSD.org>2024-08-15 16:00:06 +0000
commit6b602644210a9e1e86634831a581e2ea30debb43 (patch)
tree8c43a0bedb3482498bfebaafa1ce8e3ff47d6630
parent84d765e54bab14fe94293c27d45aa6c5e38c284a (diff)
devel/pybind11_abseil: Add pybind11_abseil 202402.0
pybind11_abseil provides the pybind11 bindings for the Abseil C++ common libraries. These adapters make Abseil types work with Pybind11 bindings.
-rw-r--r--devel/Makefile1
-rw-r--r--devel/pybind11_abseil/Makefile21
-rw-r--r--devel/pybind11_abseil/distinfo3
-rw-r--r--devel/pybind11_abseil/files/patch-CMakeLists.txt33
-rw-r--r--devel/pybind11_abseil/pkg-descr2
-rw-r--r--devel/pybind11_abseil/pkg-plist4
6 files changed, 64 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile
index b13eb4a0ed05..5e7edde752aa 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -6094,6 +6094,7 @@
SUBDIR += py3c
SUBDIR += pybind11
SUBDIR += pybind11-json
+ SUBDIR += pybind11_abseil
SUBDIR += pybugz
SUBDIR += pycanberra
SUBDIR += pycdc
diff --git a/devel/pybind11_abseil/Makefile b/devel/pybind11_abseil/Makefile
new file mode 100644
index 000000000000..603900f7201b
--- /dev/null
+++ b/devel/pybind11_abseil/Makefile
@@ -0,0 +1,21 @@
+PORTNAME= pybind11_abseil
+PORTVERSION= 202402.0
+CATEGORIES= devel
+MASTER_SITES= https://github.com/pybind/pybind11_abseil/releases/download/v${PORTVERSION}/
+
+MAINTAINER= sunpoet@FreeBSD.org
+COMMENT= Pybind11 bindings for the Abseil C++ Common Libraries
+WWW= https://github.com/pybind/pybind11_abseil
+
+LICENSE= BSD3CLAUSE
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+BUILD_DEPENDS= abseil>=0:devel/abseil \
+ pybind11>=0:devel/pybind11
+LIB_DEPENDS= libabsl_base.so:devel/abseil
+
+USES= cmake compiler:c++17-lang python:build
+
+CMAKE_ARGS= -DCMAKE_INSTALL_PYDIR=${PYTHON_SITELIBDIR}
+
+.include <bsd.port.mk>
diff --git a/devel/pybind11_abseil/distinfo b/devel/pybind11_abseil/distinfo
new file mode 100644
index 000000000000..4b5ba65c14bf
--- /dev/null
+++ b/devel/pybind11_abseil/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1717568408
+SHA256 (pybind11_abseil-202402.0.tar.gz) = 1496b112e86416e2dcf288569a3e7b64f3537f0b18132224f492266e9ff76c44
+SIZE (pybind11_abseil-202402.0.tar.gz) = 59273
diff --git a/devel/pybind11_abseil/files/patch-CMakeLists.txt b/devel/pybind11_abseil/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..1d9d45531e23
--- /dev/null
+++ b/devel/pybind11_abseil/files/patch-CMakeLists.txt
@@ -0,0 +1,33 @@
+--- CMakeLists.txt.orig 2024-02-16 17:39:49 UTC
++++ CMakeLists.txt
+@@ -1,7 +1,6 @@ project(pybind11_abseil LANGUAGES CXX)
+ cmake_minimum_required(VERSION 3.11)
+ project(pybind11_abseil LANGUAGES CXX)
+
+-include(FetchContent)
+ include(CTest)
+
+ if(NOT DEFINED CMAKE_CXX_STANDARD)
+@@ -16,19 +15,10 @@ endif()
+ cmake_policy(SET CMP0135 NEW)
+ endif()
+
+-FetchContent_Declare(
+- abseil-cpp
+- URL https://github.com/abseil/abseil-cpp/archive/refs/tags/20230802.0.tar.gz
+- URL_HASH
+- SHA256=59d2976af9d6ecf001a81a35749a6e551a335b949d34918cfade07737b9d93c5)
++find_package(absl REQUIRED)
++find_package(pybind11 REQUIRED)
+
+-FetchContent_Declare(
+- pybind11
+- URL https://github.com/pybind/pybind11/archive/refs/heads/master.tar.gz)
+-
+-FetchContent_MakeAvailable(abseil-cpp pybind11)
+-
+ set(TOP_LEVEL_DIR ${CMAKE_CURRENT_LIST_DIR})
+-include_directories(${TOP_LEVEL_DIR} ${pybind11_INCLUDE_DIRS})
++include_directories(${TOP_LEVEL_DIR} ${abseil_INCLUDE_DIRS} ${pybind11_INCLUDE_DIRS})
+
+ add_subdirectory(pybind11_abseil)
diff --git a/devel/pybind11_abseil/pkg-descr b/devel/pybind11_abseil/pkg-descr
new file mode 100644
index 000000000000..722786faf5bc
--- /dev/null
+++ b/devel/pybind11_abseil/pkg-descr
@@ -0,0 +1,2 @@
+pybind11_abseil provides the pybind11 bindings for the Abseil C++ common
+libraries. These adapters make Abseil types work with Pybind11 bindings.
diff --git a/devel/pybind11_abseil/pkg-plist b/devel/pybind11_abseil/pkg-plist
new file mode 100644
index 000000000000..840e2b8c3e33
--- /dev/null
+++ b/devel/pybind11_abseil/pkg-plist
@@ -0,0 +1,4 @@
+lib/ok_status_singleton.so
+%%PYTHON_SITELIBDIR%%/pybind11_abseil/ok_status_singleton.so
+%%PYTHON_SITELIBDIR%%/pybind11_abseil/status.so
+lib/status.so