kumquat-buildroot/package/htop/htop.mk
Fabrice Fontaine 8866d747cd package/htop: fix uclibc build without wchar
Fix the following uclibc build failure without wchar raised since bump
to version 3.2.0 in commit b054353e59:

configure:5351: checking for /nvmedata/autobuild/instance-0/output-1/host/bin/i586-buildroot-linux-uclibc-gcc option to accept ISO C99
configure:5500: /nvmedata/autobuild/instance-0/output-1/host/bin/i586-buildroot-linux-uclibc-gcc  -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os -g1  -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5
conftest.c:70:9: error: unknown type name 'wchar_t'
   70 |   const wchar_t *name;
      |         ^~~~~~~

[...]

configure: error: htop is written in C99. A newer compiler is required.

Fixes:
 - http://autobuild.buildroot.org/results/795bb4ae4f1a725c56353915c21fa784ca547c59

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2022-05-12 10:41:53 +02:00

48 lines
1.3 KiB
Makefile

################################################################################
#
# htop
#
################################################################################
HTOP_VERSION = 3.2.0
HTOP_SOURCE = htop-$(HTOP_VERSION).tar.xz
HTOP_SITE = https://github.com/htop-dev/htop/releases/download/$(HTOP_VERSION)
HTOP_DEPENDENCIES = ncurses
# Prevent htop build system from searching the host paths
HTOP_CONF_ENV = HTOP_NCURSES_CONFIG_SCRIPT=$(STAGING_DIR)/usr/bin/$(NCURSES_CONFIG_SCRIPTS)
HTOP_LICENSE = GPL-2.0+
HTOP_LICENSE_FILES = COPYING
# ac_cv_prog_cc_c99 is required for BR2_USE_WCHAR=n because the C99 test
# provided by autoconf relies on wchar_t.
HTOP_CONF_ENV += ac_cv_prog_cc_c99=-std=gnu99
ifeq ($(BR2_PACKAGE_HWLOC),y)
HTOP_CONF_OPTS += --enable-hwloc
HTOP_DEPENDENCIES += hwloc
else
HTOP_CONF_OPTS += --disable-hwloc
endif
ifeq ($(BR2_PACKAGE_LIBCAP),y)
HTOP_CONF_OPTS += --enable-capabilities
HTOP_DEPENDENCIES += libcap
else
HTOP_CONF_OPTS += --disable-capabilities
endif
ifeq ($(BR2_PACKAGE_LM_SENSORS),y)
HTOP_CONF_OPTS += --enable-sensors
HTOP_DEPENDENCIES += lm-sensors
else
HTOP_CONF_OPTS += --disable-sensors
endif
ifeq ($(BR2_PACKAGE_NCURSES_WCHAR),y)
HTOP_CONF_OPTS += --enable-unicode
else
HTOP_CONF_OPTS += --disable-unicode
endif
$(eval $(autotools-package))