summaryrefslogtreecommitdiff
path: root/net-libs/libpcap
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-08-27 08:53:43 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-08-27 08:53:43 +0100
commit4e6378ddac49b7268b7ab55d1f5900b2a6d81923 (patch)
tree89a507d970d870a55f81f8d959fb44818f9fa387 /net-libs/libpcap
parentf1aa825b8483db57bf28d0772acfa10aeebe83c3 (diff)
gentoo auto-resync : 27:08:2022 - 08:53:43
Diffstat (limited to 'net-libs/libpcap')
-rw-r--r--net-libs/libpcap/Manifest5
-rw-r--r--net-libs/libpcap/files/libpcap-1.10.1-pcap-config-no-hardcoded-lib.patch100
-rw-r--r--net-libs/libpcap/files/libpcap-1.10.1-pcap-config.patch43
-rw-r--r--net-libs/libpcap/libpcap-1.10.1-r2.ebuild103
-rw-r--r--net-libs/libpcap/libpcap-9999.ebuild11
5 files changed, 256 insertions, 6 deletions
diff --git a/net-libs/libpcap/Manifest b/net-libs/libpcap/Manifest
index 880c3b83f559..36c278f1267d 100644
--- a/net-libs/libpcap/Manifest
+++ b/net-libs/libpcap/Manifest
@@ -1,8 +1,11 @@
AUX libpcap-1.10.0-usbmon.patch 620 BLAKE2B 463f446051bd6df5afd679ee95c13792ab4ce1962cd8cd1de7acfc1c40c887741ee0a8a5725566781833711e4c8286942ba6e0fb2ee262e2177df82f2175942d SHA512 77fc6eb400bbf265ed1290bead8c317bdcdbeaf5a73aacfd95c3a1e77dfe8d5a33dfe49043462051552e3550273219b10939fc2cf4eda7298317c7b4490428ea
+AUX libpcap-1.10.1-pcap-config-no-hardcoded-lib.patch 3469 BLAKE2B 2a2f0b6080aa18eb4b9c32d44ee69ee07796162a6807dae797a759638a23749686aa3267e9c54c67490abfcf3e62cb11ddb5b55857405876ca91c4d0c251bee6 SHA512 f7535ff14fd83529240c54af182f871415408241e7da083dfb8156600d49d8919ecd635969fe46e7b0b646c881d6c9fbf34de656eb30141cf4138b410f244544
+AUX libpcap-1.10.1-pcap-config.patch 1000 BLAKE2B f870610ab0260cfcdd0333769744792e431eb36fdd27befb2f88ed001597b690e3776389f6dc03a9b7ae2b732855e8fa997d609d0517427c2a4060793996c889 SHA512 36d1694e09bba04d0417ff906153d43e54b13eca910e5e694e7acd6989c48067164f889a1b540c197331af52fe894e125f7c640418603a6b5a0d2ef543af348d
AUX libpcap-1.9.1-pcap-config.patch 1005 BLAKE2B 27f06af3f6634e25bc7eb017923a174191e13d28658e380baa2d48f828736a0ff176de4b5fdaa7c0bf42c36509dfffd0c6d49cec45669d03201fad8efaf90c75 SHA512 57f51c1f2fc093bacf43a96c7156e82946a3f11025b3afe3c24c2704fb4a9a7750e0526d41a17d52d649f55b44d642d5daa3a76f0ae18aaca582591f20acd1c1
AUX libpcap-9999-prefix-darwin.patch 358 BLAKE2B cd2d0dc64fa49fa91451fb668a85684770d43cea038cd59d6e6e6b6b59e29fe258741ecb2aa8bca5621a4042b786ac5944700df40d6d52cb25fdb7fff27f713f SHA512 c3b3d90ad0641bec86bbd8a07e4eb35dc49a6b9f99bf5cccdb6b9134b75e9e6b78649073e69291683de581d1b40ba8c3079a86ec7a621a1fcf33f8a1cf818f75
DIST libpcap-1.10.1-upstream.tar.gz 935221 BLAKE2B 0ec028e5d026a97b92ba6f23f88daf36b827eee08a752a0162fbabd1b5a2a70141ec403b6ff26dc3eb25ca5c6630c9c2f60f05b33161770da3d5e829c4eecdc6 SHA512 56c314f19c2b857742bf8abcb1e78066986aaa95cec339b75a3c8b70a9fa2b5167da98708352f9ec97a1cea2700cfb4e040bda108d58ac46cec9b7deab88d171
DIST libpcap-1.10.1-upstream.tar.gz.sig 442 BLAKE2B b76bf3c40a923b6c8fb9a356dff49a90e30dd0b0d785f138ac56bf1a41ad3a6fcfa3d5b3d28c12543857c5616b8938108b06313e35e4474d50991b72d9d371c8 SHA512 f9807efd11d99524b247981e5f4f02e1ffbeaa8468a9a22c66f9931a894071b9182164807b9fd11436883d36e8b0c6cc62302852005d958e34b5236e20caa33d
EBUILD libpcap-1.10.1-r1.ebuild 2487 BLAKE2B dff3af931798b6de5d6fa4325c1eb362d6d6c79d910f284c059236e672ade262f6de1bbbbda830c6f13f47f31884479b246c24c3da6df2236fa38d560f70ce96 SHA512 c7cf0d1332f65954366fd4a14067b6627565f14af7a86b9b2334e6765772272f3ef47061507682a8676aa48903c85e46012493c5e9475b45b4a08e4999da4899
-EBUILD libpcap-9999.ebuild 2373 BLAKE2B 74cd2c6e253ebf903e9151bf70f9e0562d94240c7a12a09c31676247d7fc677adb75397eedc9807e91cbe070936752720e6dc164ef57ae91d885c2c271bf8c6b SHA512 bf69c598212fdaeb8bfefab6e5d7a9c247167d3cb5bb497492bd546e736509c499a4344ef530d4b2251e6043f2e8f0e0435b135749190543ea501fab0b43bdd9
+EBUILD libpcap-1.10.1-r2.ebuild 2768 BLAKE2B bd1310a8fa026212de5e325e4939ee60044370e344fb4e3bcde4bf3de945d39c2a81f36db3543ca7299bd4f30edbdeddace067be99b2719d4fa369970ed36101 SHA512 fd523eb4e368652060596fdc4b9ed8a6620aad6647980394f6756ba08581995bf1c3e330133273667a11b2529dc3b23479e96eab3c1acb35db0fad22ed767190
+EBUILD libpcap-9999.ebuild 2496 BLAKE2B ec766b21401346f6d74cb768d827586654ffe75deb25474e41b2c778b1e467d27883225e6da25863680e637409f7bad5f95d750144b9fea230954901d596982f SHA512 18b9039e663a1f0540bf1697e3b51bac46f4e2edf1e6e99fbb9ea360db62229aa85921f0f34604127618baf0d7dcbbc98362f1cf0cbcf91f93c49144a0fcd68c
MISC metadata.xml 919 BLAKE2B 0d4146081122df26ec1c9ae4f7c66e9f93ef4c25458e0de3489de29bf69a6d428123ab84f4c2fbd0582525ea2197c5cbfc9e2b591459e43eb0e159cf6a684dcc SHA512 0bfdfd1ad64faebc2c122ac029ce5d7b30e84e630ceafd0503f9a659b1781f1c41bf6f0c431ab4f80187ec04506cd32ffc10485d9493cf93e63a466c5db69619
diff --git a/net-libs/libpcap/files/libpcap-1.10.1-pcap-config-no-hardcoded-lib.patch b/net-libs/libpcap/files/libpcap-1.10.1-pcap-config-no-hardcoded-lib.patch
new file mode 100644
index 000000000000..2fc617dcda2f
--- /dev/null
+++ b/net-libs/libpcap/files/libpcap-1.10.1-pcap-config-no-hardcoded-lib.patch
@@ -0,0 +1,100 @@
+https://github.com/the-tcpdump-group/libpcap/commit/84cb8cfdbf99a5fbc8127e3f092dc4d36ab513e9
+
+From 84cb8cfdbf99a5fbc8127e3f092dc4d36ab513e9 Mon Sep 17 00:00:00 2001
+From: Guy Harris <gharris@sonic.net>
+Date: Mon, 2 Aug 2021 01:04:53 -0700
+Subject: [PATCH] pcap-config: don't provide -L/usr/lib for pkg-config --libs.
+
+It shouldn't be necessary, as C compilers generally look there by
+default and...
+
+...it can cause problems if the libpcap you want *isn't* in /usr/lib.
+For example, on some systems that support both 32-bit and 64-bit
+executables, this might cause the 32-bit library to be found, even on
+64-bit platforms, with hilarity ensuing afterwards.
+
+In particular, on Solaris 11, where /usr/lib has the 32-bit libraries
+and /usr/lib/{something} has the 64-bit libraries ({something} depends
+on whether it's SPARC or x86), that's what happens if you try to do a
+CMake build of tcpdump against the system libpcap:
+
+The CMake file for finding pcap converts the -lpcap provided by
+pcap-config into the absolute path of libpcap, and that's the path of
+the 32-bit library, as it looks in /usr/lib. (CMake really wants "find
+library" scripts to supply a list of libraries giving their absolute
+paths.)
+
+Thus, if you're using GCC, the tests done to find out what pcap APIs are
+available will fail, as the test programs get build 64-bit but are
+linked with the 32-bit libpcap; the link fails as you're mixing 32-bit
+and 64-bit code, and the CMake script treats that as meaning "the
+function isn't available".
+
+(Sun C apparently somehow manages either to build 32-bit code by
+default, so that linking with /usr/lib/libpcap.so succeeds, or realizes
+that linking 64-bit code with /usr/lib/{library}.so is bogus and links
+with /usr/lib/{something}/libpcap.so instead.)
+
+Debian removed the -L in pcap-config for similar reasons; to quote the
+comment at the beginning of the patch file:
+
+ Remove -L<libdir> from default pcap-config --libs output, as
+ libdir is already in the default toolchain search path on
+ Debian, and we want the generated script to be arch-independent.
+
+(We don't remove it from the .pc file; we assume that 1) pkg-config and
+2) the packager of libpcap does what is necessary to make this work.)
+--- a/pcap-config.in
++++ b/pcap-config.in
+@@ -41,6 +41,13 @@ do
+ esac
+ shift
+ done
++#
++# If libdir isn't /usr/lib, add it to the link-time linker path.
++#
++if [ "$libdir" != "/usr/lib" ]
++then
++ LPATH=-L$libdir
++fi
+ if [ "$V_RPATH_OPT" != "" ]
+ then
+ #
+@@ -59,16 +66,16 @@ then
+ #
+ if [ "$show_cflags" = 1 -a "$show_libs" = 1 ]
+ then
+- echo "-I$includedir -L$libdir -lpcap $LIBS"
++ echo "-I$includedir $LPATH -lpcap $LIBS"
+ elif [ "$show_cflags" = 1 -a "$show_additional_libs" = 1 ]
+ then
+- echo "-I$includedir -L$libdir $LIBS"
++ echo "-I$includedir $LPATH $LIBS"
+ elif [ "$show_cflags" = 1 ]
+ then
+ echo "-I$includedir"
+ elif [ "$show_libs" = 1 ]
+ then
+- echo "-L$libdir -lpcap $LIBS"
++ echo "$LPATH -lpcap $LIBS"
+ elif [ "$show_additional_libs" = 1 ]
+ then
+ echo "$LIBS"
+@@ -80,7 +87,7 @@ else
+ #
+ if [ "$show_cflags" = 1 -a "$show_libs" = 1 ]
+ then
+- echo "-I$includedir -L$libdir $RPATH -l$PACKAGE_NAME"
++ echo "-I$includedir $LPATH $RPATH -l$PACKAGE_NAME"
+ elif [ "$show_cflags" = 1 -a "$show_additional_libs" = 1 ]
+ then
+ echo "-I$includedir"
+@@ -89,6 +96,6 @@ else
+ echo "-I$includedir"
+ elif [ "$show_libs" = 1 ]
+ then
+- echo "-L$libdir $RPATH -l$PACKAGE_NAME"
++ echo "$LPATH $RPATH -l$PACKAGE_NAME"
+ fi
+ fi
+
diff --git a/net-libs/libpcap/files/libpcap-1.10.1-pcap-config.patch b/net-libs/libpcap/files/libpcap-1.10.1-pcap-config.patch
new file mode 100644
index 000000000000..1fa8d411ead6
--- /dev/null
+++ b/net-libs/libpcap/files/libpcap-1.10.1-pcap-config.patch
@@ -0,0 +1,43 @@
+--- a/pcap-config.in
++++ b/pcap-config.in
+@@ -66,16 +66,16 @@ then
+ #
+ if [ "$show_cflags" = 1 -a "$show_libs" = 1 ]
+ then
+- echo "-I$includedir $LPATH -lpcap $LIBS"
++ echo "-lpcap $LIBS"
+ elif [ "$show_cflags" = 1 -a "$show_additional_libs" = 1 ]
+ then
+- echo "-I$includedir $LPATH $LIBS"
++ echo "$LIBS"
+ elif [ "$show_cflags" = 1 ]
+ then
+- echo "-I$includedir"
++ echo ""
+ elif [ "$show_libs" = 1 ]
+ then
+- echo "$LPATH -lpcap $LIBS"
++ echo "-lpcap $LIBS"
+ elif [ "$show_additional_libs" = 1 ]
+ then
+ echo "$LIBS"
+@@ -87,15 +87,15 @@ else
+ #
+ if [ "$show_cflags" = 1 -a "$show_libs" = 1 ]
+ then
+- echo "-I$includedir $LPATH $RPATH -l$PACKAGE_NAME"
++ echo " $RPATH -l$PACKAGE_NAME"
+ elif [ "$show_cflags" = 1 -a "$show_additional_libs" = 1 ]
+ then
+- echo "-I$includedir"
++ echo ""
+ elif [ "$show_cflags" = 1 ]
+ then
+- echo "-I$includedir"
++ echo ""
+ elif [ "$show_libs" = 1 ]
+ then
+- echo "$LPATH $RPATH -l$PACKAGE_NAME"
++ echo "$RPATH -l$PACKAGE_NAME"
+ fi
+ fi
diff --git a/net-libs/libpcap/libpcap-1.10.1-r2.ebuild b/net-libs/libpcap/libpcap-1.10.1-r2.ebuild
new file mode 100644
index 000000000000..477ba7b57d29
--- /dev/null
+++ b/net-libs/libpcap/libpcap-1.10.1-r2.ebuild
@@ -0,0 +1,103 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools multilib-minimal
+
+DESCRIPTION="A system-independent library for user-level network packet capture"
+HOMEPAGE="https://www.tcpdump.org/ https://github.com/the-tcpdump-group/libpcap"
+
+if [[ ${PV} == *9999* ]] ; then
+ EGIT_REPO_URI="https://github.com/the-tcpdump-group/libpcap"
+ inherit git-r3
+else
+ VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/tcpdump.asc
+ inherit verify-sig
+
+ # Note: drop -upstream on bump, this is just because we switched to the official
+ # distfiles for verify-sig
+ SRC_URI="https://www.tcpdump.org/release/${P}.tar.gz -> ${P}-upstream.tar.gz"
+ SRC_URI+=" verify-sig? ( https://www.tcpdump.org/release/${P}.tar.gz.sig -> ${P}-upstream.tar.gz.sig )"
+
+ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~x86-solaris"
+fi
+
+LICENSE="BSD"
+SLOT="0"
+IUSE="bluetooth dbus netlink rdma remote static-libs usb yydebug"
+
+RDEPEND="
+ bluetooth? ( net-wireless/bluez:=[${MULTILIB_USEDEP}] )
+ dbus? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
+ netlink? ( dev-libs/libnl:3[${MULTILIB_USEDEP}] )
+ remote? ( virtual/libcrypt:=[${MULTILIB_USEDEP}] )
+ rdma? ( sys-cluster/rdma-core )
+ usb? ( virtual/libusb:1[${MULTILIB_USEDEP}] )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ sys-devel/flex
+ virtual/yacc
+ dbus? ( virtual/pkgconfig )
+"
+
+if [[ ${PV} != *9999* ]] ; then
+ BDEPEND+=" verify-sig? ( sec-keys/openpgp-keys-tcpdump )"
+fi
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.10.0-usbmon.patch
+
+ # Drop ${P}-pcap-config-no-hardcoded-lib.patch on next release
+ "${FILESDIR}"/${P}-pcap-config-no-hardcoded-lib.patch
+
+ # We need to keep this, it's just rebased on top of the above
+ # ${P}-pcap-config-no-hardcoded-lib.patch. Drop this comment then too,
+ # but keep this patch.
+ "${FILESDIR}"/${PN}-1.10.1-pcap-config.patch
+)
+
+src_prepare() {
+ default
+
+ if ! [[ -f VERSION ]]; then
+ echo ${PV} > VERSION || die
+ fi
+
+ eautoreconf
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE="${S}" \
+ econf \
+ $(use_enable bluetooth) \
+ $(use_enable dbus) \
+ $(use_enable rdma) \
+ $(use_enable remote) \
+ $(use_enable usb) \
+ $(use_enable yydebug) \
+ $(use_with netlink libnl) \
+ --enable-ipv6
+}
+
+multilib_src_compile() {
+ emake all shared
+}
+
+multilib_src_install_all() {
+ dodoc CREDITS CHANGES VERSION TODO README.* doc/README.*
+
+ # remove static libraries (--disable-static does not work)
+ if ! use static-libs; then
+ find "${ED}" -name '*.a' -exec rm {} + || die
+ fi
+
+ find "${ED}" -name '*.la' -delete || die
+
+ # We need this to build pppd on G/FBSD systems
+ if [[ "${USERLAND}" == "BSD" ]]; then
+ insinto /usr/include
+ doins pcap-int.h portability.h
+ fi
+}
diff --git a/net-libs/libpcap/libpcap-9999.ebuild b/net-libs/libpcap/libpcap-9999.ebuild
index b0ff8fb28a16..a7f3890a8527 100644
--- a/net-libs/libpcap/libpcap-9999.ebuild
+++ b/net-libs/libpcap/libpcap-9999.ebuild
@@ -15,10 +15,12 @@ else
VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/tcpdump.asc
inherit verify-sig
- SRC_URI="https://www.tcpdump.org/release/${P}.tar.gz"
- SRC_URI+=" verify-sig? ( https://www.tcpdump.org/release/${P}.tar.gz.sig )"
+ # Note: drop -upstream on bump, this is just because we switched to the official
+ # distfiles for verify-sig
+ SRC_URI="https://www.tcpdump.org/release/${P}.tar.gz -> ${P}-upstream.tar.gz"
+ SRC_URI+=" verify-sig? ( https://www.tcpdump.org/release/${P}.tar.gz.sig -> ${P}-upstream.tar.gz.sig )"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~x86-solaris"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~x86-solaris"
fi
LICENSE="BSD"
@@ -45,9 +47,8 @@ if [[ ${PV} != *9999* ]] ; then
fi
PATCHES=(
- "${FILESDIR}"/${PN}-1.9.1-pcap-config.patch
"${FILESDIR}"/${PN}-1.10.0-usbmon.patch
- "${FILESDIR}"/${PN}-9999-prefix-darwin.patch
+ "${FILESDIR}"/${PN}-1.10.1-pcap-config.patch
)
src_prepare() {