Skip to contentSkip to conversation

htop: enable unicode if possible

PATCH New Jérôme Pouiller 2 participants 2 messages Nov 14, 2016 – Nov 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 htop: enable unicode if possible

---
 package/htop/htop.mk | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

v2:
- explicitily enable unicode

package/htop/htop.mk +6 -1
index 7409a78..af0f66b 100644
@@ -7,10 +7,15 @@
 HTOP_VERSION = 2.0.2
 HTOP_SITE = http://hisham.hm/htop/releases/$(HTOP_VERSION)
 HTOP_DEPENDENCIES = ncurses
-HTOP_CONF_OPTS = --disable-unicode
 # Prevent htop build system from searching the host paths
 HTOP_CONF_ENV = HTOP_NCURSES_CONFIG_SCRIPT=$(STAGING_DIR)/usr/bin/ncurses5-config
 HTOP_LICENSE = GPLv2
 HTOP_LICENSE_FILES = COPYING
 
+ifeq ($(BR2_PACKAGE_NCURSES_WCHAR),)
+HTOP_CONF_OPTS = --disable-unicode
+else
+HTOP_CONF_OPTS = --enable-unicode
+endif
+
 $(eval $(autotools-package))
Signature · 1 line
2.9.3
#1 lore raw

PATCH v2 1/1 htop: enable unicode if possible

Hello,

Quoted 1 line · J?r?me Pouiller

+ifeq ($(BR2_PACKAGE_NCURSES_WCHAR),)

You should have used positive logic instead:

ifeq ($(BR2_PACKAGE_NCURSES_WCHAR),y)
enable feature
else
disable feature
endif

Quoted 1 line

+HTOP_CONF_OPTS = --disable-unicode

You should use += here instead of =, since we are in a condition. This helps avoiding stupid bugs in the future, if additional CONF_OPTS assignments are added earlier in the file.

Applied to next with those two issues fixed.

Thanks,

Thomas

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