Gentoo Archives: gentoo-commits

From: Jeroen Roovers <jer@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-perl/Net-Pcap/, dev-perl/Net-Pcap/files/
Date: Sat, 24 Aug 2019 11:53:17
Message-Id: 1566647587.e9af315c8c78839177c0bee41ad17d7a3600d4ab.jer@gentoo
1 commit: e9af315c8c78839177c0bee41ad17d7a3600d4ab
2 Author: Jeroen Roovers <jer <AT> gentoo <DOT> org>
3 AuthorDate: Sat Aug 24 11:49:47 2019 +0000
4 Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org>
5 CommitDate: Sat Aug 24 11:53:07 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e9af315c
7
8 dev-perl/Net-Pcap: Fix building against net-libs/libpcap-1.9.0
9
10 Package-Manager: Portage-2.3.72, Repoman-2.3.17
11 Fixes: https://bugs.gentoo.org/661726
12 Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org>
13
14 dev-perl/Net-Pcap/Net-Pcap-0.180.0-r1.ebuild | 34 ++++++++++++++++++
15 .../files/Net-Pcap-0.18-libpcap-1.9.0.patch | 41 ++++++++++++++++++++++
16 2 files changed, 75 insertions(+)
17
18 diff --git a/dev-perl/Net-Pcap/Net-Pcap-0.180.0-r1.ebuild b/dev-perl/Net-Pcap/Net-Pcap-0.180.0-r1.ebuild
19 new file mode 100644
20 index 00000000000..e3b237b2e2b
21 --- /dev/null
22 +++ b/dev-perl/Net-Pcap/Net-Pcap-0.180.0-r1.ebuild
23 @@ -0,0 +1,34 @@
24 +# Copyright 1999-2019 Gentoo Authors
25 +# Distributed under the terms of the GNU General Public License v2
26 +
27 +EAPI=7
28 +
29 +DIST_AUTHOR=SAPER
30 +DIST_VERSION=0.18
31 +DIST_EXAMPLES=( "eg/*" )
32 +inherit perl-module
33 +
34 +DESCRIPTION="Interface to the pcap(3) LBL packet capture library"
35 +
36 +SLOT="0"
37 +KEYWORDS="~alpha ~amd64 ~ppc ~x86"
38 +IUSE=""
39 +
40 +RDEPEND="net-libs/libpcap
41 + dev-perl/IO-Interface"
42 +DEPEND="${RDEPEND}"
43 +
44 +PATCHES=(
45 + "${FILESDIR}/${PN}-${DIST_VERSION}-libpcap-1.9.0.patch"
46 + "${FILESDIR}/${PN}-${DIST_VERSION}-test-error.patch"
47 +)
48 +
49 +src_test() {
50 + if [[ $EUID != 0 ]]; then
51 + elog "Comprehensive testing of this module requires root permissions."
52 + elog "For details, see:"
53 + elog "https://wiki.gentoo.org/wiki/Project:Perl/maint-notes/${CATEGORY}/${PN}"
54 + fi
55 + perl_rm_files t/pod{,cover,spell}.t t/distchk.t t/portfs.t
56 + perl-module_src_test
57 +}
58
59 diff --git a/dev-perl/Net-Pcap/files/Net-Pcap-0.18-libpcap-1.9.0.patch b/dev-perl/Net-Pcap/files/Net-Pcap-0.18-libpcap-1.9.0.patch
60 new file mode 100644
61 index 00000000000..2495600e5d0
62 --- /dev/null
63 +++ b/dev-perl/Net-Pcap/files/Net-Pcap-0.18-libpcap-1.9.0.patch
64 @@ -0,0 +1,41 @@
65 +--- a/Makefile.PL
66 ++++ b/Makefile.PL
67 +@@ -106,7 +106,7 @@ REASON
68 + # We also store the list of available functions in a file for skipping the
69 + # corresponding tests.
70 + my @funcs = have_functions(find_functions());
71 +-$options{DEFINE} .= cpp_defines(@funcs);
72 ++$options{DEFINE} .= cpp_defines(@funcs). "-DHAVE_PCAP_SETSAMPLING";
73 + open(FUNCS, '>funcs.txt') or warn "warning: can't write 'funcs.txt': $!\n";
74 + print FUNCS join("\n", @funcs), "\n";
75 + close(FUNCS);
76 +--- a/stubs.inc
77 ++++ b/stubs.inc
78 +@@ -354,11 +354,6 @@ int pcap_parsesrcstr(const char *source,
79 + #ifdef _MSC_VER
80 + #pragma message( "Warning: the function pcap_open() is not available" )
81 + #endif
82 +-struct pcap_rmtauth {
83 +- int type;
84 +- char *username;
85 +- char *password;
86 +-};
87 +
88 + pcap_t * pcap_open(const char *source, int snaplen, int flags, int read_timeout, struct pcap_rmtauth *auth, char *err);
89 + pcap_t * pcap_open(const char *source, int snaplen, int flags, int read_timeout, struct pcap_rmtauth *auth, char *err) {
90 +@@ -511,6 +511,7 @@ HANDLE pcap_getevent(pcap_t *p) {
91 + #ifdef _MSC_VER
92 + #pragma message( "Warning: the function pcap_setsampling() is not available" )
93 + #endif
94 ++#if 0
95 + struct pcap_samp {
96 + int method;
97 + int value;
98 +@@ -522,6 +523,7 @@ struct pcap_samp *pcap_setsampling(pcap_
99 + return NULL;
100 + }
101 + #endif
102 ++#endif
103 +
104 +
105 + /*