kumquat-buildroot/package/ngrep/ngrep.mk
Fabrice Fontaine 14c0c37eaf package/ngrep: fix build with libnet
Use pkg-config to find libnet and avoid the following build failure
raised since commit 100ba8351c if
libnet-config is found on the host:

/home/autobuild/autobuild/instance-4/output-1/host/bin/mips64el-buildroot-linux-gnu-gcc -s -o ngrep ngrep.o  tcpkill.o   -lpcap -lnet   -lpcre -L/usr/lib -lnet
mips64el-buildroot-linux-gnu-gcc: ERROR: unsafe header/library path used in cross-compilation: '-L/usr/lib'

While at it, format Upstream tag of other patches

Fixes:
 - http://autobuild.buildroot.org/results/05c916162b9c1027cf53f1699a1f5653151098ed

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2024-02-05 18:48:08 +01:00

35 lines
921 B
Makefile

################################################################################
#
# ngrep
#
################################################################################
NGREP_VERSION = 1.47
NGREP_SITE = $(call github,jpr5,ngrep,$(subst .,_,V$(NGREP_VERSION)))
NGREP_LICENSE = BSD-4-Clause-like, BSD-3-Clause (tcpkill)
NGREP_LICENSE_FILES = LICENSE
NGREP_INSTALL_STAGING = YES
# We're patching configure.in
NGREP_AUTORECONF = YES
ifeq ($(BR2_STATIC_LIBS),y)
NGREP_CONF_ENV += LIBS=`$(STAGING_DIR)/usr/bin/pcap-config --static --additional-libs`
endif
NGREP_CONF_OPTS = \
--with-pcap-includes=$(STAGING_DIR)/usr/include/pcap \
--enable-pcre \
--disable-dropprivs \
--disable-pcap-restart
NGREP_DEPENDENCIES = host-pkgconf libpcap pcre
ifeq ($(BR2_PACKAGE_LIBNET),y)
NGREP_DEPENDENCIES += libnet
NGREP_CONF_OPTS += --enable-tcpkill
else
NGREP_CONF_OPTS += --disable-tcpkill
endif
$(eval $(autotools-package))