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/
Date: Mon, 30 Sep 2019 16:43:42
Message-Id: 1569861816.7a978e451ee3680f92f2280ffd2c12569682c616.jer@gentoo
commit:     7a978e451ee3680f92f2280ffd2c12569682c616
Author:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Mon Sep 30 16:43:18 2019 +0000
Commit:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Mon Sep 30 16:43:36 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7a978e45

net-libs/libpcap: Version 1.9.1

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

 net-libs/libpcap/Manifest             |  1 +
 net-libs/libpcap/libpcap-1.9.1.ebuild | 76 +++++++++++++++++++++++++++++++++++
 2 files changed, 77 insertions(+)

diff --git a/net-libs/libpcap/Manifest b/net-libs/libpcap/Manifest
index 6ad8206beeb..cfa9abb5df5 100644
--- a/net-libs/libpcap/Manifest
+++ b/net-libs/libpcap/Manifest
@@ -1,2 +1,3 @@
 DIST libpcap-1.8.1.tar.gz 753405 BLAKE2B f80fbd6451cf788fc43e5f2240e5ecb267ac98b57bca3fa56dd63576b57d10966bfacde5005d07282352fc2b30d8ef5964cbd126f8f63e565f1bb3dc6f8d9a1c SHA512 7e6a7351bb4213e1c3dd95ef7a460e91f733d933e39ba518ad8ba6d2f86b6e7cfa50ae667c8dc1300ef47bf8693ac8a1f18e068f41175ca5d0147a0b72278882
 DIST libpcap-1.9.0.tar.gz 819766 BLAKE2B bf98029eea58328c1c820966b100d8467373c9469c107bfe36bcf17e5250d64c45a331050b8a1027c4f4eb1600925b873e4fe43d866ba5a9dc5dcc7995137de1 SHA512 b94d63204f74fd155c1409c50b84c4a02d5b9db7069a24d42d496056416923183331f587903f9101d8464b74efc7db22f113c48e518bd7fb3082b333bbc337fd
+DIST libpcap-1.9.1.tar.gz 849407 BLAKE2B 700d8b3d25c036033c4f9b652cec6a30d4a45aa418c2ec45698018b3d3fe8d0a61f6759f5734e2c7ff9a8f42cce65fbd8b3e1b1efd44776e53674fbc609da59d SHA512 9ab9da20194e0dfb105daa28c8841118118f5a7f68b5e30e31da6c56eec91430c8ee481f1f9d20aec4d33d7ee9e6fb0b5e08a90a8d7e5ace8e6210e29e7eab0f

diff --git a/net-libs/libpcap/libpcap-1.9.1.ebuild b/net-libs/libpcap/libpcap-1.9.1.ebuild
new file mode 100644
index 00000000000..27eeb0f5075
--- /dev/null
+++ b/net-libs/libpcap/libpcap-1.9.1.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit autotools multilib-minimal ltprune
+
+DESCRIPTION="A system-independent library for user-level network packet capture"
+HOMEPAGE="
+	http://www.tcpdump.org/
+	https://github.com/the-tcpdump-group/libpcap
+"
+SRC_URI="
+	https://github.com/the-tcpdump-group/${PN}/archive/${P/_}.tar.gz
+"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+IUSE="bluetooth dbus netlink static-libs usb"
+
+RDEPEND="
+	bluetooth? ( net-wireless/bluez:=[${MULTILIB_USEDEP}] )
+	dbus? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
+	netlink? ( dev-libs/libnl:3[${MULTILIB_USEDEP}] )
+"
+DEPEND="
+	${RDEPEND}
+	sys-devel/flex
+	virtual/yacc
+	dbus? ( virtual/pkgconfig[${MULTILIB_USEDEP}] )
+"
+
+S=${WORKDIR}/${PN}-${P/_}
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-1.8.1-usbmon.patch
+	"${FILESDIR}"/${PN}-1.9.0-pcap-config-includedir.patch
+)
+
+src_prepare() {
+	default
+
+	echo ${PV} > VERSION || die
+
+	eautoreconf
+}
+
+multilib_src_configure() {
+	ECONF_SOURCE="${S}" \
+	econf \
+		$(use_enable bluetooth) \
+		$(use_enable usb) \
+		$(use_enable dbus) \
+		$(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
+	prune_libtool_files
+
+	# We need this to build pppd on G/FBSD systems
+	if [[ "${USERLAND}" == "BSD" ]]; then
+		insinto /usr/include
+		doins pcap-int.h portability.h
+	fi
+}