Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 01 May 2026 08:21:58 +0000
From:      Xin LI <delphij@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: e70dc4653b10 - main - devel/vectorscan: Add vectorscan 5.4.12
Message-ID:  <69f462a6.3e5bc.7d4f833e@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by delphij:

URL: https://cgit.FreeBSD.org/ports/commit/?id=e70dc4653b10f5ea53da0a2b6ed286fe61555e22

commit e70dc4653b10f5ea53da0a2b6ed286fe61555e22
Author:     Xin LI <delphij@FreeBSD.org>
AuthorDate: 2025-10-30 05:25:07 +0000
Commit:     Xin LI <delphij@FreeBSD.org>
CommitDate: 2026-05-01 08:20:55 +0000

    devel/vectorscan: Add vectorscan 5.4.12
    
    Portable fork of high-performance multiple regex matching library
---
 devel/Makefile                                     |  1 +
 devel/vectorscan/Makefile                          | 66 ++++++++++++++++++++++
 devel/vectorscan/distinfo                          |  5 ++
 .../vectorscan/files/patch-cmake_build__wrapper.sh | 27 +++++++++
 devel/vectorscan/pkg-descr                         | 12 ++++
 devel/vectorscan/pkg-plist                         | 14 +++++
 6 files changed, 125 insertions(+)

diff --git a/devel/Makefile b/devel/Makefile
index 1b3717183446..aeda92049c62 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -8698,6 +8698,7 @@
     SUBDIR += vc-intrinsics
     SUBDIR += vcglib
     SUBDIR += vdf
+    SUBDIR += vectorscan
     SUBDIR += venom
     SUBDIR += vera++
     SUBDIR += vexcl
