42551e93ced8ccccfd7a60cf5a7363c89ee6d163
[gentoo.git] / dev-libs / hyperscan / hyperscan-5.2.0.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 PYTHON_COMPAT=( python2_7 )
7
8 inherit cmake python-r1 flag-o-matic
9
10 DESCRIPTION="High-performance regular expression matching library"
11 SRC_URI="https://github.com/intel/hyperscan/archive/v${PV}.tar.gz -> ${P}.tar.gz"
12 HOMEPAGE="https://www.hyperscan.io/ https://github.com/intel/hyperscan"
13
14 LICENSE="BSD"
15 SLOT="0"
16 KEYWORDS="~amd64 ~x86"
17 IUSE="cpu_flags_x86_ssse3 static-libs"
18
19 RDEPEND="${PYTHON_DEPS}
20         dev-util/ragel
21         dev-libs/boost
22         net-libs/libpcap"
23 BDEPEND="${RDEPEND}"
24
25 REQUIRED_USE="cpu_flags_x86_ssse3 ${PYTHON_REQUIRED_USE}"
26
27 src_prepare() {
28         # upstream workaround
29         append-cxxflags -Wno-redundant-move
30         cmake_src_prepare
31 }
32
33 src_configure() {
34         local mycmakeargs=(
35                 -DBUILD_SHARED_LIBS=$(usex static-libs OFF ON)
36                 -DBUILD_STATIC_AND_SHARED=$(usex static-libs ON OFF)
37         )
38         cmake_src_configure
39 }