Gentoo Archives: gentoo-commits

From: Jeroen Roovers <jer@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-libs/libpcap/files/, net-libs/libpcap/
Date: Thu, 09 Jan 2020 13:39:14
Message-Id: 1578577144.ce7ef2269c36d8f07ae4f578b84dda2454dee5e4.jer@gentoo
1 commit: ce7ef2269c36d8f07ae4f578b84dda2454dee5e4
2 Author: Jeroen Roovers <jer <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jan 9 12:53:45 2020 +0000
4 Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org>
5 CommitDate: Thu Jan 9 13:39:04 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ce7ef226
7
8 net-libs/libpcap: USE=remote, EAPI=7, strip pcap-config -L/usr/lib
9
10 Package-Manager: Portage-2.3.84, Repoman-2.3.20
11 Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org>
12
13 .../libpcap/files/libpcap-1.9.1-pcap-config.patch | 43 ++++++++++++++++++++++
14 ...libpcap-9999.ebuild => libpcap-1.9.1-r1.ebuild} | 34 ++++++++++-------
15 net-libs/libpcap/libpcap-9999.ebuild | 12 +++---
16 net-libs/libpcap/metadata.xml | 1 +
17 4 files changed, 72 insertions(+), 18 deletions(-)
18
19 diff --git a/net-libs/libpcap/files/libpcap-1.9.1-pcap-config.patch b/net-libs/libpcap/files/libpcap-1.9.1-pcap-config.patch
20 new file mode 100644
21 index 00000000000..937273c43ff
22 --- /dev/null
23 +++ b/net-libs/libpcap/files/libpcap-1.9.1-pcap-config.patch
24 @@ -0,0 +1,43 @@
25 +--- a/pcap-config.in
26 ++++ b/pcap-config.in
27 +@@ -59,16 +59,16 @@
28 + #
29 + if [ "$show_cflags" = 1 -a "$show_libs" = 1 ]
30 + then
31 +- echo "-I$includedir -L$libdir -lpcap $LIBS"
32 ++ echo "-lpcap $LIBS"
33 + elif [ "$show_cflags" = 1 -a "$show_additional_libs" = 1 ]
34 + then
35 +- echo "-I$includedir -L$libdir $LIBS"
36 ++ echo "$LIBS"
37 + elif [ "$show_cflags" = 1 ]
38 + then
39 +- echo "-I$includedir"
40 ++ echo ""
41 + elif [ "$show_libs" = 1 ]
42 + then
43 +- echo "-L$libdir -lpcap $LIBS"
44 ++ echo "-lpcap $LIBS"
45 + elif [ "$show_additional_libs" = 1 ]
46 + then
47 + echo "$LIBS"
48 +@@ -80,15 +80,15 @@
49 + #
50 + if [ "$show_cflags" = 1 -a "$show_libs" = 1 ]
51 + then
52 +- echo "-I$includedir -L$libdir $RPATH -l$PACKAGE_NAME"
53 ++ echo " $RPATH -l$PACKAGE_NAME"
54 + elif [ "$show_cflags" = 1 -a "$show_additional_libs" = 1 ]
55 + then
56 +- echo "-I$includedir"
57 ++ echo ""
58 + elif [ "$show_cflags" = 1 ]
59 + then
60 +- echo "-I$includedir"
61 ++ echo ""
62 + elif [ "$show_libs" = 1 ]
63 + then
64 +- echo "-L$libdir $RPATH -l$PACKAGE_NAME"
65 ++ echo "$RPATH -l$PACKAGE_NAME"
66 + fi
67 + fi
68
69 diff --git a/net-libs/libpcap/libpcap-9999.ebuild b/net-libs/libpcap/libpcap-1.9.1-r1.ebuild
70 similarity index 57%
71 copy from net-libs/libpcap/libpcap-9999.ebuild
72 copy to net-libs/libpcap/libpcap-1.9.1-r1.ebuild
73 index f240ac606d9..bf2ab94c139 100644
74 --- a/net-libs/libpcap/libpcap-9999.ebuild
75 +++ b/net-libs/libpcap/libpcap-1.9.1-r1.ebuild
76 @@ -1,26 +1,27 @@
77 -# Copyright 1999-2019 Gentoo Authors
78 +# Copyright 1999-2020 Gentoo Authors
79 # Distributed under the terms of the GNU General Public License v2
80
81 -EAPI=6
82 -inherit autotools git-r3 multilib-minimal ltprune
83 +EAPI=7
84 +inherit autotools multilib-minimal
85
86 DESCRIPTION="A system-independent library for user-level network packet capture"
87 -EGIT_REPO_URI="https://github.com/the-tcpdump-group/libpcap"
88 HOMEPAGE="
89 https://www.tcpdump.org/
90 - ${EGIT_REPO_URI}
91 + https://github.com/the-tcpdump-group/libpcap
92 +"
93 +SRC_URI="
94 + https://github.com/the-tcpdump-group/${PN}/archive/${P/_}.tar.gz
95 "
96
97 LICENSE="BSD"
98 SLOT="0"
99 -IUSE="bluetooth dbus netlink static-libs usb"
100 -KEYWORDS=""
101 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
102 +IUSE="bluetooth dbus netlink -remote static-libs usb"
103
104 RDEPEND="
105 bluetooth? ( net-wireless/bluez:=[${MULTILIB_USEDEP}] )
106 dbus? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
107 netlink? ( dev-libs/libnl:3[${MULTILIB_USEDEP}] )
108 - usb? ( virtual/libusb:1[${MULTILIB_USEDEP}] )
109 "
110 DEPEND="
111 ${RDEPEND}
112 @@ -29,14 +30,18 @@ DEPEND="
113 dbus? ( virtual/pkgconfig[${MULTILIB_USEDEP}] )
114 "
115
116 +S=${WORKDIR}/${PN}-${P/_}
117 +
118 PATCHES=(
119 - "${FILESDIR}"/${PN}-1.9.0-pcap-config-includedir.patch
120 - "${FILESDIR}"/${PN}-9999-prefix-darwin.patch
121 + "${FILESDIR}"/${PN}-1.8.1-usbmon.patch
122 + "${FILESDIR}"/${PN}-1.9.1-pcap-config.patch
123 )
124
125 src_prepare() {
126 default
127
128 + echo ${PV} > VERSION || die
129 +
130 eautoreconf
131 }
132
133 @@ -45,8 +50,10 @@ multilib_src_configure() {
134 econf \
135 $(use_enable bluetooth) \
136 $(use_enable dbus) \
137 + $(use_enable remote) \
138 $(use_enable usb) \
139 - $(use_with netlink libnl)
140 + $(use_with netlink libnl) \
141 + --enable-ipv6
142 }
143
144 multilib_src_compile() {
145 @@ -54,13 +61,14 @@ multilib_src_compile() {
146 }
147
148 multilib_src_install_all() {
149 - dodoc CREDITS CHANGES VERSION TODO README*
150 + dodoc CREDITS CHANGES VERSION TODO README.* doc/README.*
151
152 # remove static libraries (--disable-static does not work)
153 if ! use static-libs; then
154 find "${ED}" -name '*.a' -exec rm {} + || die
155 fi
156 - prune_libtool_files
157 +
158 + find "${ED}" -name '*.la' -delete || die
159
160 # We need this to build pppd on G/FBSD systems
161 if [[ "${USERLAND}" == "BSD" ]]; then
162
163 diff --git a/net-libs/libpcap/libpcap-9999.ebuild b/net-libs/libpcap/libpcap-9999.ebuild
164 index f240ac606d9..1a75013c5b7 100644
165 --- a/net-libs/libpcap/libpcap-9999.ebuild
166 +++ b/net-libs/libpcap/libpcap-9999.ebuild
167 @@ -1,8 +1,8 @@
168 -# Copyright 1999-2019 Gentoo Authors
169 +# Copyright 1999-2020 Gentoo Authors
170 # Distributed under the terms of the GNU General Public License v2
171
172 -EAPI=6
173 -inherit autotools git-r3 multilib-minimal ltprune
174 +EAPI=7
175 +inherit autotools git-r3 multilib-minimal
176
177 DESCRIPTION="A system-independent library for user-level network packet capture"
178 EGIT_REPO_URI="https://github.com/the-tcpdump-group/libpcap"
179 @@ -13,7 +13,7 @@ HOMEPAGE="
180
181 LICENSE="BSD"
182 SLOT="0"
183 -IUSE="bluetooth dbus netlink static-libs usb"
184 +IUSE="bluetooth dbus netlink -remote static-libs usb"
185 KEYWORDS=""
186
187 RDEPEND="
188 @@ -45,6 +45,7 @@ multilib_src_configure() {
189 econf \
190 $(use_enable bluetooth) \
191 $(use_enable dbus) \
192 + $(use_enable remote) \
193 $(use_enable usb) \
194 $(use_with netlink libnl)
195 }
196 @@ -60,7 +61,8 @@ multilib_src_install_all() {
197 if ! use static-libs; then
198 find "${ED}" -name '*.a' -exec rm {} + || die
199 fi
200 - prune_libtool_files
201 +
202 + find "${ED}" -name '*.la' -delete || die
203
204 # We need this to build pppd on G/FBSD systems
205 if [[ "${USERLAND}" == "BSD" ]]; then
206
207 diff --git a/net-libs/libpcap/metadata.xml b/net-libs/libpcap/metadata.xml
208 index 241fb6113b5..54d027060e7 100644
209 --- a/net-libs/libpcap/metadata.xml
210 +++ b/net-libs/libpcap/metadata.xml
211 @@ -7,6 +7,7 @@
212 </maintainer>
213 <use>
214 <flag name="netlink">Use <pkg>dev-libs/libnl</pkg> to put wireless interfaces in monitor mode.</flag>
215 +<flag name="remote">Enable remote packet capture which may expose libpcap-based applications to attacks by malicious remote capture servers!</flag>
216 </use>
217 <upstream>
218 <remote-id type="cpe">cpe:/a:tcpdump:libpcap</remote-id>