You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/dev-libs/hyperscan/hyperscan-5.4.1.ebuild

58 lines
1.2 KiB

# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{9..11} )
inherit cmake flag-o-matic python-any-r1
DESCRIPTION="High-performance regular expression matching library"
SRC_URI="https://github.com/intel/hyperscan/archive/v${PV}.tar.gz -> ${P}.tar.gz"
HOMEPAGE="
https://www.hyperscan.io/
https://github.com/intel/hyperscan
"
LICENSE="BSD"
SLOT="0"
KEYWORDS="-* ~amd64 ~x86"
IUSE="cpu_flags_x86_avx2 cpu_flags_x86_ssse3"
RDEPEND="dev-libs/boost:="
DEPEND="${RDEPEND}"
BDEPEND="
${PYTHON_DEPS}
dev-util/ragel
"
# We can't default this to on as it's against the expectation of
# how CPU_FLAGS_* work for users.
REQUIRED_USE="cpu_flags_x86_ssse3"
src_prepare() {
# Respect user -O flags
sed -i '/set(OPT_CX*_FLAG/d' CMakeLists.txt || die
# upstream workaround
append-cxxflags -Wno-redundant-move
cmake_src_prepare
}
src_configure() {
use cpu_flags_x86_ssse3 && append-flags -mssse3
use cpu_flags_x86_avx2 && append-flags -mavx2
local mycmakeargs=(
-DBUILD_SHARED_LIBS=ON
-DBUILD_STATIC_AND_SHARED=OFF
-DBUILD_EXAMPLES=OFF
-DFAT_RUNTIME=false
)
cmake_src_configure
}
src_test() {
"${BUILD_DIR}"/bin/unit-hyperscan || die
}