Skip to contentSkip to conversation

ncursesw package fixes

PATCH New Gustavo Zacarias 2 participants 4 messages Jul 4, 2014 – Jul 15, 2014

lore
Share & tools
lore
#0 lore raw

cover ncursesw package fixes

This series fixes issues with packages when ncurses is built with widechar support. This depends on the not-yet-applied patch from Jeremy Kerr [package/ncurses: Allow building wide char support] to be of any real use, however they shouldn't break anything if that's not applied since the conditions are the same for ncurses without wchar.

Gustavo Zacarias (2):
nano: enable ncursesw support
statserial: don't link against legacy curses

 package/nano/nano.mk                                |  9 +++++++--
 package/statserial/statserial-01-ncurses-link.patch | 16 ++++++++++++++++
 2 files changed, 23 insertions(+), 2 deletions(-)
 create mode 100644 package/statserial/statserial-01-ncurses-link.patch
Signature · 1 line
1.8.5.5
#1 lore raw

PATCH 1/2 nano: enable ncursesw support

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.

---
 package/nano/nano.mk | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
package/nano/nano.mk +7 -2
index 2b6df3a..130fe83 100644
@@ -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
Signature · 1 line
1.8.5.5
#2 lore raw

PATCH 2/2 statserial: don't link against legacy curses

In reply to Gustavo Zacarias

Link against libncurses instead of the legacy libcurses.

---
 package/statserial/statserial-01-ncurses-link.patch | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
 create mode 100644 package/statserial/statserial-01-ncurses-link.patch
package/statserial/statserial-01-ncurses-link.patch new file +16 -0
new file mode 100644
index 0000000..b1c41e6
@@ -0,0 +1,16 @@
+Link to libncurses instead of the legacy libcurses.
+
+Signed-off-by: Gustavo Zacarias <[email protected]>
+
+diff -Nura statserial-1.1.orig/Makefile statserial-1.1/Makefile
+--- statserial-1.1.orig/Makefile	2014-07-04 12:47:41.279440415 -0300
++++ statserial-1.1/Makefile	2014-07-04 12:47:47.948665740 -0300
+@@ -10,7 +10,7 @@
+ LDFLAGS = -s -N
+ 
+ statserial:	statserial.o
+-	$(LD) $(LDFLAGS) -o statserial statserial.o -lcurses
++	$(LD) $(LDFLAGS) -o statserial statserial.o -lncurses
+ 
+ statserial.o: statserial.c
+ 	$(CC) $(CFLAGS) -c statserial.c
Signature · 1 line
1.8.5.5
#3 lore raw

PATCH 2/2 statserial: don't link against legacy curses

Dear Gustavo Zacarias,

Quoted 7 lines · Gustavo Zacarias

Link against libncurses instead of the legacy libcurses.

---
 package/statserial/statserial-01-ncurses-link.patch | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
 create mode 100644 package/statserial/statserial-01-ncurses-link.patch

Applied, thanks. I was going to say "and please send upstream", but then I realized that there is pretty no upstream for statserial...

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com