Skip to contentSkip to conversation

bluez5_utils-headers: new package

PATCH New Grzegorz Blach 2 participants 3 messages Sep 5, 2018 – Sep 10, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 bluez5_utils-headers: new package

Header files from bluez utils version 5.x.

Separated headers are required to break circular dependencies when python3 is build with bluetooth support.

---
 DEVELOPERS                                    |  1 +
 package/Config.in                             |  1 +
 package/bluez5_utils-headers/Config.in        |  7 +++++++
 .../bluez5_utils_headers.hash                 |  4 ++++
 .../bluez5_utils_headers.mk                   | 21 +++++++++++++++++++
 5 files changed, 34 insertions(+)
 create mode 100644 package/bluez5_utils-headers/Config.in
 create mode 100644 package/bluez5_utils-headers/bluez5_utils_headers.hash
 create mode 100644 package/bluez5_utils-headers/bluez5_utils_headers.mk
DEVELOPERS +1 -0
index bd8095bd20..8ea433e930 100644
@@ -877,6 +877,7 @@ F:	package/libwebsock/
 F:	package/sofia-sip/
 
 N:	Grzegorz Blach <[email protected]>
+F:	package/bluez5_utils-headers/
 F:	package/python-falcon/
 F:	package/python-mimeparse/
 
package/Config.in +1 -0
index 66f303ec58..a1b9300f8b 100644
@@ -1427,6 +1427,7 @@ menu "Networking"
 	source "package/azmq/Config.in"
 	source "package/azure-iot-sdk-c/Config.in"
 	source "package/batman-adv/Config.in"
+	source "package/bluez5_utils-headers/Config.in"
 	source "package/c-ares/Config.in"
 	source "package/canfestival/Config.in"
 	source "package/cgic/Config.in"
