Patchwork [1/2] nano: enable ncursesw support

login
register
mail settings
Submitter Gustavo Zacarias
Date July 4, 2014, 5:03 p.m.
Message ID <1404493381-24414-2-git-send-email-gustavo@zacarias.com.ar>
Download mbox | patch
Permalink /patch/367145/
State Accepted
Commit 78b30be41d92fd0d60248d54649665fae9087585
Headers show

Comments

Gustavo Zacarias - July 4, 2014, 5:03 p.m.
Enable support for ncurses widechar by specifying the proper
ncursesw-config when it's enabled, otherwise keep the old trick in place
when it's not to avoid automatically picking up the host/distro one.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
 package/nano/nano.mk | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

Patch

diff --git a/package/nano/nano.mk b/package/nano/nano.mk
index 2b6df3a..130fe83 100644
--- a/package/nano/nano.mk
+++ b/package/nano/nano.mk
@@ -9,11 +9,16 @@  NANO_VERSION = $(NANO_VERSION_MAJOR).2
 NANO_SITE = http://www.nano-editor.org/dist/v$(NANO_VERSION_MAJOR)
 NANO_LICENSE = GPLv3+
 NANO_LICENSE_FILES = COPYING
-NANO_MAKE_ENV = CURSES_LIB="-lncurses"
 NANO_CONF_OPT = --without-slang
-NANO_CONF_ENV = ac_cv_prog_NCURSESW_CONFIG=false
 NANO_DEPENDENCIES = ncurses
 
+ifeq ($(BR2_PACKAGE_NCURSES_WCHAR),y)
+	NANO_CONF_ENV += ac_cv_prog_NCURSESW_CONFIG="$(STAGING_DIR)/usr/bin/ncursesw5-config"
+else
+	NANO_CONF_ENV += ac_cv_prog_NCURSESW_CONFIG=false
+	NANO_MAKE_ENV += CURSES_LIB="-lncurses"
+endif
+
 ifeq ($(BR2_PACKAGE_FILE),y)
 	NANO_DEPENDENCIES += file
 else