summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndré Draszik <adraszik@tycoint.com>2016-11-25 15:18:02 +0000
committerMartin Jansa <Martin.Jansa@gmail.com>2016-12-02 09:23:44 +0100
commit119e75e48dbf0539b4e440417901458ffff79b38 (patch)
tree6c91f760954965e79f860474dd4183025fa51528
parent45837e6c567b1b9ff9d152a7e2a752488d313455 (diff)
downloadmeta-openembedded-119e75e48dbf0539b4e440417901458ffff79b38.tar.gz
libdbus-c++: missing DEPENDS, fix musl build, oe-stylize.py
- libdbus-c++ also depends on expat - use PACKAGE_BEFORE_PN to simplify FILES - run through oe-stylize.py - compiling against the musl C library showed various problems, which have been fixed with the patches attached Signed-off-by: André Draszik <adraszik@tycoint.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-rw-r--r--meta-oe/recipes-core/dbus/libdbus-c++-0.9.0/0001-src-eventloop.cpp-use-portable-method-for-initializi.patch36
-rw-r--r--meta-oe/recipes-core/dbus/libdbus-c++-0.9.0/0002-tools-generate_proxy.cpp-avoid-possibly-undefined-ui.patch58
-rw-r--r--meta-oe/recipes-core/dbus/libdbus-c++-0.9.0/0003-Fixed-undefined-ssize_t-for-clang-3.8.0-on-FreeBSD.patch30
-rw-r--r--meta-oe/recipes-core/dbus/libdbus-c++-0.9.0/0004-use-POSIX-poll.h-instead-of-sys-poll.h.patch77
-rw-r--r--meta-oe/recipes-core/dbus/libdbus-c++_0.9.0.bb21
5 files changed, 214 insertions, 8 deletions
diff --git a/meta-oe/recipes-core/dbus/libdbus-c++-0.9.0/0001-src-eventloop.cpp-use-portable-method-for-initializi.patch b/meta-oe/recipes-core/dbus/libdbus-c++-0.9.0/0001-src-eventloop.cpp-use-portable-method-for-initializi.patch
new file mode 100644
index 000000000..eed84e4a6
--- /dev/null
+++ b/meta-oe/recipes-core/dbus/libdbus-c++-0.9.0/0001-src-eventloop.cpp-use-portable-method-for-initializi.patch
@@ -0,0 +1,36 @@
1From 93fd4868d71aa7a26cdfd382d1e4c85112f069f9 Mon Sep 17 00:00:00 2001
2From: Peter Williams <peter@newton.cx>
3Date: Sat, 19 Dec 2015 21:07:37 -0500
4Subject: [PATCH] src/eventloop.cpp: use portable method for initializing
5 recursive mutex
6MIME-Version: 1.0
7Content-Type: text/plain; charset=UTF-8
8Content-Transfer-Encoding: 8bit
9
10---
11Upstream-Status: Backport [https://github.com/andreas-volz/dbus-cplusplus/commit/cdaeaa825db191bd65aad3aaaeb3178738727f05]
12Signed-off-by: André Draszik <adraszik@tycoint.com>
13 src/eventloop.cpp | 7 +++++--
14 1 file changed, 5 insertions(+), 2 deletions(-)
15
16diff --git a/src/eventloop.cpp b/src/eventloop.cpp
17index 7fb06a3..f622812 100644
18--- a/src/eventloop.cpp
19+++ b/src/eventloop.cpp
20@@ -85,8 +85,11 @@ DefaultMutex::DefaultMutex(bool recursive)
21 {
22 if (recursive)
23 {
24- pthread_mutex_t recmutex = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
25- _mutex = recmutex;
26+ pthread_mutexattr_t attr;
27+
28+ pthread_mutexattr_init(&attr);
29+ pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
30+ pthread_mutex_init(&_mutex, &attr);
31 }
32 else
33 {
34--
352.10.2
36
diff --git a/meta-oe/recipes-core/dbus/libdbus-c++-0.9.0/0002-tools-generate_proxy.cpp-avoid-possibly-undefined-ui.patch b/meta-oe/recipes-core/dbus/libdbus-c++-0.9.0/0002-tools-generate_proxy.cpp-avoid-possibly-undefined-ui.patch
new file mode 100644
index 000000000..65cd93976
--- /dev/null
+++ b/meta-oe/recipes-core/dbus/libdbus-c++-0.9.0/0002-tools-generate_proxy.cpp-avoid-possibly-undefined-ui.patch
@@ -0,0 +1,58 @@
1From c673a76857cbe0ca82fa11aea9b70f94c3e5b041 Mon Sep 17 00:00:00 2001
2From: Peter Williams <peter@newton.cx>
3Date: Sat, 19 Dec 2015 21:08:46 -0500
4Subject: [PATCH] tools/generate_proxy.cpp: avoid possibly undefined 'uint'
5 type
6MIME-Version: 1.0
7Content-Type: text/plain; charset=UTF-8
8Content-Transfer-Encoding: 8bit
9
10---
11Upstream-Status: Backport [https://github.com/andreas-volz/dbus-cplusplus/commit/43f119a2b3fe951c0f1d88cc61170d4c81a88880]
12Signed-off-by: André Draszik <adraszik@tycoint.com>
13 tools/generate_proxy.cpp | 8 ++++----
14 1 file changed, 4 insertions(+), 4 deletions(-)
15
16diff --git a/tools/generate_proxy.cpp b/tools/generate_proxy.cpp
17index bf1094a..ebb75fa 100644
18--- a/tools/generate_proxy.cpp
19+++ b/tools/generate_proxy.cpp
20@@ -352,7 +352,7 @@ void generate_proxy(Xml::Document &doc, const char *filename)
21 if (!arg_name.length())
22 {
23 arg_name = "argin";
24- arg_name += toString <uint> (i);
25+ arg_name += toString <unsigned int> (i);
26 }
27
28 // generate extra code to wrap object
29@@ -445,7 +445,7 @@ void generate_proxy(Xml::Document &doc, const char *filename)
30
31 if (!arg_name.length())
32 {
33- arg_name = "argout" + toString <uint> (i);
34+ arg_name = "argout" + toString <unsigned int> (i);
35 }
36
37 if (arg_object.length())
38@@ -569,7 +569,7 @@ void generate_proxy(Xml::Document &doc, const char *filename)
39 // use a default if no arg name given
40 if (!arg_name.length())
41 {
42- arg_name = "arg" + toString <uint> (i);
43+ arg_name = "arg" + toString <unsigned int> (i);
44 }
45
46 body << arg_name << ";" << endl;
47@@ -605,7 +605,7 @@ void generate_proxy(Xml::Document &doc, const char *filename)
48
49 if (!arg_name.length())
50 {
51- arg_name = "arg" + toString <uint> (j);
52+ arg_name = "arg" + toString <unsigned int> (j);
53 }
54
55 if (arg_object.length())
56--
572.10.2
58
diff --git a/meta-oe/recipes-core/dbus/libdbus-c++-0.9.0/0003-Fixed-undefined-ssize_t-for-clang-3.8.0-on-FreeBSD.patch b/meta-oe/recipes-core/dbus/libdbus-c++-0.9.0/0003-Fixed-undefined-ssize_t-for-clang-3.8.0-on-FreeBSD.patch
new file mode 100644
index 000000000..f69cefdb7
--- /dev/null
+++ b/meta-oe/recipes-core/dbus/libdbus-c++-0.9.0/0003-Fixed-undefined-ssize_t-for-clang-3.8.0-on-FreeBSD.patch
@@ -0,0 +1,30 @@
1From 465d98dbcdcb72375c198010a50b80b953e7d5a6 Mon Sep 17 00:00:00 2001
2From: Yuri <yuri@tsoft.com>
3Date: Sat, 28 May 2016 13:20:10 -0700
4Subject: [PATCH] Fixed undefined ssize_t for clang-3.8.0 on FreeBSD.
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9---
10Upstream-Status: Backport [https://github.com/andreas-volz/dbus-cplusplus/commit/463f5a4400d494b831c3b3348c0a21f0faf14f39]
11Signed-off-by: André Draszik <adraszik@tycoint.com>
12 include/dbus-c++/pipe.h | 2 ++
13 1 file changed, 2 insertions(+)
14
15diff --git a/include/dbus-c++/pipe.h b/include/dbus-c++/pipe.h
16index 999f042..682646c 100644
17--- a/include/dbus-c++/pipe.h
18+++ b/include/dbus-c++/pipe.h
19@@ -30,6 +30,8 @@
20 /* STD */
21 #include <cstdlib>
22
23+#include <sys/types.h>
24+
25 namespace DBus
26 {
27
28--
292.10.2
30
diff --git a/meta-oe/recipes-core/dbus/libdbus-c++-0.9.0/0004-use-POSIX-poll.h-instead-of-sys-poll.h.patch b/meta-oe/recipes-core/dbus/libdbus-c++-0.9.0/0004-use-POSIX-poll.h-instead-of-sys-poll.h.patch
new file mode 100644
index 000000000..0c2c48746
--- /dev/null
+++ b/meta-oe/recipes-core/dbus/libdbus-c++-0.9.0/0004-use-POSIX-poll.h-instead-of-sys-poll.h.patch
@@ -0,0 +1,77 @@
1From 12de53b0f24c478ea4ff6b4e2c55366dbd2f02b1 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <git@andred.net>
3Date: Fri, 25 Nov 2016 09:33:20 +0000
4Subject: [PATCH] use POSIX poll.h instead of sys/poll.h
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9POSIX specifies that <poll.h> is the correct header to
10include for poll()
11 http://pubs.opengroup.org/onlinepubs/009695399/functions/poll.html
12whereas <sys/poll.h> is only needed for ancient glibc (<2.3),
13so let's follow POSIX instead.
14
15As a side-effect, this silences compilation warnings when
16compiling against the musl C-library such as:
17
18| In file included from ../../libdbus-c++-0.9.0/src/eventloop.cpp:31:0:
19| <sysroot>/usr/include/sys/poll.h:1:2: warning: #warning redirecting incorrect #include <sys/poll.h> to <poll.h> [-Wcpp]
20| #warning redirecting incorrect #include <sys/poll.h> to <poll.h>
21| ^~~~~~~
22| In file included from ../../libdbus-c++-0.9.0/src/eventloop-integration.cpp:39:0:
23| <sysroot>/usr/include/sys/poll.h:1:2: warning: #warning redirecting incorrect #include <sys/poll.h> to <poll.h> [-Wcpp]
24| #warning redirecting incorrect #include <sys/poll.h> to <poll.h>
25| ^~~~~~~
26
27Signed-off-by: André Draszik <git@andred.net>
28---
29Upstream-Status: Submitted [https://github.com/andreas-volz/dbus-cplusplus/pull/3]
30Signed-off-by: André Draszik <adraszik@tycoint.com>
31 src/eventloop-integration.cpp | 2 +-
32 src/eventloop.cpp | 2 +-
33 src/pipe.cpp | 2 +-
34 3 files changed, 3 insertions(+), 3 deletions(-)
35
36diff --git a/src/eventloop-integration.cpp b/src/eventloop-integration.cpp
37index 5776971..271b503 100644
38--- a/src/eventloop-integration.cpp
39+++ b/src/eventloop-integration.cpp
40@@ -36,7 +36,7 @@
41 /* STD */
42 #include <string.h>
43 #include <cassert>
44-#include <sys/poll.h>
45+#include <poll.h>
46 #include <fcntl.h>
47 #include <unistd.h>
48
49diff --git a/src/eventloop.cpp b/src/eventloop.cpp
50index f622812..7790e1e 100644
51--- a/src/eventloop.cpp
52+++ b/src/eventloop.cpp
53@@ -28,7 +28,7 @@
54 #include <dbus-c++/eventloop.h>
55 #include <dbus-c++/debug.h>
56
57-#include <sys/poll.h>
58+#include <poll.h>
59 #include <sys/time.h>
60
61 #include <dbus/dbus.h>
62diff --git a/src/pipe.cpp b/src/pipe.cpp
63index 01211b3..45c2ba6 100644
64--- a/src/pipe.cpp
65+++ b/src/pipe.cpp
66@@ -32,7 +32,7 @@
67
68 /* STD */
69 #include <unistd.h>
70-#include <sys/poll.h>
71+#include <poll.h>
72 #include <fcntl.h>
73 #include <errno.h>
74 #include <cassert>
75--
762.10.2
77
diff --git a/meta-oe/recipes-core/dbus/libdbus-c++_0.9.0.bb b/meta-oe/recipes-core/dbus/libdbus-c++_0.9.0.bb
index 7edaffca6..9b053fed8 100644
--- a/meta-oe/recipes-core/dbus/libdbus-c++_0.9.0.bb
+++ b/meta-oe/recipes-core/dbus/libdbus-c++_0.9.0.bb
@@ -4,21 +4,26 @@ HOMEPAGE = "http://dbus-cplusplus.sourceforge.net"
4SECTION = "base" 4SECTION = "base"
5LICENSE = "LGPLv2.1" 5LICENSE = "LGPLv2.1"
6LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24" 6LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24"
7DEPENDS = "dbus glib-2.0 libpcre" 7DEPENDS = "dbus expat glib-2.0 libpcre"
8 8
9SRC_URI = "${SOURCEFORGE_MIRROR}/project/dbus-cplusplus/dbus-c++/${PV}/${BPN}-${PV}.tar.gz \ 9SRC_URI = "\
10 file://fix-missing-unistd.h-include.patch \ 10 ${SOURCEFORGE_MIRROR}/project/dbus-cplusplus/dbus-c++/${PV}/${BP}.tar.gz \
11 file://remove-CXX_FOR_BUILD-stuff.patch" 11 file://fix-missing-unistd.h-include.patch \
12 file://remove-CXX_FOR_BUILD-stuff.patch \
13 file://0001-src-eventloop.cpp-use-portable-method-for-initializi.patch \
14 file://0002-tools-generate_proxy.cpp-avoid-possibly-undefined-ui.patch \
15 file://0003-Fixed-undefined-ssize_t-for-clang-3.8.0-on-FreeBSD.patch \
16 file://0004-use-POSIX-poll.h-instead-of-sys-poll.h.patch \
17"
12SRC_URI[md5sum] = "e752116f523fa88ef041e63d3dee4de2" 18SRC_URI[md5sum] = "e752116f523fa88ef041e63d3dee4de2"
13SRC_URI[sha256sum] = "bc11ac297b3cb010be904c72789695543ee3fdf3d75cdc8225fd371385af4e61" 19SRC_URI[sha256sum] = "bc11ac297b3cb010be904c72789695543ee3fdf3d75cdc8225fd371385af4e61"
14 20
15EXTRA_OECONF = "--disable-ecore --disable-examples --disable-tests"
16
17inherit autotools pkgconfig 21inherit autotools pkgconfig
18 22
19PACKAGES += "${PN}-tools" 23EXTRA_OECONF = "--disable-ecore --disable-examples --disable-tests"
24
25PACKAGE_BEFORE_PN = "${PN}-tools"
20 26
21FILES_${PN} = "${libdir}"
22FILES_${PN}-tools = "${bindir}" 27FILES_${PN}-tools = "${bindir}"
23 28
24BBCLASSEXTEND = "native" 29BBCLASSEXTEND = "native"