diff options
Diffstat (limited to 'meta-oe/recipes-connectivity')
-rw-r--r-- | meta-oe/recipes-connectivity/gattlib/files/dbus-avoid-strange-chars-from-the-build-dir.patch | 70 | ||||
-rw-r--r-- | meta-oe/recipes-connectivity/gattlib/gattlib_git.bb | 30 |
2 files changed, 100 insertions, 0 deletions
diff --git a/meta-oe/recipes-connectivity/gattlib/files/dbus-avoid-strange-chars-from-the-build-dir.patch b/meta-oe/recipes-connectivity/gattlib/files/dbus-avoid-strange-chars-from-the-build-dir.patch new file mode 100644 index 000000000..96e4f8d6f --- /dev/null +++ b/meta-oe/recipes-connectivity/gattlib/files/dbus-avoid-strange-chars-from-the-build-dir.patch | |||
@@ -0,0 +1,70 @@ | |||
1 | From 87df05c3f83c563af76ab00567e7a1ab7a6ebc88 Mon Sep 17 00:00:00 2001 | ||
2 | From: Peter Rosin <peda@axentia.se> | ||
3 | Date: Sat, 9 Nov 2019 15:42:03 +0100 | ||
4 | Subject: [PATCH] dbus: avoid 'strange' chars from the build dir in #defines | ||
5 | |||
6 | gdbus-codegen uses include guards with the full path dir, and if there | ||
7 | are "bad" characters, such as '+', this fails miserably. E.g. Yocto has a | ||
8 | tendency to build in directories named from the Yocto package version and | ||
9 | that package version containing a '+' are not uncommon, and even the | ||
10 | standard in certain scenarios such as when using ${SRCPV}. | ||
11 | |||
12 | Avoid the problem of the full path "leaking" into the source by avoiding | ||
13 | the normal include guards and request "#pragma once" instead. | ||
14 | |||
15 | Signed-off-by: Peter Rosin <peda@axentia.se> | ||
16 | --- | ||
17 | dbus/CMakeLists.txt | 12 ++++++------ | ||
18 | 1 file changed, 6 insertions(+), 6 deletions(-) | ||
19 | |||
20 | diff --git a/dbus/CMakeLists.txt b/dbus/CMakeLists.txt | ||
21 | index f5096ce10ecd..013c32239e12 100644 | ||
22 | --- a/dbus/CMakeLists.txt | ||
23 | +++ b/dbus/CMakeLists.txt | ||
24 | @@ -43,37 +43,37 @@ else() | ||
25 | endif() | ||
26 | |||
27 | add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/org-bluez-adaptater1.c | ||
28 | - COMMAND gdbus-codegen --interface-prefix org.bluez.Adapter1. --generate-c-code ${CMAKE_CURRENT_BINARY_DIR}/org-bluez-adaptater1 ${CMAKE_CURRENT_SOURCE_DIR}/${DBUS_BLUEZ_API}/org.bluez.Adapter1.xml | ||
29 | + COMMAND gdbus-codegen --pragma-once --interface-prefix org.bluez.Adapter1. --generate-c-code ${CMAKE_CURRENT_BINARY_DIR}/org-bluez-adaptater1 ${CMAKE_CURRENT_SOURCE_DIR}/${DBUS_BLUEZ_API}/org.bluez.Adapter1.xml | ||
30 | DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${DBUS_BLUEZ_API}/org.bluez.Adapter1.xml | ||
31 | COMMENT "Generate D-Bus 'org.bluez.Adapter1.xml'" | ||
32 | ) | ||
33 | |||
34 | add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/org-bluez-device1.c | ||
35 | - COMMAND gdbus-codegen --interface-prefix org.bluez.Device1. --generate-c-code ${CMAKE_CURRENT_BINARY_DIR}/org-bluez-device1 ${CMAKE_CURRENT_SOURCE_DIR}/${DBUS_BLUEZ_API}/org.bluez.Device1.xml | ||
36 | + COMMAND gdbus-codegen --pragma-once --interface-prefix org.bluez.Device1. --generate-c-code ${CMAKE_CURRENT_BINARY_DIR}/org-bluez-device1 ${CMAKE_CURRENT_SOURCE_DIR}/${DBUS_BLUEZ_API}/org.bluez.Device1.xml | ||
37 | DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${DBUS_BLUEZ_API}/org.bluez.Device1.xml | ||
38 | COMMENT "Generate D-Bus 'org.bluez.Device1.xml'" | ||
39 | ) | ||
40 | |||
41 | add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/org-bluez-gattservice1.c | ||
42 | - COMMAND gdbus-codegen --interface-prefix org.bluez.GattService1. --generate-c-code ${CMAKE_CURRENT_BINARY_DIR}/org-bluez-gattservice1 ${CMAKE_CURRENT_SOURCE_DIR}/${DBUS_BLUEZ_API}/org.bluez.GattService1.xml | ||
43 | + COMMAND gdbus-codegen --pragma-once --interface-prefix org.bluez.GattService1. --generate-c-code ${CMAKE_CURRENT_BINARY_DIR}/org-bluez-gattservice1 ${CMAKE_CURRENT_SOURCE_DIR}/${DBUS_BLUEZ_API}/org.bluez.GattService1.xml | ||
44 | DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${DBUS_BLUEZ_API}/org.bluez.GattService1.xml | ||
45 | COMMENT "Generate D-Bus 'org.bluez.GattService1.xml'" | ||
46 | ) | ||
47 | |||
48 | add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/org-bluez-gattcharacteristic1.c | ||
49 | - COMMAND gdbus-codegen --interface-prefix org.bluez.Characteristic1. --generate-c-code ${CMAKE_CURRENT_BINARY_DIR}/org-bluez-gattcharacteristic1 ${CMAKE_CURRENT_SOURCE_DIR}/${DBUS_BLUEZ_API}/org.bluez.GattCharacteristic1.xml | ||
50 | + COMMAND gdbus-codegen --pragma-once --interface-prefix org.bluez.Characteristic1. --generate-c-code ${CMAKE_CURRENT_BINARY_DIR}/org-bluez-gattcharacteristic1 ${CMAKE_CURRENT_SOURCE_DIR}/${DBUS_BLUEZ_API}/org.bluez.GattCharacteristic1.xml | ||
51 | DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${DBUS_BLUEZ_API}/org.bluez.GattCharacteristic1.xml | ||
52 | COMMENT "Generate D-Bus 'org.bluez.GattCharacteristic1.xml'" | ||
53 | ) | ||
54 | |||
55 | add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/org-bluez-gattdescriptor1.c | ||
56 | - COMMAND gdbus-codegen --interface-prefix org.bluez.Descriptor1. --generate-c-code ${CMAKE_CURRENT_BINARY_DIR}/org-bluez-gattdescriptor1 ${CMAKE_CURRENT_SOURCE_DIR}/${DBUS_BLUEZ_API}/org.bluez.GattDescriptor1.xml | ||
57 | + COMMAND gdbus-codegen --pragma-once --interface-prefix org.bluez.Descriptor1. --generate-c-code ${CMAKE_CURRENT_BINARY_DIR}/org-bluez-gattdescriptor1 ${CMAKE_CURRENT_SOURCE_DIR}/${DBUS_BLUEZ_API}/org.bluez.GattDescriptor1.xml | ||
58 | DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${DBUS_BLUEZ_API}/org.bluez.GattDescriptor1.xml | ||
59 | COMMENT "Generate D-Bus 'org.bluez.GattDescriptor1.xml'" | ||
60 | ) | ||
61 | |||
62 | add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/org-bluez-battery1.c | ||
63 | - COMMAND gdbus-codegen --interface-prefix org.bluez.Battery1. --generate-c-code ${CMAKE_CURRENT_BINARY_DIR}/org-bluez-battery1 ${CMAKE_CURRENT_SOURCE_DIR}/${DBUS_BLUEZ_API}/org.bluez.Battery1.xml | ||
64 | + COMMAND gdbus-codegen --pragma-once --interface-prefix org.bluez.Battery1. --generate-c-code ${CMAKE_CURRENT_BINARY_DIR}/org-bluez-battery1 ${CMAKE_CURRENT_SOURCE_DIR}/${DBUS_BLUEZ_API}/org.bluez.Battery1.xml | ||
65 | DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${DBUS_BLUEZ_API}/org.bluez.Battery1.xml | ||
66 | COMMENT "Generate D-Bus 'org.bluez.Battery1.xml'" | ||
67 | ) | ||
68 | -- | ||
69 | 2.11.0 | ||
70 | |||
diff --git a/meta-oe/recipes-connectivity/gattlib/gattlib_git.bb b/meta-oe/recipes-connectivity/gattlib/gattlib_git.bb new file mode 100644 index 000000000..0e6fce9c9 --- /dev/null +++ b/meta-oe/recipes-connectivity/gattlib/gattlib_git.bb | |||
@@ -0,0 +1,30 @@ | |||
1 | DESCRIPTION = "Bluetooth library with attribute support" | ||
2 | SECTION = "libs/network" | ||
3 | |||
4 | LICENSE = "GPLv2+" | ||
5 | LIC_FILES_CHKSUM = "file://CMakeLists.txt;beginline=1;endline=20;md5=8d5efeb9189b60866baff80ff791bf00" | ||
6 | |||
7 | DEPENDS = "bluez5 glib-2.0" | ||
8 | DEPENDS += "glib-2.0-native" | ||
9 | |||
10 | PV = "0.2+git${SRCPV}" | ||
11 | |||
12 | SRC_URI = "git://github.com/labapart/gattlib.git" | ||
13 | SRC_URI += "file://dbus-avoid-strange-chars-from-the-build-dir.patch" | ||
14 | |||
15 | SRCBRANCH = "master" | ||
16 | SRCREV = "c6a33252221dff904cf277e085e2ce70aced8788" | ||
17 | |||
18 | S = "${WORKDIR}/git" | ||
19 | |||
20 | PACKAGECONFIG[examples] = "-DGATTLIB_BUILD_EXAMPLES=ON,-DGATTLIB_BUILD_EXAMPLES=OFF" | ||
21 | |||
22 | # Set this to force use of DBus API if Bluez version is older than 5.42 | ||
23 | PACKAGECONFIG[force-dbus] = "-DGATTLIB_FORCE_DBUS=TRUE,-DGATTLIB_FORCE_DBUS=FALSE" | ||
24 | |||
25 | EXTRA_OECMAKE += "-DGATTLIB_BUILD_DOCS=OFF" | ||
26 | |||
27 | inherit pkgconfig cmake | ||
28 | |||
29 | FILES_${PN} = "${libdir}/* ${includedir}/*" | ||
30 | FILES_${PN}-dev = "${includedir}/*" | ||