1 |
commit: 78c662203203c528a69701612845e417db300eae |
2 |
Author: Jeroen Roovers <jer <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Aug 31 20:46:41 2020 +0000 |
4 |
Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Aug 31 21:16:52 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=78c66220 |
7 |
|
8 |
net-libs/libpcap: Version 1.10.0_pre |
9 |
|
10 |
Package-Manager: Portage-3.0.5, Repoman-3.0.1 |
11 |
Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org> |
12 |
|
13 |
net-libs/libpcap/Manifest | 1 + |
14 |
net-libs/libpcap/files/libpcap-1.10.0-usbmon.patch | 14 ++++ |
15 |
net-libs/libpcap/libpcap-1.10.0_pre.ebuild | 86 ++++++++++++++++++++++ |
16 |
3 files changed, 101 insertions(+) |
17 |
|
18 |
diff --git a/net-libs/libpcap/Manifest b/net-libs/libpcap/Manifest |
19 |
index 1ae3f9ec963..e437bfba26e 100644 |
20 |
--- a/net-libs/libpcap/Manifest |
21 |
+++ b/net-libs/libpcap/Manifest |
22 |
@@ -1 +1,2 @@ |
23 |
+DIST libpcap-1.10.0-bp.tar.gz 911001 BLAKE2B bbcb1f48c5cbe8bfc46003cbf7c691e0b3a2051e319aa3ec761de045ac11bbacafe1a06b52c4cd332eb85e598a0a1ff5403ae7c3a611cc0cdd2eeab859587487 SHA512 c3d6047192ab1521687d856f2a954a38bfd8d42aedb853559a698ed3c24bfe5698efb6f81c0280b696229165c1088a58471e8d62f071343fcb14b1464f65fe3f |
24 |
DIST libpcap-1.9.1.tar.gz 849407 BLAKE2B 700d8b3d25c036033c4f9b652cec6a30d4a45aa418c2ec45698018b3d3fe8d0a61f6759f5734e2c7ff9a8f42cce65fbd8b3e1b1efd44776e53674fbc609da59d SHA512 9ab9da20194e0dfb105daa28c8841118118f5a7f68b5e30e31da6c56eec91430c8ee481f1f9d20aec4d33d7ee9e6fb0b5e08a90a8d7e5ace8e6210e29e7eab0f |
25 |
|
26 |
diff --git a/net-libs/libpcap/files/libpcap-1.10.0-usbmon.patch b/net-libs/libpcap/files/libpcap-1.10.0-usbmon.patch |
27 |
new file mode 100644 |
28 |
index 00000000000..e5524ac3bae |
29 |
--- /dev/null |
30 |
+++ b/net-libs/libpcap/files/libpcap-1.10.0-usbmon.patch |
31 |
@@ -0,0 +1,14 @@ |
32 |
+--- a/configure.ac |
33 |
++++ b/configure.ac |
34 |
+@@ -2225,10 +2225,7 @@ |
35 |
+ AC_DEFINE(PCAP_SUPPORT_LINUX_USBMON, 1, [target host supports Linux usbmon for USB sniffing]) |
36 |
+ MODULE_C_SRC="$MODULE_C_SRC pcap-usb-linux.c" |
37 |
+ AC_MSG_RESULT(yes) |
38 |
+- ac_usb_dev_name=`udevinfo -q name -p /sys/class/usb_device/usbmon 2>/dev/null` |
39 |
+- if test $? -ne 0 ; then |
40 |
+- ac_usb_dev_name="usbmon" |
41 |
+- fi |
42 |
++ ac_usb_dev_name="usbmon" |
43 |
+ AC_DEFINE_UNQUOTED(LINUX_USB_MON_DEV, "/dev/$ac_usb_dev_name", [path for device for USB sniffing]) |
44 |
+ AC_MSG_NOTICE(Device for USB sniffing is /dev/$ac_usb_dev_name) |
45 |
+ # |
46 |
|
47 |
diff --git a/net-libs/libpcap/libpcap-1.10.0_pre.ebuild b/net-libs/libpcap/libpcap-1.10.0_pre.ebuild |
48 |
new file mode 100644 |
49 |
index 00000000000..5fed64f7508 |
50 |
--- /dev/null |
51 |
+++ b/net-libs/libpcap/libpcap-1.10.0_pre.ebuild |
52 |
@@ -0,0 +1,86 @@ |
53 |
+# Copyright 1999-2020 Gentoo Authors |
54 |
+# Distributed under the terms of the GNU General Public License v2 |
55 |
+ |
56 |
+EAPI=7 |
57 |
+inherit autotools multilib-minimal |
58 |
+ |
59 |
+DESCRIPTION="A system-independent library for user-level network packet capture" |
60 |
+HOMEPAGE=" |
61 |
+ https://www.tcpdump.org/ |
62 |
+ https://github.com/the-tcpdump-group/libpcap |
63 |
+" |
64 |
+SRC_URI=" |
65 |
+ https://github.com/the-tcpdump-group/${PN}/archive/${P/_pre/-bp}.tar.gz |
66 |
+" |
67 |
+ |
68 |
+LICENSE="BSD" |
69 |
+SLOT="0" |
70 |
+KEYWORDS="" |
71 |
+IUSE="bluetooth dbus netlink rdma -remote static-libs usb -yydebug" |
72 |
+ |
73 |
+RDEPEND=" |
74 |
+ bluetooth? ( net-wireless/bluez:=[${MULTILIB_USEDEP}] ) |
75 |
+ dbus? ( sys-apps/dbus[${MULTILIB_USEDEP}] ) |
76 |
+ netlink? ( dev-libs/libnl:3[${MULTILIB_USEDEP}] ) |
77 |
+ rdma? ( sys-cluster/rdma-core ) |
78 |
+ usb? ( virtual/libusb:1[${MULTILIB_USEDEP}] ) |
79 |
+" |
80 |
+DEPEND=" |
81 |
+ ${RDEPEND} |
82 |
+" |
83 |
+BDEPEND=" |
84 |
+ sys-devel/flex |
85 |
+ virtual/yacc |
86 |
+ dbus? ( virtual/pkgconfig ) |
87 |
+" |
88 |
+ |
89 |
+S=${WORKDIR}/${PN}-${P/_pre/-bp} |
90 |
+ |
91 |
+PATCHES=( |
92 |
+ "${FILESDIR}"/${PN}-1.9.1-pcap-config.patch |
93 |
+ "${FILESDIR}"/${PN}-1.10.0-usbmon.patch |
94 |
+) |
95 |
+ |
96 |
+src_prepare() { |
97 |
+ default |
98 |
+ |
99 |
+ if ! [[ -f VERSION ]]; then |
100 |
+ echo ${PV} > VERSION || die |
101 |
+ fi |
102 |
+ |
103 |
+ eautoreconf |
104 |
+} |
105 |
+ |
106 |
+multilib_src_configure() { |
107 |
+ ECONF_SOURCE="${S}" \ |
108 |
+ econf \ |
109 |
+ $(use_enable bluetooth) \ |
110 |
+ $(use_enable dbus) \ |
111 |
+ $(use_enable rdma) \ |
112 |
+ $(use_enable remote) \ |
113 |
+ $(use_enable usb) \ |
114 |
+ $(use_enable yydebug) \ |
115 |
+ $(use_with netlink libnl) \ |
116 |
+ --enable-ipv6 |
117 |
+} |
118 |
+ |
119 |
+multilib_src_compile() { |
120 |
+ emake all shared |
121 |
+} |
122 |
+ |
123 |
+multilib_src_install_all() { |
124 |
+ dodoc CREDITS CHANGES VERSION TODO README.* doc/README.* |
125 |
+ |
126 |
+ # remove static libraries (--disable-static does not work) |
127 |
+ if ! use static-libs; then |
128 |
+ find "${ED}" -name '*.a' -exec rm {} + || die |
129 |
+ fi |
130 |
+ |
131 |
+ find "${ED}" -name '*.la' -delete || die |
132 |
+ |
133 |
+ # We need this to build pppd on G/FBSD systems |
134 |
+ if [[ "${USERLAND}" == "BSD" ]]; then |
135 |
+ insinto /usr/include |
136 |
+ doins pcap-int.h portability.h |
137 |
+ fi |
138 |
+} |