[1/2] bluez5_utils-headers: new package

Message ID 20180913115656.11794-1-grzegorz@blach.pl
State Superseded
Headers show
Series
  • [1/2] bluez5_utils-headers: new package
Related show

Commit Message

Grzegorz Blach Sept. 13, 2018, 11:56 a.m.
Header files from bluez utils version 5.x.

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

Signed-off-by: Grzegorz Blach <grzegorz@blach.pl>
---
 DEVELOPERS                                    |  1 +
 package/Config.in                             |  1 +
 package/bluez5_utils-headers/Config.in        |  7 ++++++
 .../bluez5_utils_headers.hash                 |  1 +
 .../bluez5_utils_headers.mk                   | 22 +++++++++++++++++++
 5 files changed, 32 insertions(+)
 create mode 100644 package/bluez5_utils-headers/Config.in
 create mode 120000 package/bluez5_utils-headers/bluez5_utils_headers.hash
 create mode 100644 package/bluez5_utils-headers/bluez5_utils_headers.mk

Comments

Thomas Petazzoni Sept. 14, 2018, 10:05 p.m. | #1
Hello,

On Thu, 13 Sep 2018 13:56:55 +0200, Grzegorz Blach wrote:
> Header files from bluez utils version 5.x.
> 
> Separated headers are required to break circular dependencies
> when python3 is build with bluetooth support.
> 
> Signed-off-by: Grzegorz Blach <grzegorz@blach.pl>

What are the changes compared to the previous iteration ?

It is customary to:

 - Add a patch title prefix which differs for each version. You can do
   this using 'git format-patch -v2' or 'git format-patch
   --prefix="PATCH v2"'

 - Add a changelog of what changed between each version, either in the
   cover letter (you can generate a template cover letter using git
   format-patch --cover) or in each patch, below the "---" sign.

Thomas
Grzegorz Blach Sept. 17, 2018, 12:14 p.m. | #2
On 9/15/18 12:05 AM, Thomas Petazzoni wrote:
> Hello,
> 
> On Thu, 13 Sep 2018 13:56:55 +0200, Grzegorz Blach wrote:
>> Header files from bluez utils version 5.x.
>>
>> Separated headers are required to break circular dependencies
>> when python3 is build with bluetooth support.
>>
>> Signed-off-by: Grzegorz Blach <grzegorz@blach.pl>
> 
> What are the changes compared to the previous iteration ?

- bluez5_utils-headers/bluez5_utils_headers.hash now is a symlink to 
bluez5_utils/bluez5_utils.hash. Previously it was a copy of this file.

- In bluez5_utils_headers.mk I added 'BLUEZ5_UTILS_HEADERS_DL_SUBDIR = 
bluez5_utils', because package bluez5_utils-headers and bluez5_utils 
downloads exactly the same file.

> It is customary to:
> 
>   - Add a patch title prefix which differs for each version. You can do
>     this using 'git format-patch -v2' or 'git format-patch
>     --prefix="PATCH v2"'
> 
>   - Add a changelog of what changed between each version, either in the
>     cover letter (you can generate a template cover letter using git
>     format-patch --cover) or in each patch, below the "---" sign.

Ok, I'll do that with future patches

> Thomas
>
Arnout Vandecappelle Oct. 21, 2018, 3:44 p.m. | #3
Hi Gregorz,

On 17/09/2018 13:14, Grzegorz Blach wrote:
> On 9/15/18 12:05 AM, Thomas Petazzoni wrote:
>> Hello,
>>
>> On Thu, 13 Sep 2018 13:56:55 +0200, Grzegorz Blach wrote:
>>> Header files from bluez utils version 5.x.
>>>
>>> Separated headers are required to break circular dependencies
>>> when python3 is build with bluetooth support.
>>>
>>> Signed-off-by: Grzegorz Blach <grzegorz@blach.pl>
>>
>> What are the changes compared to the previous iteration ?
> 
> - bluez5_utils-headers/bluez5_utils_headers.hash now is a symlink to
> bluez5_utils/bluez5_utils.hash. Previously it was a copy of this file.
> 
> - In bluez5_utils_headers.mk I added 'BLUEZ5_UTILS_HEADERS_DL_SUBDIR =
> bluez5_utils', because package bluez5_utils-headers and bluez5_utils downloads
> exactly the same file.

 I've reworked both patches a little more and applied to master, thanks.

 The changes are:

- made bluez5_utils-headers a blind option (cfr. mesa3d-headers);
- let python3 select bluez5_utils-headers if bluez5_utils is enabled;
- correct the name of the .mk and .hash files (- instead of _);
- don't indent inside a make condition;
- add a comment in both bluez5_utils and bluez5_utils-headers that the versions
should be kept in sync.


 Regards,
 Arnout

Patch

diff --git a/DEVELOPERS b/DEVELOPERS
index e4f30e1981..8a3e934763 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -893,6 +893,7 @@  F:	package/libwebsock/
 F:	package/sofia-sip/
 
 N:	Grzegorz Blach <grzegorz@blach.pl>
+F:	package/bluez5_utils-headers/
 F:	package/python-falcon/
 F:	package/python-mimeparse/
 
diff --git a/package/Config.in b/package/Config.in
index 2810d0497f..5a62cfa03d 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1438,6 +1438,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"
diff --git a/package/bluez5_utils-headers/Config.in b/package/bluez5_utils-headers/Config.in
new file mode 100644
index 0000000000..7ae42af930
--- /dev/null
+++ b/package/bluez5_utils-headers/Config.in
@@ -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
diff --git a/package/bluez5_utils-headers/bluez5_utils_headers.hash b/package/bluez5_utils-headers/bluez5_utils_headers.hash
new file mode 120000
index 0000000000..1f489458fe
--- /dev/null
+++ b/package/bluez5_utils-headers/bluez5_utils_headers.hash
@@ -0,0 +1 @@ 
+../bluez5_utils/bluez5_utils.hash
\ No newline at end of file
diff --git a/package/bluez5_utils-headers/bluez5_utils_headers.mk b/package/bluez5_utils-headers/bluez5_utils_headers.mk
new file mode 100644
index 0000000000..dbab848930
--- /dev/null
+++ b/package/bluez5_utils-headers/bluez5_utils_headers.mk
@@ -0,0 +1,22 @@ 
+################################################################################
+#
+# 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_DL_SUBDIR = bluez5_utils
+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))