dev-qt/qtwidgets: stable 5.14.2 for ppc, bug #719732
[gentoo.git] / net-libs / libpcap / libpcap-1.9.1-r2.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5 inherit autotools multilib-minimal
6
7 DESCRIPTION="A system-independent library for user-level network packet capture"
8 HOMEPAGE="
9         https://www.tcpdump.org/
10         https://github.com/the-tcpdump-group/libpcap
11 "
12 SRC_URI="
13         https://github.com/the-tcpdump-group/${PN}/archive/${P/_}.tar.gz
14 "
15
16 LICENSE="BSD"
17 SLOT="0"
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"
20
21 RDEPEND="
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}] )
26 "
27 DEPEND="
28         ${RDEPEND}
29         sys-devel/flex
30         virtual/yacc
31         dbus? ( virtual/pkgconfig[${MULTILIB_USEDEP}] )
32 "
33
34 S=${WORKDIR}/${PN}-${P/_}
35
36 PATCHES=(
37         "${FILESDIR}"/${PN}-1.8.1-usbmon.patch
38         "${FILESDIR}"/${PN}-1.9.1-pcap-config.patch
39 )
40
41 src_prepare() {
42         default
43
44         echo ${PV} > VERSION || die
45
46         eautoreconf
47 }
48
49 multilib_src_configure() {
50         ECONF_SOURCE="${S}" \
51         econf \
52                 $(use_enable bluetooth) \
53                 $(use_enable dbus) \
54                 $(use_enable remote) \
55                 $(use_enable usb) \
56                 $(use_enable yydebug) \
57                 $(use_with netlink libnl) \
58                 --disable-rdma \
59                 --enable-ipv6
60 }
61
62 multilib_src_compile() {
63         emake all shared
64 }
65
66 multilib_src_install_all() {
67         dodoc CREDITS CHANGES VERSION TODO README.* doc/README.*
68
69         # remove static libraries (--disable-static does not work)
70         if ! use static-libs; then
71                 find "${ED}" -name '*.a' -exec rm {} + || die
72         fi
73
74         find "${ED}" -name '*.la' -delete || die
75
76         # We need this to build pppd on G/FBSD systems
77         if [[ "${USERLAND}" == "BSD" ]]; then
78                 insinto /usr/include
79                 doins pcap-int.h portability.h
80         fi
81 }