[Buildroot] [PATCH v6 6/6] package/canopenterm: new package

Dario Binacchi <[email protected]>
Newsgroups net.busybox.buildroot
Message-ID <[email protected]>
CANopenTerm is an open-source tool for developing, testing, and
analyzing CANopen CC networks and devices. It provides a technical,
no-nonsense solution for professionals working with CAN CC-based
networks. Additionally, it supports SAE J1939 and OBD-II protocols,
making it versatile for various applications.

Project page: https://github.com/CANopenTerm/CANopenTerm

Tested on STM32MP257F-EV1

Signed-off-by: Dario Binacchi <[email protected]>
---
 DEVELOPERS                           |  1 +
 package/Config.in                    |  1 +
 package/canopenterm/Config.in        | 27 ++++++++++++++++++++++++++
 package/canopenterm/canopenterm.hash |  3 +++
 package/canopenterm/canopenterm.mk   | 29 ++++++++++++++++++++++++++++
 5 files changed, 61 insertions(+)
 create mode 100644 package/canopenterm/Config.in
 create mode 100644 package/canopenterm/canopenterm.hash
 create mode 100644 package/canopenterm/canopenterm.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index 49c5b93c13ed..e14180673b6d 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -820,6 +820,7 @@ F:	package/armadillo/
 F:	package/atf/
 F:	package/babeld/
 F:	package/bc/
+F:	package/canopenterm/
 F:	package/canvenient/
 F:	package/cmocka/
 F:	package/connman/
diff --git a/package/Config.in b/package/Config.in
index 8fae0a27e7f6..08946510df3e 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -2439,6 +2439,7 @@ endif
 	source "package/c-icap-modules/Config.in"
 	source "package/can-utils/Config.in"
 	source "package/cannelloni/Config.in"
+	source "package/canopenterm/Config.in"
 	source "package/casync/Config.in"
 	source "package/casync-nano/Config.in"
 	source "package/cfm/Config.in"
diff --git a/package/canopenterm/Config.in b/package/canopenterm/Config.in
new file mode 100644
index 000000000000..c39d7bede950
--- /dev/null
+++ b/package/canopenterm/Config.in
@@ -0,0 +1,27 @@
+config BR2_PACKAGE_CANOPENTERM
+	bool "canopenterm"
+	depends on BR2_PACKAGE_SDL3_ARCH_SUPPORTS # sdl3
+	depends on BR2_INSTALL_LIBSTDCPP # pocketpy
+	depends on BR2_PACKAGE_LUA
+	depends on BR2_TOOLCHAIN_HAS_THREADS # sdl3
+	depends on BR2_USE_WCHAR # sdl3
+	depends on !BR2_STATIC_LIBS # canvenient, pocketpy and SDL3
+	select BR2_PACKAGE_CANVENIENT
+	select BR2_PACKAGE_CJSON
+	select BR2_PACKAGE_INIH
+	select BR2_PACKAGE_ISOCLINE
+	select BR2_PACKAGE_POCKETPY
+	select BR2_PACKAGE_READLINE
+	select BR2_PACKAGE_SDL3
+	help
+	  CANopenTerm is an open-source tool for developing,
+	  testing, and analyzing CANopen CC networks and
+	  devices.
+
+	  https://github.com/CANopenTerm/CANopenTerm
+
+comment "canopenterm needs a toolchain w/ C++, threads, wchar, dynamic library"
+	depends on BR2_PACKAGE_SDL3_ARCH_SUPPORTS
+	depends on BR2_PACKAGE_LUA
+	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS \
+		|| !BR2_USE_WCHAR || BR2_STATIC_LIBS
diff --git a/package/canopenterm/canopenterm.hash b/package/canopenterm/canopenterm.hash
new file mode 100644
index 000000000000..625853c2ada9
--- /dev/null
+++ b/package/canopenterm/canopenterm.hash
@@ -0,0 +1,3 @@
+# Locally computed
+sha256  46180a190bc64d3ca8779cdaf7855667c847ee6f51551a957c5bccd1287b1445  canopenterm-2.03.tar.gz
+sha256  8c1f56d8bea303fb856c0bf7a63cbb91e81e2441bba1bb9fd8a314909b0e10b3  LICENSE.md
diff --git a/package/canopenterm/canopenterm.mk b/package/canopenterm/canopenterm.mk
new file mode 100644
index 000000000000..931e8aa2c140
--- /dev/null
+++ b/package/canopenterm/canopenterm.mk
@@ -0,0 +1,29 @@
+################################################################################
+#
+# canopenterm
+#
+################################################################################
+
+CANOPENTERM_VERSION = 2.03
+CANOPENTERM_SITE = $(call github,CANopenTerm,CANopenTerm,v$(CANOPENTERM_VERSION))
+CANOPENTERM_LICENSE = MIT
+CANOPENTERM_LICENSE_FILES = LICENSE.md
+CANOPENTERM_DEPENDENCIES = \
+	canvenient \
+	cjson \
+	inih \
+	isocline \
+	lua \
+	pocketpy \
+	readline \
+	sdl3
+
+# CANopenTerm sets CMAKE_RUNTIME_OUTPUT_DIRECTORY_<CONFIG> to its "export"
+# sub-directory, while the install rules look for the executables in
+# CMAKE_BINARY_DIR. Pass a fake build type so that the per-configuration
+# output directory is not applied and both agree again.
+CANOPENTERM_CONF_OPTS = \
+	-DCMAKE_BUILD_TYPE=Buildroot \
+	-DUSE_SYSTEM_LIBS=ON
+
+$(eval $(cmake-package))
-- 
2.43.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.