package/bluez5_utils-headers/Config.in new file +7 -0
new file mode 100644
index 0000000000..7ae42af930
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_BLUEZ5_UTILS_HEADERS
+	bool "bluez5_utils-headers 5.x"
+	help
+	  Header files from bluez utils version 5.x
+
+	  http://www.bluez.org
+	  http://www.kernel.org/pub/linux/bluetooth
package/bluez5_utils-headers/bluez5_utils_headers.hash new file +4 -0
new file mode 100644
index 0000000000..b965708559
@@ -0,0 +1,4 @@
+# From https://www.kernel.org/pub/linux/bluetooth/sha256sums.asc:
+sha256  5ffcaae18bbb6155f1591be8c24898dc12f062075a40b538b745bfd477481911  bluez-5.50.tar.xz
+sha256  b499eddebda05a8859e32b820a64577d91f1de2b52efa2a1575a2cb4000bc259  COPYING
+sha256  ec60b993835e2c6b79e6d9226345f4e614e686eb57dc13b6420c15a33a8996e5  COPYING.LIB
package/bluez5_utils-headers/bluez5_utils_headers.mk new file +21 -0
new file mode 100644
index 0000000000..9bc463432c
@@ -0,0 +1,21 @@
+################################################################################
+#
+# bluez5_utils-headers
+#
+################################################################################
+
+BLUEZ5_UTILS_HEADERS_VERSION = 5.50
+BLUEZ5_UTILS_HEADERS_SOURCE = bluez-$(BLUEZ5_UTILS_VERSION).tar.xz
+BLUEZ5_UTILS_HEADERS_SITE = $(BR2_KERNEL_MIRROR)/linux/bluetooth
+BLUEZ5_UTILS_HEADERS_LICENSE = GPL-2.0+, LGPL-2.1+
+BLUEZ5_UTILS_HEADERS_LICENSE_FILES = COPYING COPYING.LIB
+
+BLUEZ5_UTILS_HEADERS_INSTALL_STAGING = YES
+BLUEZ5_UTILS_HEADERS_INSTALL_TARGET = NO
+
+define BLUEZ5_UTILS_HEADERS_INSTALL_STAGING_CMDS
+	$(INSTALL) -d $(STAGING_DIR)/usr/include/bluetooth/
+	$(INSTALL) -m 644 $(@D)/lib/*.h $(STAGING_DIR)/usr/include/bluetooth/
+endef
+
+$(eval $(generic-package))
Signature · 1 line
2.17.1
#1 lore raw

PATCH 2/2 python3: add optional dependency on bluez5_utils-headers

When python3 depends on bluez5_utils-headers,
python3 is build with bluetooth support.

---
 package/python3/python3.mk | 5 +++++
 1 file changed, 5 insertions(+)
package/python3/python3.mk +5 -0
index 5e94e8e726..913e0773ca 100644
@@ -255,6 +255,11 @@ endif
 # Provided to other packages
 PYTHON3_PATH = $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/
 
+# Support for socket.AF_BLUETOOTH
+ifeq ($(BR2_PACKAGE_BLUEZ5_UTILS_HEADERS),y)
+	PYTHON3_DEPENDENCIES += bluez5_utils-headers
+endif
+
 $(eval $(autotools-package))
 $(eval $(host-autotools-package))
 
Signature · 1 line
2.17.1
#2 lore raw

PATCH 1/2 bluez5_utils-headers: new package

In reply to Grzegorz Blach

Grzegorz, All,

On 2018-09-05 13:39 +0200, Grzegorz Blach spake thusly:

Quoted 7 lines

Header files from bluez utils version 5.x.

Separated headers are required to break circular dependencies when python3 is build with bluetooth support.

---

[--SNIP--]

Quoted 16 lines
package/bluez5_utils-headers/bluez5_utils_headers.hash new file +4 -0
new file mode 100644
index 0000000000..b965708559
@@ -0,0 +1,4 @@
+# From https://www.kernel.org/pub/linux/bluetooth/sha256sums.asc:
+sha256  5ffcaae18bbb6155f1591be8c24898dc12f062075a40b538b745bfd477481911  bluez-5.50.tar.xz
+sha256  b499eddebda05a8859e32b820a64577d91f1de2b52efa2a1575a2cb4000bc259  COPYING
+sha256  ec60b993835e2c6b79e6d9226345f4e614e686eb57dc13b6420c15a33a8996e5  COPYING.LIB
package/bluez5_utils-headers/bluez5_utils_headers.mk new file +0 -0
new file mode 100644
index 0000000000..9bc463432c

package/bluez5_utils-headers/bluez5_utils_headers.mk line 8

Quoted 8 lines
package/bluez5_utils-headers/bluez5_utils_headers.mk new file +8 -0
@@ -0,0 +1,21 @@
+################################################################################
+#
+# bluez5_utils-headers
+#
+################################################################################
+
+BLUEZ5_UTILS_HEADERS_VERSION = 5.50
+BLUEZ5_UTILS_HEADERS_SOURCE = bluez-$(BLUEZ5_UTILS_VERSION).tar.xz

Since we are using the same source tarball as for bluez5_utils, we want to download it and store it only once:

BLUEZ5_UTILS_HEADERS_DL_SUBDIR = bluez5_utils

Consequently, the hash file should be a symlink to the one from bluez5_utils.

See for example mesa3d and mesa3d-headers for an example.

Regards,
Yann E. MORIN.

Quoted 20 lines
package/bluez5_utils-headers/bluez5_utils_headers.mk new file +13 -0
+BLUEZ5_UTILS_HEADERS_SITE = $(BR2_KERNEL_MIRROR)/linux/bluetooth
+BLUEZ5_UTILS_HEADERS_LICENSE = GPL-2.0+, LGPL-2.1+
+BLUEZ5_UTILS_HEADERS_LICENSE_FILES = COPYING COPYING.LIB
+
+BLUEZ5_UTILS_HEADERS_INSTALL_STAGING = YES
+BLUEZ5_UTILS_HEADERS_INSTALL_TARGET = NO
+
+define BLUEZ5_UTILS_HEADERS_INSTALL_STAGING_CMDS
+	$(INSTALL) -d $(STAGING_DIR)/usr/include/bluetooth/
+	$(INSTALL) -m 644 $(@D)/lib/*.h $(STAGING_DIR)/usr/include/bluetooth/
+endef
+
+$(eval $(generic-package))
Signature · 6 lines
2.17.1

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'