summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-networking/recipes-support/libtevent/libtevent/cmocka-fix-musl-libc-conflicting-types-error.patch45
-rw-r--r--meta-networking/recipes-support/libtevent/libtevent/run-ptest17
-rw-r--r--meta-networking/recipes-support/libtevent/libtevent_0.14.1.bb20
3 files changed, 24 insertions, 58 deletions
diff --git a/meta-networking/recipes-support/libtevent/libtevent/cmocka-fix-musl-libc-conflicting-types-error.patch b/meta-networking/recipes-support/libtevent/libtevent/cmocka-fix-musl-libc-conflicting-types-error.patch
deleted file mode 100644
index 5795ff3bd..000000000
--- a/meta-networking/recipes-support/libtevent/libtevent/cmocka-fix-musl-libc-conflicting-types-error.patch
+++ /dev/null
@@ -1,45 +0,0 @@
1From 1d4dedab5039bb671f44566d8573ee3532ba7176 Mon Sep 17 00:00:00 2001
2From: Changqing Li <changqing.li@windriver.com>
3Date: Wed, 25 Jul 2018 09:55:25 +0800
4Subject: [PATCH] cmocka: fix musl libc conflicting types error
5
6/third_party/cmocka/cmocka.h:126:28: error: conflicting types for 'uintptr_t'
7 typedef unsigned int uintptr_t;
8 ^~~~~~~~~
9use __DEFINED_uintptr_t in alltypes.h to check if uintptr already defined
10
11Upstream-Status: Pending
12
13Signed-off-by: Changqing Li <changqing.li@windriver.com>
14---
15 third_party/cmocka/cmocka.h | 7 +++----
16 1 file changed, 3 insertions(+), 4 deletions(-)
17
18diff --git a/third_party/cmocka/cmocka.h b/third_party/cmocka/cmocka.h
19index e6861c8..238201d 100644
20--- a/third_party/cmocka/cmocka.h
21+++ b/third_party/cmocka/cmocka.h
22@@ -111,7 +111,7 @@ typedef uintmax_t LargestIntegralType;
23 ((LargestIntegralType)(value))
24
25 /* Smallest integral type capable of holding a pointer. */
26-#if !defined(_UINTPTR_T) && !defined(_UINTPTR_T_DEFINED)
27+#if !defined(__DEFINED_uintptr_t)
28 # if defined(_WIN32)
29 /* WIN32 is an ILP32 platform */
30 typedef unsigned int uintptr_t;
31@@ -135,9 +135,8 @@ typedef uintmax_t LargestIntegralType;
32 # endif /* __WORDSIZE */
33 # endif /* _WIN32 */
34
35-# define _UINTPTR_T
36-# define _UINTPTR_T_DEFINED
37-#endif /* !defined(_UINTPTR_T) || !defined(_UINTPTR_T_DEFINED) */
38+# define __DEFINED_uintptr_t
39+#endif /* !defined(__DEFINED_uintptr_t) */
40
41 /* Perform an unsigned cast to uintptr_t. */
42 #define cast_to_pointer_integral_type(value) \
43--
442.25.1
45
diff --git a/meta-networking/recipes-support/libtevent/libtevent/run-ptest b/meta-networking/recipes-support/libtevent/libtevent/run-ptest
new file mode 100644
index 000000000..19f7a4a3a
--- /dev/null
+++ b/meta-networking/recipes-support/libtevent/libtevent/run-ptest
@@ -0,0 +1,17 @@
1#!/bin/sh
2
3ptestdir=$(dirname "$(readlink -f "$0")")
4cd "$ptestdir"/tests || exit
5
6tests="replace_testsuite test_tevent_tag test_tevent_trace"
7
8for f in $tests
9do
10 if test -x ./"$f"; then
11 if ./"$f" > ./"$f".out 2> ./"$f".err; then
12 echo "PASS: $f"
13 else
14 echo "FAIL: $f"
15 fi
16 fi
17done
diff --git a/meta-networking/recipes-support/libtevent/libtevent_0.14.1.bb b/meta-networking/recipes-support/libtevent/libtevent_0.14.1.bb
index b34c186ca..9a2b5ede2 100644
--- a/meta-networking/recipes-support/libtevent/libtevent_0.14.1.bb
+++ b/meta-networking/recipes-support/libtevent/libtevent_0.14.1.bb
@@ -3,7 +3,7 @@ HOMEPAGE = "https://tevent.samba.org"
3SECTION = "libs" 3SECTION = "libs"
4LICENSE = "LGPL-3.0-or-later" 4LICENSE = "LGPL-3.0-or-later"
5 5
6DEPENDS += "libtalloc libtirpc" 6DEPENDS += "libtalloc libtirpc cmocka"
7RDEPENDS:python3-tevent = "python3" 7RDEPENDS:python3-tevent = "python3"
8 8
9export PYTHONHASHSEED="1" 9export PYTHONHASHSEED="1"
@@ -11,10 +11,9 @@ export PYTHONHASHSEED="1"
11SRC_URI = "https://samba.org/ftp/tevent/tevent-${PV}.tar.gz \ 11SRC_URI = "https://samba.org/ftp/tevent/tevent-${PV}.tar.gz \
12 file://0001-Add-configure-options-for-packages.patch \ 12 file://0001-Add-configure-options-for-packages.patch \
13 file://0002-Fix-pyext_PATTERN-for-cross-compilation.patch \ 13 file://0002-Fix-pyext_PATTERN-for-cross-compilation.patch \
14 file://run-ptest \
14 " 15 "
15 16
16SRC_URI:append:libc-musl = " file://cmocka-fix-musl-libc-conflicting-types-error.patch"
17
18LIC_FILES_CHKSUM = "file://tevent.h;endline=26;md5=47386b7c539bf2706b7ce52dc9341681" 17LIC_FILES_CHKSUM = "file://tevent.h;endline=26;md5=47386b7c539bf2706b7ce52dc9341681"
19 18
20SRC_URI[sha256sum] = "ef85fcaa80ffd2351036ba4b347630fef2a1ac3da964a7f1820466bad03cd00d" 19SRC_URI[sha256sum] = "ef85fcaa80ffd2351036ba4b347630fef2a1ac3da964a7f1820466bad03cd00d"
@@ -42,27 +41,22 @@ export WAF_NO_PREFORK="yes"
42 41
43EXTRA_OECONF += "--disable-rpath \ 42EXTRA_OECONF += "--disable-rpath \
44 --disable-rpath-install \ 43 --disable-rpath-install \
45 --bundled-libraries=cmocka \ 44 --bundled-libraries=NONE \
46 --builtin-libraries=replace \ 45 --builtin-libraries=replace \
47 --with-libiconv=${STAGING_DIR_HOST}${prefix}\ 46 --with-libiconv=${STAGING_DIR_HOST}${prefix}\
48 --without-gettext \ 47 --without-gettext \
49 " 48 "
50 49
51do_install:append() { 50do_install_ptest() {
52 install -Dm 0755 ${B}/bin/test_tevent_trace ${D}${bindir}/test_tevent_trace 51 install -d ${D}${PTEST_PATH}/tests
53 install -Dm 0755 ${B}/bin/test_tevent_tag ${D}${bindir}/test_tevent_tag 52 install -m 0755 ${B}/bin/test_tevent_* ${D}${PTEST_PATH}/tests/
54 install -Dm 0755 ${B}/bin/replace_testsuite ${D}${bindir}/replace_testsuite 53 install -m 0755 ${B}/bin/replace_testsuite ${D}${PTEST_PATH}/tests/
55} 54}
56 55
57PACKAGES += "python3-tevent" 56PACKAGES += "python3-tevent"
58 57
59RPROVIDES:${PN}-dbg += "python3-tevent-dbg" 58RPROVIDES:${PN}-dbg += "python3-tevent-dbg"
60 59
61FILES:${PN} += "${libdir}/tevent/*"
62FILES:${PN}-ptest += "${bindir}/replace_testsuite \
63 ${bindir}/test_tevent_tag \
64 ${bindir}/test_tevent_trace \
65 ${libdir}/libcmocka-tevent.so"
66FILES:python3-tevent = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*" 60FILES:python3-tevent = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*"
67 61
68INSANE_SKIP:${MLPREFIX}python3-tevent = "dev-so" 62INSANE_SKIP:${MLPREFIX}python3-tevent = "dev-so"