[Buildroot] [PATCH v6 4/6] package/isocline: new package
Dario Binacchi <[email protected]>
| Newsgroups | net.busybox.buildroot |
|---|---|
| Message-ID | <[email protected]> |
Isocline is a pure C library that can be used as an alternative to the GNU readline library. Project page: https://github.com/daanx/isocline Signed-off-by: Dario Binacchi <[email protected]> --- DEVELOPERS | 1 + package/Config.in | 1 + ...nly-require-CXX-compiler-when-needed.patch | 55 +++++++++++++++++++ package/isocline/Config.in | 9 +++ package/isocline/isocline.hash | 3 + package/isocline/isocline.mk | 21 +++++++ 6 files changed, 90 insertions(+) create mode 100644 package/isocline/0001-Only-require-CXX-compiler-when-needed.patch create mode 100644 package/isocline/Config.in create mode 100644 package/isocline/isocline.hash create mode 100644 package/isocline/isocline.mk diff --git a/DEVELOPERS b/DEVELOPERS index 5eb438906f1b..2de3312fe9c8 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -826,6 +826,7 @@ F: package/drogon/ F: package/empty/ F: package/iana-assignments/ F: package/inih/ +F: package/isocline/ F: package/less/ F: package/libgphoto2/ F: package/pocketpy/ diff --git a/package/Config.in b/package/Config.in index 6058800682b4..7ae097582e3c 100644 --- a/package/Config.in +++ b/package/Config.in @@ -2331,6 +2331,7 @@ menu "Text and terminal handling" source "package/icu/Config.in" source "package/inih/Config.in" source "package/iniparser/Config.in" + source "package/isocline/Config.in" source "package/libcli/Config.in" source "package/libecoli/Config.in" source "package/libedit/Config.in" diff --git a/package/isocline/0001-Only-require-CXX-compiler-when-needed.patch b/package/isocline/0001-Only-require-CXX-compiler-when-needed.patch new file mode 100644 index 000000000000..ddc150b42136 --- /dev/null +++ b/package/isocline/0001-Only-require-CXX-compiler-when-needed.patch @@ -0,0 +1,55 @@ +From a811b3dc38d296b5e4dc76ab2b932cf196795d47 Mon Sep 17 00:00:00 2001 +From: Dario Binacchi <[email protected]> +Date: Sat, 22 Aug 2026 16:58:05 +0200 +Subject: [PATCH] Only require CXX compiler when needed + +isocline is a pure C library and only requires a C++ compiler when +IC_USE_CXX=ON. + +Unconditionally enabling CXX in project() makes the configure step fail +for C-only toolchains. This was exposed while integrating isocline into +Buildroot by running: + + $ utils/test-pkg -p isocline -T br-arm-basic + +which fails during the CMake configure step with: + + -- Check for working CXX compiler: /bin/false - broken + CMake Error at CMakeTestCXXCompiler.cmake:60 (message): + The C++ compiler "/bin/false" is not able to compile a simple test + program. + Call Stack (most recent call first): + CMakeLists.txt:5 (project) + +Do not enable CXX in project() unless IC_USE_CXX=ON. + +Signed-off-by: Dario Binacchi <[email protected]> +Upstream: https://github.com/daanx/isocline/pull/54 +--- + CMakeLists.txt | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 11aff09bba58..a679098c97f7 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -2,7 +2,7 @@ + # Copyright (c) 2021, Daan Leijen + # ----------------------------------------------------------------------------- + cmake_minimum_required(VERSION 3.10) +-project(libisocline C CXX ASM) ++project(libisocline C ASM) + + set(CMAKE_C_STANDARD 99) + set(CMAKE_CXX_STANDARD 11) +@@ -44,6 +44,7 @@ if(IC_SEPARATE_OBJS) + endif() + + if(IC_USE_CXX) ++ enable_language(CXX) + set(IC_COMPILER_ID "${CMAKE_CXX_COMPILER_ID}") + set_source_files_properties(${ic_sources} PROPERTIES LANGUAGE CXX ) + set_source_files_properties(${ic_example_sources} PROPERTIES LANGUAGE CXX ) +-- +2.43.0 + diff --git a/package/isocline/Config.in b/package/isocline/Config.in new file mode 100644 index 000000000000..b58c2b22a866 --- /dev/null +++ b/package/isocline/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_ISOCLINE + bool "isocline" + help + Isocline is a pure C library that can be used as an + alternative to the GNU readline library. It provides + multi-line editing, history, completion and syntax + highlighting. + + https://github.com/daanx/isocline diff --git a/package/isocline/isocline.hash b/package/isocline/isocline.hash new file mode 100644 index 000000000000..3eeb187cc3a5 --- /dev/null +++ b/package/isocline/isocline.hash @@ -0,0 +1,3 @@ +# Locally computed +sha256 cd9e32618267c282599ff409015e22cfc6654f6e27e229d75f3e212029666d39 isocline-1.0.9.tar.gz +sha256 60c6b0415a2e0afa8e65630a980b64b4df09cde910e44481a1b0946ebfc840e4 LICENSE diff --git a/package/isocline/isocline.mk b/package/isocline/isocline.mk new file mode 100644 index 000000000000..96b8e916b3f2 --- /dev/null +++ b/package/isocline/isocline.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# isocline +# +################################################################################ + +ISOCLINE_VERSION = 1.0.9 +ISOCLINE_SITE = $(call github,daanx,isocline,v$(ISOCLINE_VERSION)) +ISOCLINE_LICENSE = MIT +ISOCLINE_LICENSE_FILES = LICENSE +ISOCLINE_INSTALL_STAGING = YES +ISOCLINE_INSTALL_TARGET = NO + +define ISOCLINE_INSTALL_STAGING_CMDS + $(INSTALL) -D -m 0644 $(@D)/libisocline.a \ + $(STAGING_DIR)/usr/lib/libisocline.a + $(INSTALL) -D -m 0644 $(@D)/include/isocline.h \ + $(STAGING_DIR)/usr/include/isocline.h +endef + +$(eval $(cmake-package)) -- 2.43.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot