kumquat-buildroot/package/lsof/lsof.mk
Fabrice Fontaine 5b12863107 package/lsof: fix build without wchar or locale
Fix the following build failure without wchar or locale raised since
bump to version 4.99.3 in commit
1edafc4b48 and
898fe0ecee:

In file included from common.h:42,
                 from misc.c:31:
../machine.h:415:26: fatal error: wctype.h: No such file or directory
  415 | #    define WIDECHARINCL <wctype.h>
      |                          ^

Fixes:
 - http://autobuild.buildroot.org/results/aa98b10e8eff5cc4fd03b4a64224cdfb6a0324a5

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2024-01-05 13:43:19 +01:00

51 lines
1.3 KiB
Makefile

################################################################################
#
# lsof
#
################################################################################
LSOF_VERSION = 4.99.3
LSOF_SITE = $(call github,lsof-org,lsof,$(LSOF_VERSION))
LSOF_LICENSE = lsof license
LSOF_LICENSE_FILES = COPYING
LSOF_CPE_ID_VENDOR = lsof_project
ifeq ($(BR2_PACKAGE_LIBTIRPC),y)
LSOF_DEPENDENCIES += libtirpc
endif
ifeq ($(BR2_USE_WCHAR),)
define LSOF_CONFIGURE_WCHAR_FIXUPS
$(SED) 's,^#[[:space:]]*define HASWIDECHAR.*,#undef HASWIDECHAR,' \
$(@D)/machine.h
endef
endif
ifeq ($(BR2_ENABLE_LOCALE),)
define LSOF_CONFIGURE_LOCALE_FIXUPS
$(SED) 's,^#[[:space:]]*define HASSETLOCALE.*,#undef HASSETLOCALE,' \
$(@D)/machine.h
endef
endif
define LSOF_CONFIGURE_CMDS
(cd $(@D) ; \
echo n | $(TARGET_CONFIGURE_OPTS) DEBUG="$(TARGET_CFLAGS)" \
LSOF_AR="$(TARGET_AR) cr" LSOF_CC="$(TARGET_CC)" \
LSOF_INCLUDE="$(STAGING_DIR)/usr/include" \
LINUX_CLIB=-DGLIBCV=2 LSOF_CFGL="$(TARGET_LDFLAGS)" \
./Configure linux)
$(LSOF_CONFIGURE_WCHAR_FIXUPS)
$(LSOF_CONFIGURE_LOCALE_FIXUPS)
endef
define LSOF_BUILD_CMDS
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
endef
define LSOF_INSTALL_TARGET_CMDS
$(INSTALL) -D -m 755 $(@D)/lsof $(TARGET_DIR)/usr/bin/lsof
endef
$(eval $(generic-package))