summaryrefslogtreecommitdiff
path: root/dev-libs/vectorscan/vectorscan-5.4.11.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-11-29 22:58:59 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-11-29 22:58:59 +0000
commite7b6f003e8384cdfc8c0e7603329e969d8806c24 (patch)
tree43f634afff484e1aabb0f8eccbd7c8d109492bfe /dev-libs/vectorscan/vectorscan-5.4.11.ebuild
parent70a061c3f38986cf8f04a4c6567114cea348169e (diff)
gentoo auto-resync : 29:11:2023 - 22:58:59
Diffstat (limited to 'dev-libs/vectorscan/vectorscan-5.4.11.ebuild')
-rw-r--r--dev-libs/vectorscan/vectorscan-5.4.11.ebuild74
1 files changed, 74 insertions, 0 deletions
diff --git a/dev-libs/vectorscan/vectorscan-5.4.11.ebuild b/dev-libs/vectorscan/vectorscan-5.4.11.ebuild
new file mode 100644
index 000000000000..b047e39dd69f
--- /dev/null
+++ b/dev-libs/vectorscan/vectorscan-5.4.11.ebuild
@@ -0,0 +1,74 @@
+# Copyright 2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake edo flag-o-matic
+
+DESCRIPTION="A portable fork of the high-performance regular expression matching library"
+HOMEPAGE="
+ https://www.vectorcamp.gr/vectorscan/
+ https://github.com/VectorCamp/vectorscan
+"
+SRC_URI="
+ https://github.com/VectorCamp/vectorscan/archive/refs/tags/${PN}/${PV}.tar.gz
+ -> ${P}.tar.gz
+"
+
+S="${WORKDIR}/${PN}-${P}"
+
+LICENSE="BSD"
+SLOT="0/5"
+KEYWORDS="~amd64"
+IUSE="cpu_flags_x86_avx2 cpu_flags_x86_sse4_2"
+
+DEPEND="
+ dev-libs/boost:=
+"
+RDEPEND="
+ ${DEPEND}
+ !dev-libs/hyperscan
+"
+BDEPEND="
+ dev-util/ragel
+ virtual/pkgconfig
+"
+
+REQUIRED_USE="
+ x86? ( cpu_flags_x86_sse4_2 )
+ amd64? ( cpu_flags_x86_sse4_2 )
+"
+
+src_prepare() {
+ local sedargs=(
+ # Respect user -m flags (march/mtune)
+ -e '/set(ARCH_CX*_FLAG/d'
+ # Respect user -O flags
+ -e '/set(OPT_CX*_FLAG/d'
+ )
+ sed -i "${sedargs[@]}" CMakeLists.txt cmake/cflags-x86.cmake || die
+ cmake_src_prepare
+}
+
+src_configure() {
+ use cpu_flags_x86_avx2 && append-flags -mavx2
+ use cpu_flags_x86_sse4_2 && append-flags -msse4.2
+
+ local mycmakeargs=(
+ -DBUILD_BENCHMARKS=OFF
+ -DBUILD_EXAMPLES=OFF
+ -DBUILD_SHARED_LIBS=ON
+
+ -DBUILD_AVX2=$(usex cpu_flags_x86_avx2)
+
+ -DUSE_CPU_NATIVE=OFF
+ )
+ cmake_src_configure
+}
+
+src_test() {
+ # The unit target cannot be used currently due to a bug in it,
+ # see https://github.com/VectorCamp/vectorscan/issues/202
+ #cmake_build unit
+ edo "${BUILD_DIR}/bin/unit-hyperscan"
+}