git: 7cdbc38fdca6 - main - devel/srell: [NEW PORT] Std::regex-like regular expression template library for C++

From: Älven <alven_at_FreeBSD.org>
Date: Sat, 20 Sep 2025 09:13:14 UTC
The branch main has been updated by alven:

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

commit 7cdbc38fdca6f60cba946f6b9d8caa8b264d4eb6
Author:     Älven <alven@FreeBSD.org>
AuthorDate: 2025-09-19 11:29:43 +0000
Commit:     Älven <alven@FreeBSD.org>
CommitDate: 2025-09-20 09:13:00 +0000

    devel/srell: [NEW PORT] Std::regex-like regular expression template library for C++
    
    SRELL (std::regex-like library) is a Unicode-aware regular expression
    template library for C++.
    
    WWW:            https://www.akenotsuki.com/misc/srell/en/
    
    Approved by:    yuri@ (Mentor)
    
    Differential Revision: https://reviews.freebsd.org/D52521
---
 devel/Makefile        |  1 +
 devel/srell/Makefile  | 43 +++++++++++++++++++++++++++++++++++++++++++
 devel/srell/distinfo  |  3 +++
 devel/srell/pkg-descr | 19 +++++++++++++++++++
 devel/srell/pkg-plist |  5 +++++
 5 files changed, 71 insertions(+)

diff --git a/devel/Makefile b/devel/Makefile
index 50e67d55e379..9a9051857929 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -8265,6 +8265,7 @@
     SUBDIR += spr
     SUBDIR += spread-sheet-widget
     SUBDIR += srecord
+    SUBDIR += srell
     SUBDIR += sse2neon
     SUBDIR += st
     SUBDIR += stack
diff --git a/devel/srell/Makefile b/devel/srell/Makefile
new file mode 100644
index 000000000000..6ffbd24b7c61
--- /dev/null
+++ b/devel/srell/Makefile
@@ -0,0 +1,43 @@
+PORTNAME=	srell
+DISTVERSION=	4.070
+CATEGORIES=	devel
+MASTER_SITES=	https://www.akenotsuki.com/misc/${PORTNAME}/releases/
+DISTNAME=	${PORTNAME}${DISTVERSION:S/./_/}
+
+MAINTAINER=	alven@FreeBSD.org
+COMMENT=	Std::regex-like regular expression template library for C++
+WWW=		https://www.akenotsuki.com/misc/srell/en/
+
+LICENSE=	BSD2CLAUSE
+LICENSE_FILE=	${WRKSRC}/license.txt
+
+USES=		compiler:c++11-lang zip
+
+NO_ARCH=	yes
+NO_BUILD=	yes
+
+NO_WRKSUBDIR=	yes
+
+OPTIONS_DEFINE=	DOCS
+
+do-install:
+	${MKDIR} ${STAGEDIR}${PREFIX}/include/${PORTNAME}
+	cd ${WRKSRC} && \
+		${INSTALL_DATA} srell.hpp \
+				srell_ucfdata2.h \
+				srell_updata3.h \
+		${STAGEDIR}${PREFIX}/include/${PORTNAME}
+
+post-install-DOCS-on:
+	${MKDIR} ${STAGEDIR}${DOCSDIR}
+	${INSTALL_DATA} ${WRKSRC}/readme_*.txt ${STAGEDIR}${DOCSDIR}
+
+do-test:
+	@cd ${WRKSRC}/misc && \
+		${SETENVI} ${WRK_ENV} ${TEST_ENV} ${CXX} -o conftest conftest.cpp && \
+		./conftest utf8c && \
+		./conftest utf16 && \
+		./conftest utf32 && \
+		./conftest utf32w
+
+.include <bsd.port.mk>
diff --git a/devel/srell/distinfo b/devel/srell/distinfo
new file mode 100644
index 000000000000..91d863ea7eb8
--- /dev/null
+++ b/devel/srell/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1758279311
+SHA256 (srell4_070.zip) = 4523b6e3e8a5b82a0cbd13c8d2bd5a2e08afd7852ef74b2451ea57b75eb1b60f
+SIZE (srell4_070.zip) = 390702
diff --git a/devel/srell/pkg-descr b/devel/srell/pkg-descr
new file mode 100644
index 000000000000..c1276e066a43
--- /dev/null
+++ b/devel/srell/pkg-descr
@@ -0,0 +1,19 @@
+SRELL (std::regex-like library) is a Unicode-aware regular expression template
+library for C++.
+
+* Header-only and the same class design as std::regex
+
+SRELL is a header-only template library and does not need any
+installation. SRELL has an ECMAScript (JavaScript) compatible regular expression
+engine wrapped into the same class design as std::regex. As APIs are compatible,
+SRELL can be used in the same way as std::regex (or boost::regex on which
+std::regex is based).
+
+* Unicode-specific implementation
+
+SRELL has native support for Unicode.
+
+* Consideration for ignore-case (icase) search
+
+SRELL has been tuned up not to slow down remarkably when case-insensitive
+(icase) search is performed.
diff --git a/devel/srell/pkg-plist b/devel/srell/pkg-plist
new file mode 100644
index 000000000000..2c21e9fbdfb6
--- /dev/null
+++ b/devel/srell/pkg-plist
@@ -0,0 +1,5 @@
+include/srell/srell.hpp
+include/srell/srell_ucfdata2.h
+include/srell/srell_updata3.h
+%%PORTDOCS%%%%DOCSDIR%%/readme_en.txt
+%%PORTDOCS%%%%DOCSDIR%%/readme_ja.txt