diff options
author | Rosen Penev <rosenp@gmail.com> | 2020-12-14 17:56:18 -0800 |
---|---|---|
committer | Petr Štetiar <ynezz@true.cz> | 2020-12-22 18:59:10 +0100 |
commit | 6a1ad19cd3659b8df386ef8d7d2f9680bf749558 (patch) | |
tree | c8872ed612c69bd217d108955112b9da906f912d /package | |
parent | 2a92754ce92e8e360f3a452ffbe738f6f8957290 (diff) | |
download | upstream-6a1ad19cd3659b8df386ef8d7d2f9680bf749558.tar.gz upstream-6a1ad19cd3659b8df386ef8d7d2f9680bf749558.tar.bz2 upstream-6a1ad19cd3659b8df386ef8d7d2f9680bf749558.zip |
tcpdump: fix pcap-config issues
The patch removes a libpcap check to avoid a problem with libpcap. Fix
libpcap instead.
Modernize Makefile:
Use a normal autoconf bool instead of checking for CONFIG_IPV6.
Remove old configure and MAKE_FLAGS hacks. Removing them results in
compilation continuing to work without a problem.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Diffstat (limited to 'package')
-rw-r--r-- | package/network/utils/tcpdump/Makefile | 27 | ||||
-rw-r--r-- | package/network/utils/tcpdump/patches/002-remove_static_libpcap_check.patch | 92 |
2 files changed, 4 insertions, 115 deletions
diff --git a/package/network/utils/tcpdump/Makefile b/package/network/utils/tcpdump/Makefile index 3e4d9d2d73..f333cf98d2 100644 --- a/package/network/utils/tcpdump/Makefile +++ b/package/network/utils/tcpdump/Makefile @@ -9,20 +9,19 @@ include $(TOPDIR)/rules.mk PKG_NAME:=tcpdump PKG_VERSION:=4.9.3 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://www.us.tcpdump.org/release/ \ http://www.tcpdump.org/release/ PKG_HASH:=2cd47cb3d460b6ff75f4a9940f594317ad456cfbf2bd2c8e5151e16559db6410 -PKG_BUILD_PARALLEL:=1 - PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name> PKG_LICENSE:=BSD-3-Clause PKG_CPE_ID:=cpe:/a:tcpdump:tcpdump PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk @@ -47,36 +46,18 @@ endef CONFIGURE_ARGS += \ --without-cap-ng \ - --without-crypto - -ifeq ($(CONFIG_IPV6),y) -CONFIGURE_ARGS += \ - --enable-ipv6 -endif + --without-crypto \ + $(call autoconf_bool,CONFIG_IPV6,ipv6) TARGET_CFLAGS += -ffunction-sections -fdata-sections TARGET_LDFLAGS += -Wl,--gc-sections -CONFIGURE_VARS += \ - BUILD_CC="$(TARGET_CC)" \ - HOSTCC="$(HOSTCC)" \ - td_cv_buggygetaddrinfo="no" \ - ac_cv_linux_vers=$(LINUX_VERSION) \ - ac_cv_header_rpc_rpcent_h=no \ - ac_cv_lib_rpc_main=no \ - ac_cv_path_PCAP_CONFIG="" - -MAKE_FLAGS := - ifeq ($(BUILD_VARIANT),mini) TARGET_CFLAGS += -DTCPDUMP_MINI CONFIGURE_ARGS += --disable-smb MAKE_FLAGS += TCPDUMP_MINI=1 endif -MAKE_FLAGS += \ - CCOPT="$(TARGET_CFLAGS)" INCLS="-I. $(TARGET_CPPFLAGS)" - define Package/tcpdump/install $(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/tcpdump $(1)/usr/sbin/ diff --git a/package/network/utils/tcpdump/patches/002-remove_static_libpcap_check.patch b/package/network/utils/tcpdump/patches/002-remove_static_libpcap_check.patch deleted file mode 100644 index fdebfcc6d8..0000000000 --- a/package/network/utils/tcpdump/patches/002-remove_static_libpcap_check.patch +++ /dev/null @@ -1,92 +0,0 @@ ---- a/configure -+++ b/configure -@@ -5395,37 +5395,6 @@ $as_echo "Using $pfopen" >&6; } - LIBS="$LIBS $pfopen" - fi - fi -- libpcap=FAIL -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for local pcap library" >&5 --$as_echo_n "checking for local pcap library... " >&6; } -- --# Check whether --with-system-libpcap was given. --if test "${with_system_libpcap+set}" = set; then : -- withval=$with_system_libpcap; --fi -- -- if test "x$with_system_libpcap" != xyes ; then -- lastdir=FAIL -- places=`ls $srcdir/.. | sed -e 's,/$,,' -e "s,^,$srcdir/../," | \ -- egrep '/libpcap-[0-9]+\.[0-9]+(\.[0-9]*)?([ab][0-9]*|-PRE-GIT)?$'` -- places2=`ls .. | sed -e 's,/$,,' -e "s,^,../," | \ -- egrep '/libpcap-[0-9]+\.[0-9]+(\.[0-9]*)?([ab][0-9]*|-PRE-GIT)?$'` -- for dir in $places $srcdir/../libpcap ../libpcap $srcdir/libpcap $places2 ; do -- basedir=`echo $dir | sed -e 's/[ab][0-9]*$//' | \ -- sed -e 's/-PRE-GIT$//' ` -- if test $lastdir = $basedir ; then -- continue; -- fi -- lastdir=$dir -- if test -r $dir/libpcap.a ; then -- libpcap=$dir/libpcap.a -- d=$dir -- fi -- done -- fi -- if test $libpcap = FAIL ; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 --$as_echo "not found" >&6; } - - # - # Look for pcap-config. -@@ -5581,51 +5550,6 @@ if test "x$ac_cv_lib_pcap_main" = xyes; - libpcap="-lpcap" - fi - -- if test $libpcap = FAIL ; then -- as_fn_error $? "see the INSTALL doc for more info" "$LINENO" 5 -- fi -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extraneous pcap header directories" >&5 --$as_echo_n "checking for extraneous pcap header directories... " >&6; } -- if test \( ! -r /usr/local/include/pcap.h \) -a \ -- \( ! -r /usr/include/pcap.h \); then -- if test -r /usr/local/include/pcap/pcap.h; then -- d="/usr/local/include/pcap" -- elif test -r /usr/include/pcap/pcap.h; then -- d="/usr/include/pcap" -- fi -- fi -- if test -z "$d" ; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 --$as_echo "not found" >&6; } -- else -- V_INCLS="-I$d $V_INCLS" -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: found -- -I$d added" >&5 --$as_echo "found -- -I$d added" >&6; } -- fi -- fi -- else -- V_PCAPDEP=$libpcap -- places=`ls $srcdir/.. | sed -e 's,/$,,' -e "s,^,$srcdir/../," | \ -- egrep '/libpcap-[0-9]*.[0-9]*(.[0-9]*)?([ab][0-9]*)?$'` -- places2=`ls .. | sed -e 's,/$,,' -e "s,^,../," | \ -- egrep '/libpcap-[0-9]*.[0-9]*(.[0-9]*)?([ab][0-9]*)?$'` -- pcapH=FAIL -- if test -r $d/pcap.h; then -- pcapH=$d -- else -- for dir in $places $srcdir/../libpcap ../libpcap $srcdir/libpcap $places2 ; do -- if test -r $dir/pcap.h ; then -- pcapH=$dir -- fi -- done -- fi -- -- if test $pcapH = FAIL ; then -- as_fn_error $? "cannot find pcap.h: see INSTALL" "$LINENO" 5 -- fi -- V_INCLS="-I$pcapH $V_INCLS" -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libpcap" >&5 --$as_echo "$libpcap" >&6; } - # Extract the first word of "pcap-config", so it can be a program name with args. - set dummy pcap-config; ac_word=$2 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |