1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
5 inherit autotools multilib-minimal
7 DESCRIPTION="A system-independent library for user-level network packet capture"
9 https://www.tcpdump.org/
10 https://github.com/the-tcpdump-group/libpcap
13 https://github.com/the-tcpdump-group/${PN}/archive/${P/_}.tar.gz
18 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
19 IUSE="bluetooth dbus netlink -remote static-libs usb -yydebug"
22 bluetooth? ( net-wireless/bluez:=[${MULTILIB_USEDEP}] )
23 dbus? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
24 netlink? ( dev-libs/libnl:3[${MULTILIB_USEDEP}] )
25 usb? ( virtual/libusb:1[${MULTILIB_USEDEP}] )
31 dbus? ( virtual/pkgconfig[${MULTILIB_USEDEP}] )
34 S=${WORKDIR}/${PN}-${P/_}
37 "${FILESDIR}"/${PN}-1.8.1-usbmon.patch
38 "${FILESDIR}"/${PN}-1.9.1-pcap-config.patch
44 echo ${PV} > VERSION || die
49 multilib_src_configure() {
52 $(use_enable bluetooth) \
54 $(use_enable remote) \
56 $(use_enable yydebug) \
57 $(use_with netlink libnl) \
62 multilib_src_compile() {
66 multilib_src_install_all() {
67 dodoc CREDITS CHANGES VERSION TODO README.* doc/README.*
69 # remove static libraries (--disable-static does not work)
70 if ! use static-libs; then
71 find "${ED}" -name '*.a' -exec rm {} + || die
74 find "${ED}" -name '*.la' -delete || die
76 # We need this to build pppd on G/FBSD systems
77 if [[ "${USERLAND}" == "BSD" ]]; then
79 doins pcap-int.h portability.h