Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/sqlite: fix configure options for readline/editline support
@ 2025-02-14  2:14 Scott Fan
  2025-02-14  7:42 ` [Buildroot] [PATCH v2] " Scott Fan
  0 siblings, 1 reply; 6+ messages in thread
From: Scott Fan @ 2025-02-14  2:14 UTC (permalink / raw)
  To: buildroot; +Cc: Scott Fan, Bernd Kuhls

The autosetup script will skip checking for readline.h when cross-compiling,
which will cause line-editing support for the sqlite3 shell to always be "none".

In this case, if the --editline option is provided, an error will be reported:
ERROR: Explicit --editline failed to find a matching library.

We can use the --with-readline-cflags option to tell autosetup where to
search for the readline.h file to avoid the disabled behavior.

In addition, the libedit package actually depends on the ncurses package,
just like the readline package. So when using the libedit package,
also add the ncurses dependency.

In addition, there is no need to pass the --disable-readline option when
the --editline option is passed.

Signed-off-by: Scott Fan <fancp2007@gmail.com>
---
 package/sqlite/sqlite.mk | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/package/sqlite/sqlite.mk b/package/sqlite/sqlite.mk
index 5a8b033ce0..d3b69f2a93 100644
--- a/package/sqlite/sqlite.mk
+++ b/package/sqlite/sqlite.mk
@@ -44,9 +44,11 @@ endif
 
 ifeq ($(BR2_PACKAGE_NCURSES)$(BR2_PACKAGE_READLINE),yy)
 SQLITE_DEPENDENCIES += ncurses readline
-else ifeq ($(BR2_PACKAGE_LIBEDIT),y)
-SQLITE_DEPENDENCIES += libedit
-SQLITE_CONF_OPTS += --disable-readline --editline
+SQLITE_CONF_OPTS += --with-readline-cflags=-I$(STAGING_DIR)/usr/include
+else ifeq ($(BR2_PACKAGE_NCURSES)$(BR2_PACKAGE_LIBEDIT),yy)
+SQLITE_DEPENDENCIES += ncurses libedit
+SQLITE_CONF_OPTS += --with-readline-cflags=-I$(STAGING_DIR)/usr/include
+SQLITE_CONF_OPTS += --editline
 else
 SQLITE_CONF_OPTS += --disable-readline
 endif
-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-02-17  2:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-14  2:14 [Buildroot] [PATCH] package/sqlite: fix configure options for readline/editline support Scott Fan
2025-02-14  7:42 ` [Buildroot] [PATCH v2] " Scott Fan
2025-02-14  8:08   ` Waldemar Brodkorb
2025-02-14  9:32   ` Waldemar Brodkorb
2025-02-15  2:51     ` Scott Fan
2025-02-17  2:47       ` Scott Fan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox