@@ -1104,7 +1104,7 @@ F: package/libnids/
F: package/libxcrypt/
F: package/liquid-dsp/
F: package/pixiewps/
-F: package/python-pybind/
+F: package/pybind11/
F: package/reaver/
N: Guo Ren <ren_guo@c-sky.com>
@@ -1132,7 +1132,6 @@ menu "External python modules"
source "package/python-pyalsa/Config.in"
source "package/python-pyasn1/Config.in"
source "package/python-pyasn1-modules/Config.in"
- source "package/python-pybind/Config.in"
source "package/python-pycairo/Config.in"
source "package/python-pycares/Config.in"
source "package/python-pycli/Config.in"
@@ -2005,6 +2004,7 @@ endif
source "package/protobuf/Config.in"
source "package/protobuf-c/Config.in"
source "package/protozero/Config.in"
+ source "package/pybind11/Config.in"
source "package/qhull/Config.in"
source "package/qlibc/Config.in"
source "package/riemann-c-client/Config.in"
new file mode 100644
@@ -0,0 +1,25 @@
+comment "pybind11 needs a toolchain w/ C++, wchar"
+ depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR
+
+config BR2_PACKAGE_PYBIND11
+ bool "pybind11"
+ depends on BR2_USE_WCHAR # boost
+ depends on BR2_INSTALL_LIBSTDCPP # boost
+ depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # boost-thread
+ select BR2_PACKAGE_BOOST
+ help
+ Pybind11 is a lightweight header-only library that exposes C++
+ types in Python and vice versa, mainly to create Python
+ bindings of existing C++ code.
+
+ http://pybind11.readthedocs.org/en/master
+
+if BR2_PACKAGE_PYBIND11
+
+config BR2_PACKAGE_PYBIND11_WITH_PYTHON
+ bool "pybind11-python"
+ depends on BR2_PACKAGE_PYTHON3
+ help
+ Activate support for python-pybind
+
+endif
new file mode 100644
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256 f1bcc07caa568eb312411dde5308b1e250bd0e1bc020fae855bf9f43209940cc pybind11-2.8.1.tar.gz
+sha256 83965b843b98f670d3a85bd041ed4b372c8ec50d7b4a5995a83ac697ba675dcb LICENSE
new file mode 100644
@@ -0,0 +1,42 @@
+################################################################################
+#
+# pybind11
+#
+################################################################################
+
+PYBIND11_VERSION = 2.8.1
+PYBIND11_SITE = $(call github,pybind,pybind11,v$(PYBIND11_VERSION))
+PYBIND11_LICENSE = BSD-3-Clause
+PYBIND11_LICENSE_FILES = LICENSE
+PYBIND11_INSTALL_STAGING = YES
+PYBIND11_SUPPORTS_IN_SOURCE_BUILD = YES
+
+HOST_PYBIND11_CONF_OPTS = \
+ -DBUILD_DOCS=OFF \
+ -DDOWNLOAD_EIGEN=OFF \
+ -DPYTHON=$(TARGET_DIR)/usr/bin/python \
+ -DPYTHON_PREFIX=$(STAGING_DIR)/usr
+
+# pybind11-python support activation
+# this requires the cmake build installed within $(@D)
+ifeq ($(BR2_PACKAGE_PYBIND11_WITH_PYTHON),y)
+
+HOST_PYBIND11_DEPENDENCIES += host-python3
+
+HOST_PYBIND11_CONF_OPTS += -DCMAKE_INSTALL_PREFIX=$(@D)/pybind11
+
+define PYBIND11_PYTHON_BUILD
+ cd $(@D) && $(HOST_DIR)/bin/python setup.py install
+endef
+
+HOST_PYBIND11_POST_INSTALL_HOOKS += PYBIND11_PYTHON_BUILD
+
+else
+
+HOST_PYBIND11_CONF_OPTS += \
+ -DPYBIND_FINDPYTHON=OFF \
+ -DPYBIND11_NOPYTHON=ON
+
+endif
+
+$(eval $(host-cmake-package))
deleted file mode 100644
@@ -1,8 +0,0 @@
-config BR2_PACKAGE_PYTHON_PYBIND
- bool "python-pybind"
- help
- PyBind is a lightweight header-only library that exposes C++
- types in Python and vice versa, mainly to create Python
- bindings of existing C++ code.
-
- http://pybind11.readthedocs.org/en/master
deleted file mode 100644
@@ -1,4 +0,0 @@
-# Locally calculated
-sha256 cdbe326d357f18b83d10322ba202d69f11b2f49e2d87ade0dc2be0c5c34f8e2a python-pybind-2.6.1.tar.gz
-# License files, locally calculated
-sha256 83965b843b98f670d3a85bd041ed4b372c8ec50d7b4a5995a83ac697ba675dcb LICENSE
deleted file mode 100644
@@ -1,13 +0,0 @@
-################################################################################
-#
-# python-pybind
-#
-################################################################################
-
-PYTHON_PYBIND_VERSION = 2.6.1
-PYTHON_PYBIND_SITE = $(call github,pybind,pybind11,v$(PYTHON_PYBIND_VERSION))
-PYTHON_PYBIND_LICENSE = BSD-3-Clause
-PYTHON_PYBIND_LICENSE_FILES = LICENSE
-PYTHON_PYBIND_SETUP_TYPE = setuptools
-
-$(eval $(python-package))