[v7,3/5] package/isocline: new package
Commit Message
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 <dario.binacchi@amarulasolutions.com>
---
DEVELOPERS | 1 +
package/Config.in | 1 +
...nly-require-CXX-compiler-when-needed.patch | 55 +++++++++++++++++++
package/isocline/Config.in | 13 +++++
package/isocline/isocline.hash | 3 +
package/isocline/isocline.mk | 14 +++++
6 files changed, 87 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
--
2.43.0
@@ -834,6 +834,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/
@@ -2351,6 +2351,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"
new file mode 100644
@@ -0,0 +1,55 @@
+From a811b3dc38d296b5e4dc76ab2b932cf196795d47 Mon Sep 17 00:00:00 2001
+From: Dario Binacchi <dario.binacchi@amarulasolutions.com>
+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 <dario.binacchi@amarulasolutions.com>
+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
+
new file mode 100644
@@ -0,0 +1,13 @@
+config BR2_PACKAGE_ISOCLINE
+ bool "isocline"
+ depends on !BR2_STATIC_LIBS
+ 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
+
+comment "isocline needs a toolchain w/ dynamic library"
+ depends on BR2_STATIC_LIBS
new file mode 100644
@@ -0,0 +1,3 @@
+# Locally computed
+sha256 1e5f0efa2b719c3e1d292f501e5329e141a039deefc801099f8bbb9a50255531 isocline-1.1.0.tar.gz
+sha256 60c6b0415a2e0afa8e65630a980b64b4df09cde910e44481a1b0946ebfc840e4 LICENSE
new file mode 100644
@@ -0,0 +1,14 @@
+################################################################################
+#
+# isocline
+#
+################################################################################
+
+ISOCLINE_VERSION = 1.1.0
+ISOCLINE_SITE = $(call github,daanx,isocline,v$(ISOCLINE_VERSION))
+ISOCLINE_LICENSE = MIT
+ISOCLINE_LICENSE_FILES = LICENSE
+ISOCLINE_INSTALL_STAGING = YES
+ISOCLINE_CONF_OPTS = -DIC_BUILD_TESTS=OFF
+
+$(eval $(cmake-package))