summaryrefslogtreecommitdiff
path: root/net-libs/libpcap
diff options
context:
space:
mode:
Diffstat (limited to 'net-libs/libpcap')
-rw-r--r--net-libs/libpcap/Manifest15
-rw-r--r--net-libs/libpcap/files/libpcap-1.6.1-prefix-solaris.patch35
-rw-r--r--net-libs/libpcap/files/libpcap-1.8.1-cross-compile.patch16
-rw-r--r--net-libs/libpcap/files/libpcap-1.8.1-darwin.patch15
-rw-r--r--net-libs/libpcap/files/libpcap-1.8.1-libnl.patch22
-rw-r--r--net-libs/libpcap/files/libpcap-1.8.1-usbmon.patch16
-rw-r--r--net-libs/libpcap/files/libpcap-9999-cross-linux.patch16
-rw-r--r--net-libs/libpcap/files/libpcap-9999-libnl.patch22
-rw-r--r--net-libs/libpcap/files/libpcap-9999-prefix-darwin.patch14
-rw-r--r--net-libs/libpcap/libpcap-1.8.1-r1.ebuild81
-rw-r--r--net-libs/libpcap/libpcap-1.8.1.ebuild81
-rw-r--r--net-libs/libpcap/libpcap-9999.ebuild72
-rw-r--r--net-libs/libpcap/metadata.xml14
13 files changed, 419 insertions, 0 deletions
diff --git a/net-libs/libpcap/Manifest b/net-libs/libpcap/Manifest
new file mode 100644
index 000000000000..32c83cfa6009
--- /dev/null
+++ b/net-libs/libpcap/Manifest
@@ -0,0 +1,15 @@
+AUX libpcap-1.6.1-prefix-solaris.patch 806 SHA256 c39a672195ed8de156d047ade9b2a7ff88e6c9b77c9ab40fdab59c53bc53ccad SHA512 a1b49dcf4328518e95807c8f307cbc3eb34680002fd9367c29cf637d80e0c55ffa2e4525822fe42660159be8a71ab925680e058a44ce63ea4482e7ebfdb0a709 WHIRLPOOL c25a37897b1272950083e6f9547a5f4138752cc19123d5819c88d33dc8986bb79a452ae007774c2492bec1eb417e079f48411455b678329f1454c4fef03103d5
+AUX libpcap-1.8.1-cross-compile.patch 555 SHA256 948df1e4a0b32710fbfbea8856b20d2f6a7f7bbe20bb96c39017fd956521ba89 SHA512 a857a9c79ab6160cd82ed9d427c5e49b79c7ddfcbddd9f19998be5a27d8fd16920d7d5bdce14353ac7af80df878782b997007e0c7a7ebb6eb5e094eb6db1275f WHIRLPOOL 8d09b2b126fd17bfe2456b91c706695bc60e2b258a4645f7556b9722abb812aaf91a2688573ebe252356cf41c8f3f082a8f112c9a861ac2983e43077b7f39874
+AUX libpcap-1.8.1-darwin.patch 395 SHA256 a40b616c23f1744d1c98948a99b4f10230a508ccde91429f2c2eb9a6903badc0 SHA512 f068ec0a5853451676f6c4f2950880dd22623c5ad4a0c18441b7244914dc9b4db7a4df2ed81687b89adc9e742dbcd5d68bcbfa0fda1d61fd3d322c7fc6180907 WHIRLPOOL 4ea2ba1081c9a5b84986e683321f5f233e2353ce16a5eda7634f7b292e095389e6d53549abb780aa72a8e6f3b0267fa2b2cbc7554b5d223f25486027c67fb830
+AUX libpcap-1.8.1-libnl.patch 688 SHA256 8e73705359ccfa114ac3e6443e58ee659c3e49bef16325f8a0e2e37272b37f81 SHA512 f56a8f4b87c2f9bfb70e2b31b2e4dcb4fb80654b13cf541f9ff42f193cb9bb4e90a3ad9ef7e91c6ebc8667525bfc75ab78b54381d3f1709f10aaf9f48fd3a1f0 WHIRLPOOL 9e898b5e3110acb3ce73cb14000913aea44131cb38484d9a68b83ad4f7ae0e579ef26b7301ecdd78e694781f63e6644772bded1b82e40aeed51c91ed03927603
+AUX libpcap-1.8.1-usbmon.patch 522 SHA256 3a5cac242e383bbd7cfd8ccce545acc150cdd56dc96a707fca67422d6c71f02c SHA512 489c2f20e7935e47d478efb1077e3cf3806614651cdbd6312d0378989c71409e870f9d0fb9d496cf00b7076d8d001714c56d0444144eedbab47c6ed3afd3bf90 WHIRLPOOL 20e2642bf64a2bb88b4ca418a21749bc910b333cd1bb1757318700b82a2658353bef7e5fc2e21d8a622c2794754e7ac4961aab891bd105a92e3223ce13579326
+AUX libpcap-9999-cross-linux.patch 555 SHA256 e691f148436c4732b04f1c1a96b782e1d2d930a57c8bb81fd241aa417f760cf3 SHA512 183e39f75e65ca991fd2cef6ad638044a8f37b9ea713aad805a1f4b0a60cc89aa935bcdfc0634be13927062355c7cee282f25b1bbde64534c12a3390938cb527 WHIRLPOOL ec8b1fd47054f8c1ca161bd43efd8963a8f64aebd5e77565e3df1910c362008b51a64ff41b55f90933376b333cc38250b1f2dd78acc71c0f3dfd65b8ff86fe5a
+AUX libpcap-9999-libnl.patch 688 SHA256 a617c8042812a7f85962c1998801d4ccb64c97a1ca11faabfbf5ce863ae28621 SHA512 e7d839e10335d0a04592efae13031c701fd222e88910e0a4dceeafa2c3bcf3aa8ae726710c963dd2b4c53088af4f4d154d73e41d86dbd723511633628b174fd3 WHIRLPOOL 0e0f66b98acf15b87550b15dd04c693d38553a133ed087fd3fd5062719ecffbc56af3ee26fda69458d737b037ca6e84da54b21785f8e2b9e3ceb992152e9ea62
+AUX libpcap-9999-prefix-darwin.patch 394 SHA256 3754b3ffd8a4ffa531105a613c93660013578a24a6d5db800e1a890818e1a775 SHA512 bfd560b1bba72a84c5afa1cdf166944e9ede10cb817c7273941b3fc0838ca2676adfd143c0e8873f234de343aabb2177f46f2cd062738d2837d42a1da7370083 WHIRLPOOL fef86ba09c697bee308dac793b3f5ade0570c1eb0590f2f85e9ce033a57b9c0019a77559287f725731d92502c1159bdd6b13889ba7b6242ea1425f4aa9b2e4d3
+DIST libpcap-1.8.1.tar.gz 753405 SHA256 35c45ce725933894878707a00f60bb271244902363ec7097f8fa016dae278c5d SHA512 7e6a7351bb4213e1c3dd95ef7a460e91f733d933e39ba518ad8ba6d2f86b6e7cfa50ae667c8dc1300ef47bf8693ac8a1f18e068f41175ca5d0147a0b72278882 WHIRLPOOL dfc172bdecff1b93e549d0fe80068ccf6fcbd5dcf4a1cda0a1c34c2bfd702237988655f5e6bb91fec32299e0517593b192fde2a8179df17ab35b8db98f024cef
+EBUILD libpcap-1.8.1-r1.ebuild 1924 SHA256 8480f392edf6056432e15bb39cf574baa02a5a2a87f270bb30ca55acdccde1cf SHA512 fcf5ddcc40205e24d5654b01b34f065df81c64f8e2b6bc33c0e97b693f00a27bc98a7bb764548487156519a78c9690569dadfcca3f3981eab7ecedc216d44911 WHIRLPOOL 4ff60cb1ac574ea5b02343b409367b95305576cd8ff8468042fc0d9ec7a3a6904b49215a7bb5588213eeb53f3cf44711bb06e9b4f4de48470e9e191d0ea9df65
+EBUILD libpcap-1.8.1.ebuild 1900 SHA256 fd3eb7c6775dbf9b90bc1c8cd4f99f1b593139719923642ab293c5bf3d034f74 SHA512 82f191130f7ae698489ff3011a7d943d9567eaf45155ec3b584a6f6ae383649261c6369e665e61de04baa12dcf674287425db42b88f0b31163753fcdaea549b5 WHIRLPOOL 9e2e920ad1b1b0ea7d02ad0bb725531ae915989ad841881b5b4b030f213300a1cfc15f05166d046dad1520d749fb6044673f2a2ef4b9dfc4de2a1fc29274100b
+EBUILD libpcap-9999.ebuild 1615 SHA256 f062584ca07302a1c5549d024e2479c6bf74abebca3d1f0c3fce970f0333f921 SHA512 7a146488f25a2e05f11f1eab1f7df288389859f0db805ad3a1f88f74c130af3d9cbcdfd42270080fed82eafafda69a1e596a02ee8a1cd0e61634ca9e1455748d WHIRLPOOL 059ef56f12090d5ff47a9d8d2108e75d6a7f1e3c1169b8c79bb4d7090bffe6f311c1d98323d76c9507692da5c18d0e27225172c0f032ace440e7b88043af65a8
+MISC ChangeLog 5049 SHA256 da87d85f3b36c4c5aaf151b4cbc89bdcee7a7e471690c2ff502642e7e22947ae SHA512 751ec814c5785caa62bb5666ec187ed7a5399ea4ded33a0b60bdb2788d5acf5dfb7c64a334046366a9ad9dfa69ec9b96624293e4e7803a36e94a830104252b75 WHIRLPOOL 1592fa1773b853f9d9183b17ad133fb0cb93f1e0115ad100e8285ee142b96afe3edac6c40f6f97174d320fabffebbd1b4b53ba1864eb1b7ac6ad541097ca2d57
+MISC ChangeLog-2015 32022 SHA256 b7affb0f789fbe92006ca22c34ac9fed5f67fc1d40ec0f745d089324bd1f7eb4 SHA512 3686e8efdf726af0ec9e73a2c4ee97bc0438e13e00e442f05c8e713a15529998098e6267aa746355a098dd7b7b31991765e759656e809e053adec02f0c44b711 WHIRLPOOL e6f26f68d0919d144784ad125022df6b14e3c5d22db52a7a168b66aba6739976a1ff023b7cce09b1d3a23f548bafc44ffe53b77941699126440ae87c6e9ce307
+MISC metadata.xml 475 SHA256 7702da1ffbf68f7f9dfa7b55074581e0b4e54d3a358cfdb919ad59210f5aa17f SHA512 ff92cbd5725e74f72d117b57d85858851ddf3b27046bf7d5b9e29cac8e07c98bb21e2a81ff8ffcec08adb062a42deb051019d60911a8b86ecd232a37e1b88170 WHIRLPOOL ace597d897ac2a2bb668f52adcea305e7453f9c9dc0c97fd20a351b89e75dafb49fc5841b718358a299b41e29da712ba286d497606e3ec4d78cf499d37eea07c
diff --git a/net-libs/libpcap/files/libpcap-1.6.1-prefix-solaris.patch b/net-libs/libpcap/files/libpcap-1.6.1-prefix-solaris.patch
new file mode 100644
index 000000000000..324aead551ae
--- /dev/null
+++ b/net-libs/libpcap/files/libpcap-1.6.1-prefix-solaris.patch
@@ -0,0 +1,35 @@
+Prefix' Solaris uses GNU ld
+
+--- a/aclocal.m4
++++ b/aclocal.m4
+@@ -415,7 +415,7 @@
+ aix*)
+ ;;
+
+- freebsd*|netbsd*|openbsd*|dragonfly*|linux*|osf*)
++ freebsd*|solaris*|netbsd*|openbsd*|dragonfly*|linux*|osf*)
+ #
+ # Platforms where the linker is the GNU linker
+ # or accepts command-line arguments like
+@@ -429,10 +429,10 @@
+ PIC_OPT=-fpic
+ case "$host_cpu" in
+
+- sparc64*)
++ sparc64*|sparcv9*)
+ case "$host_os" in
+
+- freebsd*|openbsd*)
++ freebsd*|solaris*|openbsd*)
+ PIC_OPT=-fPIC
+ ;;
+ esac
+@@ -497,7 +497,7 @@
+ V_SHLIB_OPT="-G -bnoentry -bexpall"
+ ;;
+
+- freebsd*|netbsd*|openbsd*|dragonfly*|linux*)
++ freebsd*|solaris*|netbsd*|openbsd*|dragonfly*|linux*)
+ #
+ # "cc" is GCC.
+ #
diff --git a/net-libs/libpcap/files/libpcap-1.8.1-cross-compile.patch b/net-libs/libpcap/files/libpcap-1.8.1-cross-compile.patch
new file mode 100644
index 000000000000..361cdeb5ec50
--- /dev/null
+++ b/net-libs/libpcap/files/libpcap-1.8.1-cross-compile.patch
@@ -0,0 +1,16 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -291,7 +291,12 @@
+ dnl XXX This could be done for cross-compiling, but for now it's not.
+ dnl
+ if test -z "$with_pcap" && test "$cross_compiling" = yes; then
+- AC_MSG_ERROR(pcap type not determined when cross-compiling; use --with-pcap=...)
++ if test -z "$with_pcap" ; then
++ case $host in
++ *-linux*) with_pcap="linux";;
++ *) AC_MSG_ERROR(pcap type not determined when cross-compiling; use --with-pcap=...);;
++ esac
++ fi
+ fi
+ AC_ARG_WITH(pcap,
+ AC_HELP_STRING([--with-pcap=TYPE],[use packet capture TYPE]))
diff --git a/net-libs/libpcap/files/libpcap-1.8.1-darwin.patch b/net-libs/libpcap/files/libpcap-1.8.1-darwin.patch
new file mode 100644
index 000000000000..650bea82518a
--- /dev/null
+++ b/net-libs/libpcap/files/libpcap-1.8.1-darwin.patch
@@ -0,0 +1,15 @@
+Prefix' Darwin systems are single arch, hijack Darwin7 case which assumes this setup
+Check for bluetooth/mgmt.h before use
+
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -1117,7 +1117,7 @@
+ if test "$enable_universal" != "no"; then
+ case "$host_os" in
+
+- darwin[0-7].*)
++ darwin**)
+ #
+ # Pre-Tiger. Build only for 32-bit PowerPC; no
+ # need for any special compiler or linker flags.
diff --git a/net-libs/libpcap/files/libpcap-1.8.1-libnl.patch b/net-libs/libpcap/files/libpcap-1.8.1-libnl.patch
new file mode 100644
index 000000000000..61dfc4e201d9
--- /dev/null
+++ b/net-libs/libpcap/files/libpcap-1.8.1-libnl.patch
@@ -0,0 +1,22 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -453,10 +453,6 @@
+
+ incdir=-I/usr/include/libnl3
+ libnldir=
+- if test x$withval != x ; then
+- libnldir=-L${withval}/lib/.libs
+- incdir=-I${withval}/include
+- fi
+
+ #
+ # Try libnl 3.x first.
+@@ -471,7 +467,7 @@
+ AC_DEFINE(HAVE_LIBNL_3_x,1,[if libnl exists and is version 3.x])
+ AC_DEFINE(HAVE_LIBNL_NLE,1,[libnl has NLE_FAILURE])
+ AC_DEFINE(HAVE_LIBNL_SOCKETS,1,[libnl has new-style socket api])
+- V_INCLS="$V_INCLS ${incdir}"
++ V_INCLS="${incdir} $V_INCLS"
+ have_any_nl="yes"
+ ],[], ${incdir} ${libnldir} -lnl-genl-3 -lnl-3 )
+
diff --git a/net-libs/libpcap/files/libpcap-1.8.1-usbmon.patch b/net-libs/libpcap/files/libpcap-1.8.1-usbmon.patch
new file mode 100644
index 000000000000..0b69e43a3f7d
--- /dev/null
+++ b/net-libs/libpcap/files/libpcap-1.8.1-usbmon.patch
@@ -0,0 +1,16 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -1493,10 +1493,9 @@
+ AC_DEFINE(PCAP_SUPPORT_USB, 1, [target host supports USB sniffing])
+ USB_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/files/libpcap-9999-cross-linux.patch b/net-libs/libpcap/files/libpcap-9999-cross-linux.patch
new file mode 100644
index 000000000000..f01a9ca5c935
--- /dev/null
+++ b/net-libs/libpcap/files/libpcap-9999-cross-linux.patch
@@ -0,0 +1,16 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -317,7 +317,12 @@
+ dnl XXX This could be done for cross-compiling, but for now it's not.
+ dnl
+ if test -z "$with_pcap" && test "$cross_compiling" = yes; then
+- AC_MSG_ERROR(pcap type not determined when cross-compiling; use --with-pcap=...)
++ if test -z "$with_pcap" ; then
++ case $host in
++ *-linux*) with_pcap="linux";;
++ *) AC_MSG_ERROR(pcap type not determined when cross-compiling; use --with-pcap=...);;
++ esac
++ fi
+ fi
+ AC_ARG_WITH(pcap,
+ AC_HELP_STRING([--with-pcap=TYPE],[use packet capture TYPE]))
diff --git a/net-libs/libpcap/files/libpcap-9999-libnl.patch b/net-libs/libpcap/files/libpcap-9999-libnl.patch
new file mode 100644
index 000000000000..f243906ebad2
--- /dev/null
+++ b/net-libs/libpcap/files/libpcap-9999-libnl.patch
@@ -0,0 +1,22 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -492,10 +492,6 @@
+
+ incdir=-I/usr/include/libnl3
+ libnldir=
+- if test x$withval != x ; then
+- libnldir=-L${withval}/lib/.libs
+- incdir=-I${withval}/include
+- fi
+
+ #
+ # Try libnl 3.x first.
+@@ -510,7 +506,7 @@
+ AC_DEFINE(HAVE_LIBNL_3_x,1,[if libnl exists and is version 3.x])
+ AC_DEFINE(HAVE_LIBNL_NLE,1,[libnl has NLE_FAILURE])
+ AC_DEFINE(HAVE_LIBNL_SOCKETS,1,[libnl has new-style socket api])
+- V_INCLS="$V_INCLS ${incdir}"
++ V_INCLS="${incdir} $V_INCLS"
+ have_any_nl="yes"
+ ],[], ${incdir} ${libnldir} -lnl-genl-3 -lnl-3 )
+
diff --git a/net-libs/libpcap/files/libpcap-9999-prefix-darwin.patch b/net-libs/libpcap/files/libpcap-9999-prefix-darwin.patch
new file mode 100644
index 000000000000..9bcbfe92ee0a
--- /dev/null
+++ b/net-libs/libpcap/files/libpcap-9999-prefix-darwin.patch
@@ -0,0 +1,14 @@
+Prefix' Darwin systems are single arch, hijack Darwin7 case which assumes this setup
+Check for bluetooth/mgmt.h before use
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -1271,7 +1267,7 @@
+ if test "$enable_universal" != "no"; then
+ case "$host_os" in
+
+- darwin[0-7].*)
++ darwin**)
+ #
+ # Pre-Tiger. Build only for 32-bit PowerPC; no
+ # need for any special compiler or linker flags.
diff --git a/net-libs/libpcap/libpcap-1.8.1-r1.ebuild b/net-libs/libpcap/libpcap-1.8.1-r1.ebuild
new file mode 100644
index 000000000000..af93e87f6c24
--- /dev/null
+++ b/net-libs/libpcap/libpcap-1.8.1-r1.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit autotools eutils multilib-minimal
+
+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 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-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.6.1-prefix-solaris.patch
+ "${FILESDIR}"/${PN}-1.8.1-cross-compile.patch
+ "${FILESDIR}"/${PN}-1.8.1-darwin.patch
+ "${FILESDIR}"/${PN}-1.8.1-libnl.patch
+ "${FILESDIR}"/${PN}-1.8.1-usbmon.patch
+)
+
+src_prepare() {
+ default
+
+ eapply_user
+
+ 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{,.dag,.linux,.macosx,.septel}
+
+ # 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
+}
diff --git a/net-libs/libpcap/libpcap-1.8.1.ebuild b/net-libs/libpcap/libpcap-1.8.1.ebuild
new file mode 100644
index 000000000000..3a8543b92dd7
--- /dev/null
+++ b/net-libs/libpcap/libpcap-1.8.1.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit autotools eutils multilib-minimal
+
+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 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-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.6.1-prefix-solaris.patch
+ "${FILESDIR}"/${PN}-1.8.1-cross-compile.patch
+ "${FILESDIR}"/${PN}-1.8.1-darwin.patch
+ "${FILESDIR}"/${PN}-1.8.1-libnl.patch
+ "${FILESDIR}"/${PN}-1.8.1-usbmon.patch
+)
+
+src_prepare() {
+ default
+
+ eapply_user
+
+ 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{,.dag,.linux,.macosx,.septel}
+
+ # 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
+ fi
+}
diff --git a/net-libs/libpcap/libpcap-9999.ebuild b/net-libs/libpcap/libpcap-9999.ebuild
new file mode 100644
index 000000000000..28f3488e0abd
--- /dev/null
+++ b/net-libs/libpcap/libpcap-9999.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit autotools eutils git-r3 multilib-minimal
+
+DESCRIPTION="A system-independent library for user-level network packet capture"
+EGIT_REPO_URI="https://github.com/the-tcpdump-group/libpcap"
+HOMEPAGE="
+ http://www.tcpdump.org/
+ ${EGIT_REPO_URI}
+"
+
+LICENSE="BSD"
+SLOT="0"
+IUSE="bluetooth dbus netlink static-libs usb"
+KEYWORDS=""
+
+RDEPEND="
+ bluetooth? ( net-wireless/bluez:=[${MULTILIB_USEDEP}] )
+ dbus? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
+ netlink? ( dev-libs/libnl:3[${MULTILIB_USEDEP}] )
+ usb? ( virtual/libusb:1[${MULTILIB_USEDEP}] )
+"
+DEPEND="
+ ${RDEPEND}
+ sys-devel/flex
+ virtual/yacc
+ dbus? ( virtual/pkgconfig[${MULTILIB_USEDEP}] )
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.6.1-prefix-solaris.patch
+ "${FILESDIR}"/${PN}-9999-cross-linux.patch
+ "${FILESDIR}"/${PN}-9999-libnl.patch
+ "${FILESDIR}"/${PN}-9999-prefix-darwin.patch
+)
+
+src_prepare() {
+ default
+
+ eautoreconf
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE="${S}" \
+ econf \
+ $(use_enable bluetooth) \
+ $(use_enable dbus) \
+ $(use_enable usb) \
+ $(use_with netlink libnl)
+}
+
+multilib_src_compile() {
+ emake all shared
+}
+
+multilib_src_install_all() {
+ dodoc CREDITS CHANGES VERSION TODO README{,.dag,.linux,.macosx,.septel}
+
+ # 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
+}
diff --git a/net-libs/libpcap/metadata.xml b/net-libs/libpcap/metadata.xml
new file mode 100644
index 000000000000..488e8703b179
--- /dev/null
+++ b/net-libs/libpcap/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+<email>netmon@gentoo.org</email>
+<name>Gentoo network monitoring and analysis project</name>
+</maintainer>
+<use>
+<flag name="netlink">Use <pkg>dev-libs/libnl</pkg> to put wireless interfaces in monitor mode.</flag>
+</use>
+<upstream>
+<remote-id type="github">the-tcpdump-group/libpcap</remote-id>
+</upstream>
+</pkgmetadata>