diff mbox series

[1/2] package/util-linux: explicit slang dependency fallback for cfdisk

Message ID CYYP221MB114031C1D7D4EB72E8EDBE56A04C2@CYYP221MB1140.NAMP221.PROD.OUTLOOK.COM
State New
Headers show
Series [1/2] package/util-linux: explicit slang dependency fallback for cfdisk | expand

Commit Message

James Knight Feb. 16, 2024, 5:57 a.m. UTC
The cfdisk utility (under `fdisks`; defaulted by `all-programs`)
provides TUI capabilities from either using ncurses or slang. This
package provides explicit configuration of enabling ncurses support, but
not for slang. Updating the package to explicitly enable slang support
if the slang package is available and we are not already using ncurses.

Signed-off-by: James Knight <james.d.knight@live.com>
---
 package/util-linux/util-linux.mk | 8 ++++++++
 1 file changed, 8 insertions(+)
diff mbox series

Patch

diff --git a/package/util-linux/util-linux.mk b/package/util-linux/util-linux.mk
index 72126adb005f8422a19ec303897b732f86dd22d2..8a162f179cf332b9d1bab8b42a5f6e6e652b2942 100644
--- a/package/util-linux/util-linux.mk
+++ b/package/util-linux/util-linux.mk
@@ -96,6 +96,14 @@  endif
 UTIL_LINUX_CONF_OPTS += --without-ncursesw --without-ncurses
 endif
 
+# if ncurses is not available for cfdisk, try to fallback onto slang
+ifeq ($(BR2_PACKAGE_SLANG)x$(BR2_PACKAGE_NCURSES),yx)
+UTIL_LINUX_DEPENDENCIES += slang
+UTIL_LINUX_CONF_OPTS += --with-slang
+else
+UTIL_LINUX_CONF_OPTS += --without-slang
+endif
+
 # workaround for static_assert on uclibc-ng < 1.0.42
 UTIL_LINUX_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -Dstatic_assert=_Static_assert"