2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2006-06-23 08:53:28 +02:00
|
|
|
#
|
|
|
|
# lsof
|
|
|
|
#
|
2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2011-10-07 17:25:21 +02:00
|
|
|
|
2019-09-18 17:07:00 +02:00
|
|
|
LSOF_VERSION = 4.93.2
|
|
|
|
LSOF_SITE = $(call github,lsof-org,lsof,$(LSOF_VERSION))
|
2012-11-13 02:05:50 +01:00
|
|
|
LSOF_LICENSE = lsof license
|
|
|
|
# License is repeated in each file, this is a relatively small one.
|
|
|
|
# It is also defined in 00README, but that contains a lot of other cruft.
|
|
|
|
LSOF_LICENSE_FILES = dialects/linux/dproto.h
|
2006-06-23 08:53:28 +02:00
|
|
|
|
2019-09-18 17:07:00 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_LIBTIRPC),y)
|
|
|
|
LSOF_DEPENDENCIES += libtirpc
|
|
|
|
endif
|
|
|
|
|
2009-01-18 15:22:30 +01:00
|
|
|
ifeq ($(BR2_USE_WCHAR),)
|
2010-12-12 22:53:53 +01:00
|
|
|
define LSOF_CONFIGURE_WCHAR_FIXUPS
|
|
|
|
$(SED) 's,^#define[[:space:]]*HASWIDECHAR.*,#undef HASWIDECHAR,' \
|
2010-12-27 15:49:00 +01:00
|
|
|
$(@D)/machine.h
|
2010-12-12 22:53:53 +01:00
|
|
|
endef
|
2006-12-14 00:08:48 +01:00
|
|
|
endif
|
2010-12-12 22:53:53 +01:00
|
|
|
|
2009-01-18 15:22:30 +01:00
|
|
|
ifeq ($(BR2_ENABLE_LOCALE),)
|
2010-12-12 22:53:53 +01:00
|
|
|
define LSOF_CONFIGURE_LOCALE_FIXUPS
|
|
|
|
$(SED) 's,^#define[[:space:]]*HASSETLOCALE.*,#undef HASSETLOCALE,' \
|
2010-12-27 15:49:00 +01:00
|
|
|
$(@D)/machine.h
|
2010-12-12 22:53:53 +01:00
|
|
|
endef
|
2006-12-14 00:08:48 +01:00
|
|
|
endif
|
2006-06-23 08:53:28 +02:00
|
|
|
|
2010-12-12 22:53:53 +01:00
|
|
|
define LSOF_CONFIGURE_CMDS
|
|
|
|
(cd $(@D) ; \
|
2015-04-19 14:40:00 +02:00
|
|
|
echo n | $(TARGET_CONFIGURE_OPTS) DEBUG="$(TARGET_CFLAGS)" \
|
2014-05-14 14:45:08 +02:00
|
|
|
LSOF_INCLUDE="$(STAGING_DIR)/usr/include" LSOF_CFLAGS_OVERRIDE=1 \
|
2019-11-17 14:26:36 +01:00
|
|
|
LINUX_CLIB=-DGLIBCV=2 LSOF_CFGL="$(TARGET_LDFLAGS)" \
|
|
|
|
./Configure linux)
|
2010-12-12 22:53:53 +01:00
|
|
|
$(LSOF_CONFIGURE_WCHAR_FIXUPS)
|
|
|
|
$(LSOF_CONFIGURE_LOCALE_FIXUPS)
|
|
|
|
endef
|
2006-06-23 08:53:28 +02:00
|
|
|
|
2010-12-12 22:53:53 +01:00
|
|
|
define LSOF_BUILD_CMDS
|
2016-10-14 00:13:08 +02:00
|
|
|
$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) DEBUG="$(TARGET_CFLAGS)" -C $(@D)
|
2010-12-12 22:53:53 +01:00
|
|
|
endef
|
2006-06-23 08:53:28 +02:00
|
|
|
|
2010-12-12 22:53:53 +01:00
|
|
|
define LSOF_INSTALL_TARGET_CMDS
|
2014-06-29 17:05:03 +02:00
|
|
|
$(INSTALL) -D -m 755 $(@D)/lsof $(TARGET_DIR)/usr/bin/lsof
|
2010-12-12 22:53:53 +01:00
|
|
|
endef
|
|
|
|
|
2012-07-03 00:07:32 +02:00
|
|
|
$(eval $(generic-package))
|