commit:     78c662203203c528a69701612845e417db300eae
Author:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Mon Aug 31 20:46:41 2020 +0000
Commit:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Mon Aug 31 21:16:52 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=78c66220

net-libs/libpcap: Version 1.10.0_pre

Package-Manager: Portage-3.0.5, Repoman-3.0.1
Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org>

 net-libs/libpcap/Manifest                          |  1 +
 net-libs/libpcap/files/libpcap-1.10.0-usbmon.patch | 14 ++++
 net-libs/libpcap/libpcap-1.10.0_pre.ebuild         | 86 ++++++++++++++++++++++
 3 files changed, 101 insertions(+)

diff --git a/net-libs/libpcap/Manifest b/net-libs/libpcap/Manifest
index 1ae3f9ec963..e437bfba26e 100644
--- a/net-libs/libpcap/Manifest
+++ b/net-libs/libpcap/Manifest
@@ -1 +1,2 @@
+DIST libpcap-1.10.0-bp.tar.gz 911001 BLAKE2B 
bbcb1f48c5cbe8bfc46003cbf7c691e0b3a2051e319aa3ec761de045ac11bbacafe1a06b52c4cd332eb85e598a0a1ff5403ae7c3a611cc0cdd2eeab859587487
 SHA512 
c3d6047192ab1521687d856f2a954a38bfd8d42aedb853559a698ed3c24bfe5698efb6f81c0280b696229165c1088a58471e8d62f071343fcb14b1464f65fe3f
 DIST libpcap-1.9.1.tar.gz 849407 BLAKE2B 
700d8b3d25c036033c4f9b652cec6a30d4a45aa418c2ec45698018b3d3fe8d0a61f6759f5734e2c7ff9a8f42cce65fbd8b3e1b1efd44776e53674fbc609da59d
 SHA512 
9ab9da20194e0dfb105daa28c8841118118f5a7f68b5e30e31da6c56eec91430c8ee481f1f9d20aec4d33d7ee9e6fb0b5e08a90a8d7e5ace8e6210e29e7eab0f

diff --git a/net-libs/libpcap/files/libpcap-1.10.0-usbmon.patch 
b/net-libs/libpcap/files/libpcap-1.10.0-usbmon.patch
new file mode 100644
index 00000000000..e5524ac3bae
--- /dev/null
+++ b/net-libs/libpcap/files/libpcap-1.10.0-usbmon.patch
@@ -0,0 +1,14 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -2225,10 +2225,7 @@
+       AC_DEFINE(PCAP_SUPPORT_LINUX_USBMON, 1, [target host supports Linux 
usbmon for USB sniffing])
+       MODULE_C_SRC="$MODULE_C_SRC pcap-usb-linux.c"
+       AC_MSG_RESULT(yes)
+-      ac_usb_dev_name=`udevinfo -q name -p /sys/class/usb_device/usbmon 
2>/dev/null`
+-      if test $? -ne 0 ; then
+-        ac_usb_dev_name="usbmon"
+-      fi
++      ac_usb_dev_name="usbmon"
+       AC_DEFINE_UNQUOTED(LINUX_USB_MON_DEV, "/dev/$ac_usb_dev_name", [path 
for device for USB sniffing])
+       AC_MSG_NOTICE(Device for USB sniffing is /dev/$ac_usb_dev_name)
+       #

diff --git a/net-libs/libpcap/libpcap-1.10.0_pre.ebuild 
b/net-libs/libpcap/libpcap-1.10.0_pre.ebuild
new file mode 100644
index 00000000000..5fed64f7508
--- /dev/null
+++ b/net-libs/libpcap/libpcap-1.10.0_pre.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2020 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
+"
+SRC_URI="
+       https://github.com/the-tcpdump-group/${PN}/archive/${P/_pre/-bp}.tar.gz
+"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS=""
+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}] )
+       rdma? ( sys-cluster/rdma-core )
+       usb? ( virtual/libusb:1[${MULTILIB_USEDEP}] )
+"
+DEPEND="
+       ${RDEPEND}
+"
+BDEPEND="
+       sys-devel/flex
+       virtual/yacc
+       dbus? ( virtual/pkgconfig )
+"
+
+S=${WORKDIR}/${PN}-${P/_pre/-bp}
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-1.9.1-pcap-config.patch
+       "${FILESDIR}"/${PN}-1.10.0-usbmon.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
+}

Reply via email to