dev-python/zipp: keyworded 0.5.2 for ppc, bug #690956
[gentoo.git] / net-libs / daq / daq-2.0.6-r1.ebuild
1 # Copyright 1999-2018 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI="7"
5 inherit autotools multilib
6
7 DESCRIPTION="Data Acquisition library, for packet I/O"
8 HOMEPAGE="https://www.snort.org/"
9 SRC_URI="https://www.snort.org/downloads/snort/${P}.tar.gz"
10
11 LICENSE="GPL-2"
12 SLOT="0"
13 KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~sparc ~x86"
14 IUSE="ipv6 +afpacket +dump +pcap nfq ipq static-libs"
15
16 PCAP_DEPEND=">=net-libs/libpcap-1.0.0"
17 IPT_DEPEND="
18         >=net-firewall/iptables-1.4.10
19         dev-libs/libdnet
20         net-libs/libnetfilter_queue
21
22 "
23 DEPEND="
24         dump? ( ${PCAP_DEPEND} )
25         ipq? ( ${IPT_DEPEND} )
26         nfq? ( ${IPT_DEPEND} )
27         pcap? ( ${PCAP_DEPEND} )
28 "
29 RDEPEND="${DEPEND}"
30 PATCHES=(
31         "${FILESDIR}"/${PN}-2.0.6-parallel-grammar.patch #673390
32         "${FILESDIR}"/${PN}-2.0.6-static-libs.patch
33 )
34
35 src_prepare() {
36         default
37
38         eautoreconf
39 }
40
41 src_configure() {
42         # We forced libpcap to 1.x, so we can set this cache var so
43         # cross-compiling doesn't break on us.
44         daq_cv_libpcap_version_1x=yes \
45         econf \
46                 $(use_enable afpacket afpacket-module) \
47                 $(use_enable dump dump-module) \
48                 $(use_enable ipq ipq-module) \
49                 $(use_enable ipv6) \
50                 $(use_enable nfq nfq-module) \
51                 $(use_enable pcap pcap-module) \
52                 $(use_enable static-libs static) \
53                 --disable-bundled-modules \
54                 --disable-ipfw-module \
55                 --enable-shared
56 }
57
58 DOCS=( ChangeLog README )
59
60 src_install() {
61         default
62
63         find "${ED}" -name '*.la' -delete || die
64
65         # If not using static-libs don't install the static libraries
66         # This has been bugged upstream
67         if ! use static-libs; then
68                 for z in libdaq_static libdaq_static_modules; do
69                         rm "${D}"usr/$(get_libdir)/${z}.a
70                 done
71         fi
72 }
73
74 pkg_postinst() {
75         einfo "The Data Acquisition library (DAQ) for packet I/O replaces direct"
76         einfo "calls to PCAP functions with an abstraction layer that facilitates"
77         einfo "operation on a variety of hardware and software interfaces without"
78         einfo "requiring changes to application such as Snort."
79         einfo
80         einfo "Please see the README file for DAQ for information about specific"
81         einfo "DAQ modules."
82 }