summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-oe/recipes-extended/libyang/libyang/libyang-add-stdint-h.patch35
-rw-r--r--meta-oe/recipes-extended/libyang/libyang/libyang-skip-pcre2-config-add-stdint-h.patch55
-rw-r--r--meta-oe/recipes-extended/libyang/libyang_2.0.164.bb (renamed from meta-oe/recipes-extended/libyang/libyang_2.0.7.bb)7
3 files changed, 39 insertions, 58 deletions
diff --git a/meta-oe/recipes-extended/libyang/libyang/libyang-add-stdint-h.patch b/meta-oe/recipes-extended/libyang/libyang/libyang-add-stdint-h.patch
new file mode 100644
index 000000000..d35741114
--- /dev/null
+++ b/meta-oe/recipes-extended/libyang/libyang/libyang-add-stdint-h.patch
@@ -0,0 +1,35 @@
1From c7f3e2a8fe530beec6103cb9071ccc41458879aa Mon Sep 17 00:00:00 2001
2From: Tony Tascioglu <tony.tascioglu@windriver.com>
3Date: Mon, 21 Jun 2021 12:34:22 -0400
4Subject: [PATCH] libyang: fix initial build errors
5
6This patch addresses build errors seen when integrating libyang as a
7recipe.
8
9There is a missing include statement for stdint.h in utests.h which
10causes build problems. stdint.h is required to be imported by cmocka.h
11prior to the cmocka file. Adding the stdint allows it to build the
12tests correctly
13
14Upstream-Status: Submitted [ https://github.com/CESNET/libyang/pull/1819 ]
15
16Signed-off-by: Tony Tascioglu <tony.tascioglu@windriver.com>
17Signed-off-by: Randy MacLeod <randy.macleod@windriver.com>
18---
19 tests/utests/utests.h | 1 +
20 1 file changed, 1 insertion(+)
21
22diff --git a/tests/utests/utests.h b/tests/utests/utests.h
23index 7e85a66e..8eee26ce 100644
24--- a/tests/utests/utests.h
25+++ b/tests/utests/utests.h
26@@ -22,6 +22,7 @@
27 #include <stdarg.h>
28 #include <stddef.h>
29 #include <stdlib.h>
30+#include <stdint.h>
31
32 #include <cmocka.h>
33
34--
352.32.0
diff --git a/meta-oe/recipes-extended/libyang/libyang/libyang-skip-pcre2-config-add-stdint-h.patch b/meta-oe/recipes-extended/libyang/libyang/libyang-skip-pcre2-config-add-stdint-h.patch
deleted file mode 100644
index e3b2d0e02..000000000
--- a/meta-oe/recipes-extended/libyang/libyang/libyang-skip-pcre2-config-add-stdint-h.patch
+++ /dev/null
@@ -1,55 +0,0 @@
1From c7f3e2a8fe530beec6103cb9071ccc41458879aa Mon Sep 17 00:00:00 2001
2From: Tony Tascioglu <tony.tascioglu@windriver.com>
3Date: Mon, 21 Jun 2021 12:34:22 -0400
4Subject: [PATCH] libyang: fix initial build errors
5
6This patch addresses build errors seen when integrating libyang as a
7recipe.
8
9The call to pcre2-config has been commented out. *-config calls are
10being replaced by pkgconfig, and we want to avoid the binary config
11calls. This call can safely be discarded since it is used to check
12the version of libpcre2 on the system, and all recent YP builds meet
13the minimum required version (v10.21).
14
15There is a missing include statement for stdint.h in utests.h which
16causes build problems. stdint.h is required to be imported by cmocka.h
17prior to the cmocka file. Adding the stdint allows it to build the
18tests correctly
19
20Upstream-Status: Pending
21
22Signed-off-by: Tony Tascioglu <tony.tascioglu@windriver.com>
23---
24 CMakeModules/FindPCRE2.cmake | 2 +-
25 tests/utests/utests.h | 1 +
26 2 files changed, 2 insertions(+), 1 deletion(-)
27
28diff --git a/CMakeModules/FindPCRE2.cmake b/CMakeModules/FindPCRE2.cmake
29index 8f60daa2..ad014f14 100644
30--- a/CMakeModules/FindPCRE2.cmake
31+++ b/CMakeModules/FindPCRE2.cmake
32@@ -12,7 +12,7 @@ FIND_PATH(PCRE2_INCLUDE_DIR pcre2.h)
33 FIND_LIBRARY(PCRE2_LIBRARY NAMES libpcre2.a pcre2-8)
34
35 # Check required version
36-execute_process(COMMAND pcre2-config --version OUTPUT_VARIABLE PCRE2_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
37+# execute_process(COMMAND pcre2-config --version OUTPUT_VARIABLE PCRE2_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
38
39 # Handle the QUIETLY and REQUIRED arguments and set PCRE_FOUND to TRUE if all listed variables are TRUE.
40 INCLUDE(FindPackageHandleStandardArgs)
41diff --git a/tests/utests/utests.h b/tests/utests/utests.h
42index 5bea0459..a256120c 100644
43--- a/tests/utests/utests.h
44+++ b/tests/utests/utests.h
45@@ -23,6 +23,7 @@
46 #include <stddef.h>
47 #include <stdlib.h>
48
49+#include <stdint.h>
50 #include <cmocka.h>
51
52 #include <string.h>
53--
542.32.0
55
diff --git a/meta-oe/recipes-extended/libyang/libyang_2.0.7.bb b/meta-oe/recipes-extended/libyang/libyang_2.0.164.bb
index 2f5e4615f..8f41769e0 100644
--- a/meta-oe/recipes-extended/libyang/libyang_2.0.7.bb
+++ b/meta-oe/recipes-extended/libyang/libyang_2.0.164.bb
@@ -6,15 +6,16 @@ LICENSE = "BSD-3-Clause"
6 6
7LIC_FILES_CHKSUM = "file://LICENSE;md5=f3916d7d8d42a6508d0ea418cfff10ad" 7LIC_FILES_CHKSUM = "file://LICENSE;md5=f3916d7d8d42a6508d0ea418cfff10ad"
8 8
9SRCREV = "69d9fff65abb58beb0bb6aa9ecacd572ca1dfc56" 9SRCREV = "a0cc89516ab5eca84d01c85309f320a94752a64c"
10 10
11SRC_URI = "git://github.com/CESNET/libyang.git;branch=master;protocol=https \ 11SRC_URI = "git://github.com/CESNET/libyang.git;branch=master;protocol=https \
12 file://libyang-skip-pcre2-config-add-stdint-h.patch \ 12 file://libyang-add-stdint-h.patch \
13 file://run-ptest \ 13 file://run-ptest \
14 " 14 "
15 15
16S = "${WORKDIR}/git" 16S = "${WORKDIR}/git"
17 17
18# Due to valgrind not supported on these arches:
18COMPATIBLE_HOST:riscv32 = "null" 19COMPATIBLE_HOST:riscv32 = "null"
19COMPATIBLE_HOST:armv5 = "null" 20COMPATIBLE_HOST:armv5 = "null"
20COMPATIBLE_HOST:riscv64 = "null" 21COMPATIBLE_HOST:riscv64 = "null"
@@ -29,7 +30,7 @@ BINCONFIG = "${bindir}/pcre2-config"
29RDEPENDS:${PN}-ptest += "valgrind" 30RDEPENDS:${PN}-ptest += "valgrind"
30 31
31EXTRA_OECMAKE = "-DCMAKE_BUILD_TYPE=Release" 32EXTRA_OECMAKE = "-DCMAKE_BUILD_TYPE=Release"
32EXTRA_OECMAKE += " ${@bb.utils.contains('PTEST_ENABLED', '1', '-DENABLE_BUILD_TESTS=ON', '', d)}" 33EXTRA_OECMAKE += " ${@bb.utils.contains('PTEST_ENABLED', '1', '-DENABLE_TESTS=ON', '', d)}"
33 34
34do_install_ptest () { 35do_install_ptest () {
35 cp -fR ${B}/tests/ ${D}${PTEST_PATH}/ 36 cp -fR ${B}/tests/ ${D}${PTEST_PATH}/