From 516ec63aca5466fc1d9d1a444f51128dc17a0852 Mon Sep 17 00:00:00 2001 From: Jeroen Roovers Date: Thu, 9 Jan 2020 14:38:41 +0100 Subject: [PATCH] net-analyzer/tcpdump: Prevent more -L/usr/lib injections Package-Manager: Portage-2.3.84, Repoman-2.3.20 Signed-off-by: Jeroen Roovers --- .../tcpdump/files/tcpdump-9999-libdir.patch | 19 +++++++++++++++++++ net-analyzer/tcpdump/tcpdump-9999.ebuild | 8 ++++++-- 2 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 net-analyzer/tcpdump/files/tcpdump-9999-libdir.patch diff --git a/net-analyzer/tcpdump/files/tcpdump-9999-libdir.patch b/net-analyzer/tcpdump/files/tcpdump-9999-libdir.patch new file mode 100644 index 000000000000..852ea6b6c132 --- /dev/null +++ b/net-analyzer/tcpdump/files/tcpdump-9999-libdir.patch @@ -0,0 +1,19 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -371,7 +371,7 @@ + + if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then + if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then +- LIBS="-L$ipv6libdir -l$ipv6lib $LIBS" ++ LIBS="-l$ipv6lib $LIBS" + echo "You have $ipv6lib library, using it" + else + if test "$ipv6trylibc" = "yes"; then +@@ -891,7 +891,6 @@ + # at the front of the header and library search path. + # + CFLAGS="-I$withval/include $CFLAGS" +- LIBS="-L$withval/lib $LIBS" + fi + ],[ + # diff --git a/net-analyzer/tcpdump/tcpdump-9999.ebuild b/net-analyzer/tcpdump/tcpdump-9999.ebuild index 52faf660b30f..a4285888f60c 100644 --- a/net-analyzer/tcpdump/tcpdump-9999.ebuild +++ b/net-analyzer/tcpdump/tcpdump-9999.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -36,10 +36,14 @@ DEPEND=" ${RDEPEND} drop-root? ( virtual/pkgconfig ) test? ( - || ( app-arch/sharutils sys-freebsd/freebsd-ubin ) + >=net-libs/libpcap-1.9.1 dev-lang/perl + || ( app-arch/sharutils sys-freebsd/freebsd-ubin ) ) " +PATCHES=( + "${FILESDIR}"/${PN}-9999-libdir.patch +) pkg_setup() { if use drop-root || use suid; then -- 2.26.2