diff --git a/devel/vectorscan/Makefile b/devel/vectorscan/Makefile
new file mode 100644
index 000000000000..dd8bc0cea64d
--- /dev/null
+++ b/devel/vectorscan/Makefile
@@ -0,0 +1,66 @@
+PORTNAME=	vectorscan
+PORTVERSION=	5.4.12
+DISTVERSIONPREFIX=	vectorscan/
+CATEGORIES=	devel textproc
+MASTER_SITES=	SF/boost/boost/${BOOST_VERSION}:boost
+DISTFILES=	boost_${BOOST_VERSION_UNDER}.tar.gz:boost
+
+MAINTAINER=	delphij@FreeBSD.org
+COMMENT=	Portable fork of high-performance multiple regex matching library
+WWW=		https://github.com/VectorCamp/vectorscan
+
+LICENSE=	BSD3CLAUSE
+
+BUILD_DEPENDS=	ragel:devel/ragel
+
+USES=	compiler:c++11-lib cmake pathfix python:build
+USE_GITHUB=	yes
+GH_ACCOUNT=	VectorCamp
+
+ONLY_FOR_ARCHS=		aarch64 amd64
+
+OPTIONS_DEFINE=		SHARED
+OPTIONS_RADIO=		ISA
+OPTIONS_RADIO_ISA=	NATIVE FAT_RUNTIME
+OPTIONS_RADIO_ISA_amd64=	AVX2 AVX512 AVX512VBMI
+OPTIONS_RADIO_ISA_aarch64=	SVE SVE2 SVE2_BITPERM
+OPTIONS_SUB=		yes
+SHARED_DESC=		Build shared library
+NATIVE_DESC=		Build with native CPU tunes
+FAT_RUNTIME_DESC=	Build for multiple microarchitectures with runtime ISA dispatch
+AVX2_DESC=		Enable AVX2 instructions for fixed-ISA builds
+AVX512_DESC=		Enable AVX512 instructions for fixed-ISA builds
+AVX512VBMI_DESC=	Enable AVX512VBMI instructions for fixed-ISA builds
+SVE_DESC=		Enable Arm SVE instructions
+SVE2_DESC=		Enable Arm SVE2 instructions
+SVE2_BITPERM_DESC=	Enable Arm SVE2 bit permutation instructions
+OPTIONS_DEFAULT=	SHARED
+OPTIONS_DEFAULT_amd64=	FAT_RUNTIME
+
+CMAKE_ARGS+=		-DBOOST_ROOT=${WRKDIR}/boost_${BOOST_VERSION_UNDER}
+NATIVE_CMAKE_BOOL=	USE_CPU_NATIVE
+FAT_RUNTIME_CMAKE_BOOL=	FAT_RUNTIME
+AVX2_CMAKE_BOOL=	BUILD_AVX2
+AVX512_CMAKE_ON=	-DBUILD_AVX2:BOOL=ON -DBUILD_AVX512:BOOL=ON
+AVX512VBMI_CMAKE_ON=	-DBUILD_AVX2:BOOL=ON -DBUILD_AVX512:BOOL=ON \
+			-DBUILD_AVX512VBMI:BOOL=ON
+SVE_CMAKE_BOOL=		BUILD_SVE
+SVE2_CMAKE_ON=		-DBUILD_SVE:BOOL=ON -DBUILD_SVE2:BOOL=ON
+SVE2_BITPERM_CMAKE_ON=	-DBUILD_SVE:BOOL=ON -DBUILD_SVE2:BOOL=ON \
+			-DBUILD_SVE2_BITPERM:BOOL=ON
+SHARED_CMAKE_ON=	-DBUILD_SHARED_LIBS:BOOL=ON -DBUILD_STATIC_LIBS:BOOL=ON
+SHARED_CMAKE_OFF=	-DBUILD_STATIC_LIBS:BOOL=ON
+SHARED_VARS=		PLIST_SUB+="SOVERSION=${PORTVERSION}" \
+			PLIST_SUB+="SOSHORTVERSION=${PORTVERSION:R:R}"
+
+CFLAGS+=	-fPIC
+BOOST_VERSION=	1.89.0
+BOOST_VERSION_UNDER=	${BOOST_VERSION:C/\./_/g}
+
+post-patch:
+	${RM} ${WRKSRC}/tools/CMakeLists.txt
+
+do-test:
+	cd ${BUILD_WRKSRC} && ${MAKE_CMD} unit
+
+.include <bsd.port.mk>
diff --git a/devel/vectorscan/distinfo b/devel/vectorscan/distinfo
new file mode 100644
index 000000000000..70e3252ab674
--- /dev/null
+++ b/devel/vectorscan/distinfo
@@ -0,0 +1,5 @@
+TIMESTAMP = 1761796423
+SHA256 (boost_1_89_0.tar.gz) = 9de758db755e8330a01d995b0a24d09798048400ac25c03fc5ea9be364b13c93
+SIZE (boost_1_89_0.tar.gz) = 190099283
+SHA256 (VectorCamp-vectorscan-vectorscan-5.4.12_GH0.tar.gz) = 1ac4f3c038ac163973f107ac4423a6b246b181ffd97fdd371696b2517ec9b3ed
+SIZE (VectorCamp-vectorscan-vectorscan-5.4.12_GH0.tar.gz) = 20849791
diff --git a/devel/vectorscan/files/patch-cmake_build__wrapper.sh b/devel/vectorscan/files/patch-cmake_build__wrapper.sh
new file mode 100644
index 000000000000..7f1908b73d1c
--- /dev/null
+++ b/devel/vectorscan/files/patch-cmake_build__wrapper.sh
@@ -0,0 +1,27 @@
+--- cmake/build_wrapper.sh.orig	2025-10-30 04:35:01 UTC
++++ cmake/build_wrapper.sh
+@@ -17,19 +17,19 @@ if [ `uname` = "FreeBSD" ]; then
+ LIBC_SO=$("$@" --print-file-name=libc.so.6)
+ NM_FLAG="-f"
+ if [ `uname` = "FreeBSD" ]; then
+-    # for freebsd, we will specify the name, 
++    # for freebsd, we will specify the name,
+     # we will leave it work as is in linux
+     LIBC_SO=/lib/libc.so.7
+-    # also, in BSD, the nm flag -F corresponds to the -f flag in linux.
+-    NM_FLAG="-F"
++    # FreeBSD nm uses -f with full format name, Linux -f uses single letters
++    NM_FLAG="-f posix"
+ fi
+ cp ${KEEPSYMS_IN} ${KEEPSYMS}
+ # get all symbols from libc and turn them into patterns
+-nm ${NM_FLAG} p -g -D ${LIBC_SO} | sed 's/\([^ @]*\).*/^\1$/' >> ${KEEPSYMS}
++nm ${NM_FLAG} -p -g -D ${LIBC_SO} | sed 's/\([^ @]*\).*/^\1$/' >> ${KEEPSYMS}
+ # build the object
+ "$@"
+ # rename the symbols in the object
+-nm ${NM_FLAG} p -g ${OUT} | cut -f1 -d' ' | grep -v -f ${KEEPSYMS} | sed -e "s/\(.*\)/\1\ ${PREFIX}_\1/" >> ${SYMSFILE}
++nm ${NM_FLAG} -p -g ${OUT} | cut -f1 -d' ' | grep -v -f ${KEEPSYMS} | sed -e "s/\(.*\)/\1\ ${PREFIX}_\1/" >> ${SYMSFILE}
+ if test -s ${SYMSFILE}
+ then
+     objcopy --redefine-syms=${SYMSFILE} ${OUT}
diff --git a/devel/vectorscan/pkg-descr b/devel/vectorscan/pkg-descr
new file mode 100644
index 000000000000..99a29731e5bf
--- /dev/null
+++ b/devel/vectorscan/pkg-descr
@@ -0,0 +1,12 @@
+Vectorscan is a portable fork of Intel's Hyperscan, a high-performance multiple
+regex matching library. It follows the regular expression syntax of the
+commonly-used libpcre library, yet functions as a standalone library with its
+own API written in C.
+
+Vectorscan uses hybrid automata techniques to allow simultaneous matching of
+large numbers (up to tens of thousands) of regular expressions, as well as
+matching of regular expressions across streams of data.
+
+This portable fork extends support beyond x86 to additional architectures
+including ARM NEON/ASIMD and Power VSX, making it suitable for a wider range
+of platforms while maintaining API compatibility with Hyperscan 5.4.
diff --git a/devel/vectorscan/pkg-plist b/devel/vectorscan/pkg-plist
new file mode 100644
index 000000000000..7b42fd94c41f
--- /dev/null
+++ b/devel/vectorscan/pkg-plist
@@ -0,0 +1,14 @@
+include/hs/hs.h
+include/hs/hs_common.h
+include/hs/hs_compile.h
+include/hs/hs_runtime.h
+include/hs/hs_version.h
+lib/libhs.a
+lib/libhs_runtime.a
+libdata/pkgconfig/libhs.pc
+%%SHARED%%lib/libhs.so.%%SOVERSION%%
+%%SHARED%%lib/libhs.so.%%SOSHORTVERSION%%
+%%SHARED%%lib/libhs.so
+%%SHARED%%lib/libhs_runtime.so.%%SOVERSION%%
+%%SHARED%%lib/libhs_runtime.so.%%SOSHORTVERSION%%
+%%SHARED%%lib/libhs_runtime.so


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69f462a6.3e5bc.7d4f833e>