summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-oe/recipes-extended/canopenterm/canopenterm/0001-Fix-C-include-path-for-pocketpy-headers.patch137
-rw-r--r--meta-oe/recipes-extended/canopenterm/canopenterm/0002-Update-search-paths-in-Findpocketpy.cmake.patch59
-rw-r--r--meta-oe/recipes-extended/canopenterm/canopenterm_2.02.bb (renamed from meta-oe/recipes-extended/canopenterm/canopenterm_2.01.bb)9
3 files changed, 202 insertions, 3 deletions
diff --git a/meta-oe/recipes-extended/canopenterm/canopenterm/0001-Fix-C-include-path-for-pocketpy-headers.patch b/meta-oe/recipes-extended/canopenterm/canopenterm/0001-Fix-C-include-path-for-pocketpy-headers.patch
new file mode 100644
index 0000000000..b5b70fe378
--- /dev/null
+++ b/meta-oe/recipes-extended/canopenterm/canopenterm/0001-Fix-C-include-path-for-pocketpy-headers.patch
@@ -0,0 +1,137 @@
1From 578d5805f73e3f38b5fff7f6b8d11b3d9ff6b9e3 Mon Sep 17 00:00:00 2001
2From: Michael Fitzmayer <mail@michael-fitzmayer.de>
3Date: Wed, 15 Apr 2026 11:57:58 +0200
4Subject: [PATCH] Fix C include path for pocketpy headers
5
6Upstream-Status: Submitted [https://github.com/CANopenTerm/CANopenTerm/commit/cbe8d8e6d5787636a32862b20f7c7cf342bb764b]
7
8Signed-off-by: Michael Fitzmayer <mail@michael-fitzmayer.de>
9---
10 src/api/python_can.c | 2 +-
11 src/api/python_dbc.c | 2 +-
12 src/api/python_misc.c | 2 +-
13 src/api/python_nmt.c | 2 +-
14 src/api/python_pdo.c | 2 +-
15 src/api/python_sdo.c | 2 +-
16 src/api/python_test_report.c | 2 +-
17 src/api/python_widget.c | 2 +-
18 src/core/scripts.c | 2 +-
19 9 files changed, 9 insertions(+), 9 deletions(-)
20
21diff --git a/src/api/python_can.c b/src/api/python_can.c
22index d1c5c6a..c6ee023 100644
23--- a/src/api/python_can.c
24+++ b/src/api/python_can.c
25@@ -11,7 +11,7 @@
26 #include "core.h"
27 #include "dict.h"
28 #include "os.h"
29-#include "pocketpy.h"
30+#include <pocketpy.h>
31
32 typedef bool (*py_CFunction)(int argc, py_Ref argv);
33
34diff --git a/src/api/python_dbc.c b/src/api/python_dbc.c
35index f688796..3f3e3d3 100644
36--- a/src/api/python_dbc.c
37+++ b/src/api/python_dbc.c
38@@ -10,7 +10,7 @@
39 #include "core.h"
40 #include "dbc.h"
41 #include "os.h"
42-#include "pocketpy.h"
43+#include <pocketpy.h>
44
45 typedef bool (*py_CFunction)(int argc, py_Ref argv);
46
47diff --git a/src/api/python_misc.c b/src/api/python_misc.c
48index a71c39d..da14c01 100644
49--- a/src/api/python_misc.c
50+++ b/src/api/python_misc.c
51@@ -10,7 +10,7 @@
52 #include "python_misc.h"
53 #include "core.h"
54 #include "os.h"
55-#include "pocketpy.h"
56+#include <pocketpy.h>
57 #include "scripts.h"
58
59 typedef bool (*py_CFunction)(int argc, py_Ref argv);
60diff --git a/src/api/python_nmt.c b/src/api/python_nmt.c
61index 293d2e1..8e467fe 100644
62--- a/src/api/python_nmt.c
63+++ b/src/api/python_nmt.c
64@@ -11,7 +11,7 @@
65 #include "core.h"
66 #include "nmt.h"
67 #include "os.h"
68-#include "pocketpy.h"
69+#include <pocketpy.h>
70
71 typedef bool (*py_CFunction)(int argc, py_Ref argv);
72
73diff --git a/src/api/python_pdo.c b/src/api/python_pdo.c
74index fe34bc9..a307b0d 100644
75--- a/src/api/python_pdo.c
76+++ b/src/api/python_pdo.c
77@@ -10,7 +10,7 @@
78 #include "core.h"
79 #include "os.h"
80 #include "pdo.h"
81-#include "pocketpy.h"
82+#include <pocketpy.h>
83
84 typedef bool (*py_CFunction)(int argc, py_Ref argv);
85
86diff --git a/src/api/python_sdo.c b/src/api/python_sdo.c
87index 3378fc2..2d7b583 100644
88--- a/src/api/python_sdo.c
89+++ b/src/api/python_sdo.c
90@@ -10,7 +10,7 @@
91 #include "core.h"
92 #include "dict.h"
93 #include "os.h"
94-#include "pocketpy.h"
95+#include <pocketpy.h>
96 #include "sdo.h"
97
98 typedef bool (*py_CFunction)(int argc, py_Ref argv);
99diff --git a/src/api/python_test_report.c b/src/api/python_test_report.c
100index 59cc7b1..3ca7536 100644
101--- a/src/api/python_test_report.c
102+++ b/src/api/python_test_report.c
103@@ -10,7 +10,7 @@
104 #include "core.h"
105 #include "eds.h"
106 #include "os.h"
107-#include "pocketpy.h"
108+#include <pocketpy.h>
109 #include "test_report.h"
110
111 typedef bool (*py_CFunction)(int argc, py_Ref argv);
112diff --git a/src/api/python_widget.c b/src/api/python_widget.c
113index 92891c0..c176ca8 100644
114--- a/src/api/python_widget.c
115+++ b/src/api/python_widget.c
116@@ -13,7 +13,7 @@
117 #include "core.h"
118 #include "led.h"
119 #include "os.h"
120-#include "pocketpy.h"
121+#include <pocketpy.h>
122 #include "tachometer.h"
123 #include "window.h"
124
125diff --git a/src/core/scripts.c b/src/core/scripts.c
126index 4dbdac3..1f37b7c 100644
127--- a/src/core/scripts.c
128+++ b/src/core/scripts.c
129@@ -14,7 +14,7 @@
130 #include "lua.h"
131 #include "lualib.h"
132 #include "os.h"
133-#include "pocketpy.h"
134+#include <pocketpy.h>
135 #include "table.h"
136
137 extern const uint8 max_script_search_paths;
diff --git a/meta-oe/recipes-extended/canopenterm/canopenterm/0002-Update-search-paths-in-Findpocketpy.cmake.patch b/meta-oe/recipes-extended/canopenterm/canopenterm/0002-Update-search-paths-in-Findpocketpy.cmake.patch
new file mode 100644
index 0000000000..5dfb426bb5
--- /dev/null
+++ b/meta-oe/recipes-extended/canopenterm/canopenterm/0002-Update-search-paths-in-Findpocketpy.cmake.patch
@@ -0,0 +1,59 @@
1From ec8c7459cdca2e94ee5fcce514d4f116ac7e039b Mon Sep 17 00:00:00 2001
2From: Michael Fitzmayer <mail@michael-fitzmayer.de>
3Date: Wed, 15 Apr 2026 12:31:17 +0200
4Subject: [PATCH] Update search paths in Findpocketpy.cmake
5
6Upstream-Status: Submitted [https://github.com/CANopenTerm/CANopenTerm/commit/7a9466029a6e88345e65e794ff1779f778c9358a]
7
8Signed-off-by: Michael Fitzmayer <mail@michael-fitzmayer.de>
9---
10 cmake/Findpocketpy.cmake | 30 ++++++++++++++++++++++++------
11 1 file changed, 24 insertions(+), 6 deletions(-)
12
13diff --git a/cmake/Findpocketpy.cmake b/cmake/Findpocketpy.cmake
14index 459160f..8083270 100644
15--- a/cmake/Findpocketpy.cmake
16+++ b/cmake/Findpocketpy.cmake
17@@ -3,18 +3,36 @@ cmake_minimum_required(VERSION 3.16)
18 # Findpocketpy.cmake
19 # Locate pocketpy library and include directories
20
21-find_path(pocketpy_INCLUDE_DIR NAMES pocketpy/pocketpy.h PATHS /usr/include)
22-find_library(pocketpy_LIBRARY NAMES libpocketpy.so PATHS /usr/lib)
23+find_path(pocketpy_INCLUDE_DIR
24+ NAMES pocketpy.h
25+ PATH_SUFFIXES pocketpy
26+ PATHS
27+ /usr/include
28+ /usr/local/include
29+ /opt/local/include
30+ /opt/homebrew/include
31+)
32+
33+find_library(pocketpy_LIBRARY
34+ NAMES pocketpy
35+ PATHS
36+ /usr/lib
37+ /usr/local/lib
38+ /opt/local/lib
39+ /opt/homebrew/lib
40+)
41
42 message(STATUS "pocketpy_INCLUDE_DIR: ${pocketpy_INCLUDE_DIR}")
43 message(STATUS "pocketpy_LIBRARY: ${pocketpy_LIBRARY}")
44
45-if (pocketpy_INCLUDE_DIR AND pocketpy_LIBRARY)
46- set(pocketpy_FOUND TRUE)
47+include(FindPackageHandleStandardArgs)
48+find_package_handle_standard_args(pocketpy
49+ REQUIRED_VARS pocketpy_LIBRARY pocketpy_INCLUDE_DIR
50+)
51+
52+if (pocketpy_FOUND)
53 set(pocketpy_INCLUDE_DIRS ${pocketpy_INCLUDE_DIR})
54 set(pocketpy_LIBRARIES ${pocketpy_LIBRARY})
55-else()
56- set(pocketpy_FOUND FALSE)
57 endif()
58
59 mark_as_advanced(pocketpy_INCLUDE_DIR pocketpy_LIBRARY)
diff --git a/meta-oe/recipes-extended/canopenterm/canopenterm_2.01.bb b/meta-oe/recipes-extended/canopenterm/canopenterm_2.02.bb
index f44312a6e4..a83d3bee69 100644
--- a/meta-oe/recipes-extended/canopenterm/canopenterm_2.01.bb
+++ b/meta-oe/recipes-extended/canopenterm/canopenterm_2.02.bb
@@ -15,13 +15,16 @@ LIC_FILES_CHKSUM = "file://LICENSE.md;md5=bd2edc721b4a0289efe949bdbe7dda79"
15 15
16DEPENDS = "canvenient cjson isocline libinih libsdl3 lua pocketpy" 16DEPENDS = "canvenient cjson isocline libinih libsdl3 lua pocketpy"
17 17
18SRC_URI = "git://github.com/CANopenTerm/CANopenTerm.git;protocol=https;branch=main;tag=v${PV}" 18SRC_URI = "git://github.com/CANopenTerm/CANopenTerm.git;protocol=https;branch=main;tag=v${PV} \
19SRCREV = "4196097f71c7e59b27e9d8ac3c6cf58f44fa9f19" 19 file://0001-Fix-C-include-path-for-pocketpy-headers.patch \
20 file://0002-Update-search-paths-in-Findpocketpy.cmake.patch \
21 "
22SRCREV = "a6a9cd4fdbfaffea01b3eeeaf3c4830d4ee4b313"
20 23
21 24
22inherit cmake ptest 25inherit cmake ptest
23 26
24EXTRA_OECMAKE += "-DBUILD_YOCTO=ON" 27EXTRA_OECMAKE += "-DUSE_SYSTEM_LIBS=ON"
25 28
26FILES:${PN} += "${bindir}/CANopenTerm ${bindir}/codb2json ${datadir}" 29FILES:${PN} += "${bindir}/CANopenTerm ${bindir}/codb2json ${datadir}"
27 30