Date: Sun, 31 May 2026 14:54:43 +0000 From: Muhammad Moinur Rahman <bofh@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: 192d8a700452 - main - textproc/redisearch28: New port Message-ID: <6a1c4bb3.275f5.1bd37670@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch main has been updated by bofh: URL: https://cgit.FreeBSD.org/ports/commit/?id=192d8a7004522a4e7ec5579f137882466f8baab9 commit 192d8a7004522a4e7ec5579f137882466f8baab9 Author: Muhammad Moinur Rahman <bofh@FreeBSD.org> AuthorDate: 2026-05-31 13:36:00 +0000 Commit: Muhammad Moinur Rahman <bofh@FreeBSD.org> CommitDate: 2026-05-31 14:54:21 +0000 textproc/redisearch28: New port RediSearch is a source available Full-Text and Secondary Index engine over Redis, developed by Redis Labs. Redisearch implements a search engine on top of Redis, but unlike other Redis search libraries, it does not use internal data structures like sorted sets. This also enables more advanced features, like exact phrase matching and numeric filtering for text queries, that are not possible or efficient with traditional Redis search approaches. This is the 2.8.X branch of redisearch WWW: https://github.com/RediSearch/RediSearch/ --- textproc/Makefile | 1 + textproc/redisearch28/Makefile | 58 ++++++++++++++++++++++ textproc/redisearch28/distinfo | 13 +++++ ...ps_VectorSimilarity_src_VecSim_info__iterator.h | 19 +++++++ .../redisearch28/files/patch-deps_readies_cmake_cc | 31 ++++++++++++ .../files/patch-deps_rmutil_rm__assert.h | 32 ++++++++++++ textproc/redisearch28/files/patch-src_fork__gc.c | 21 ++++++++ .../redisearch28/files/patch-src_numeric__index.c | 11 ++++ .../redisearch28/files/patch-src_redis__index.c | 11 ++++ textproc/redisearch28/pkg-descr | 10 ++++ 10 files changed, 207 insertions(+) diff --git a/textproc/Makefile b/textproc/Makefile index 48251841025f..26921eee0718 100644 --- a/textproc/Makefile +++ b/textproc/Makefile @@ -1806,6 +1806,7 @@ SUBDIR += redisearch22 SUBDIR += redisearch24 SUBDIR += redisearch26 + SUBDIR += redisearch28 SUBDIR += redland SUBDIR += redland-bindings SUBDIR += refdb diff --git a/textproc/redisearch28/Makefile b/textproc/redisearch28/Makefile new file mode 100644 index 000000000000..3afad342df8c --- /dev/null +++ b/textproc/redisearch28/Makefile @@ -0,0 +1,58 @@ +PORTNAME= redisearch +DISTVERSIONPREFIX= v +DISTVERSION= 2.8.0 +CATEGORIES= textproc +PKGNAMESUFFIX= ${DISTVERSION:R:S/.//} + +MAINTAINER= bofh@FreeBSD.org +COMMENT= Full-text search over Redis (2.8.X) +WWW= https://github.com/RediSearch/RediSearch/ + +LICENSE= RSALv2 SSPLv1 +LICENSE_COMB= dual +LICENSE_NAME_RSALv2= Redis Source Available License v2 +LICENSE_NAME_SSPLv1= Server Side Public License v1 +LICENSE_FILE= ${WRKSRC}/LICENSE.txt +LICENSE_FILE_RSALv2= ${WRKSRC}/licenses/RSALv2.txt +LICENSE_FILE_SSPLv1= ${WRKSRC}/licenses/SSPLv1.txt +LICENSE_PERMS_RSALv2= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept +LICENSE_PERMS_SSPLv1= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept + +BUILD_DEPENDS= ${LOCALBASE}/include/boost/optional.hpp:devel/boost-libs +LIB_DEPENDS= libabsl_base.so:devel/abseil + +USES= cmake compiler localbase +USE_GITHUB= yes +GH_ACCOUNT= RediSearch +GH_PROJECT= RediSearch +GH_TUPLE= RedisAI:VectorSimilarity:9f38780:vectorsimilarity/deps/VectorSimilarity \ + google:cpu_features:438a66e:cpu_features/deps/cpu_features \ + RedisLabsModules:readies:8c6994c:readies/deps/readies \ + RedisLabs:RedisModulesSDK:7ba899d:redismodulesdk/deps/RedisModulesSDK \ + google:s2geometry:efb4eb8:s2geometry/deps/s2geometry + +CMAKE_ARGS= -DGIT_DESCRIBE_VERSION:STRING=${PKGVERSION} \ + -DOS=freebsd -Wno-dev + +CONFLICTS_INSTALL= redisearch* + +PLIST_FILES= lib/${PORTNAME}${PKGNAMESUFFIX}.so + +CFLAGS+= -DCLOCK_MONOTONIC_RAW=CLOCK_MONOTONIC -fPIC +CXXFLAGS+=-Wno-vla-cxx-extension -fPIC + +post-patch: + @${REINPLACE_CMD} -e 's|20230125.1|20250127|g' \ + -e '/conan_toolchain.cmake/d' \ + ${WRKSRC}/src/geometry/CMakeLists.txt + +pre-configure: + @${MKDIR} ${WRKDIR}/.build/_deps + @${MV} ${WRKSRC}/deps/cpu_features ${WRKDIR}/.build/_deps/cpu_features-src + +do-install: + ${INSTALL} -m 0755 ${INSTALL_WRKSRC}/redisearch.so \ + ${STAGEDIR}${PREFIX}/lib/${PORTNAME}${PKGNAMESUFFIX}.so + ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/${PORTNAME}${PKGNAMESUFFIX}.so + +.include <bsd.port.mk> diff --git a/textproc/redisearch28/distinfo b/textproc/redisearch28/distinfo new file mode 100644 index 000000000000..682929298be6 --- /dev/null +++ b/textproc/redisearch28/distinfo @@ -0,0 +1,13 @@ +TIMESTAMP = 1780184050 +SHA256 (RediSearch-RediSearch-v2.8.0_GH0.tar.gz) = 0e32cc5c78ed5dd46d80412befa6e34cbf8a1d7741182c1b198fb3dc3c5d553c +SIZE (RediSearch-RediSearch-v2.8.0_GH0.tar.gz) = 6808832 +SHA256 (RedisAI-VectorSimilarity-9f38780_GH0.tar.gz) = b90b6d5d7c5521a363cf39d5c164434514c262c95b49b0285425837f9987edf9 +SIZE (RedisAI-VectorSimilarity-9f38780_GH0.tar.gz) = 519191 +SHA256 (google-cpu_features-438a66e_GH0.tar.gz) = 7e99e30d5e3e572c8e4fe103c0caa937bf69fb6fe6a0bdf127511bdaab9db4e7 +SIZE (google-cpu_features-438a66e_GH0.tar.gz) = 92085 +SHA256 (RedisLabsModules-readies-8c6994c_GH0.tar.gz) = 6b50056d52d338c50fec17b6809336c5c178897d1e7ce665642e0e15266b8357 +SIZE (RedisLabsModules-readies-8c6994c_GH0.tar.gz) = 85650 +SHA256 (RedisLabs-RedisModulesSDK-7ba899d_GH0.tar.gz) = dd4b7e691ce013f849317f0e472f6219e86a570d3eac50bacf060ffb2b56c4b2 +SIZE (RedisLabs-RedisModulesSDK-7ba899d_GH0.tar.gz) = 138229 +SHA256 (google-s2geometry-efb4eb8_GH0.tar.gz) = a62ef2409c9c1fd0ef573892f3857fb73cd864b2410eecbbb104ff865ea09fa8 +SIZE (google-s2geometry-efb4eb8_GH0.tar.gz) = 1170660 diff --git a/textproc/redisearch28/files/patch-deps_VectorSimilarity_src_VecSim_info__iterator.h b/textproc/redisearch28/files/patch-deps_VectorSimilarity_src_VecSim_info__iterator.h new file mode 100644 index 000000000000..806f1a23141f --- /dev/null +++ b/textproc/redisearch28/files/patch-deps_VectorSimilarity_src_VecSim_info__iterator.h @@ -0,0 +1,19 @@ +--- deps/VectorSimilarity/src/VecSim/info_iterator.h.orig 2026-05-30 23:32:41 UTC ++++ deps/VectorSimilarity/src/VecSim/info_iterator.h +@@ -6,6 +6,7 @@ + + #pragma once + #include <stdlib.h> ++#include <stdint.h> + #ifdef __cplusplus + extern "C" { + #endif +@@ -27,7 +28,7 @@ typedef union { + typedef union { + double floatingPointValue; // Floating point value. 64 bits float. + int64_t integerValue; // Integer value. Signed 64 bits integer. +- u_int64_t uintegerValue; // Unsigned value. Unsigned 64 buts integer. ++ uint64_t uintegerValue; // Unsigned value. Unsigned 64 buts integer. + const char *stringValue; // String value. + } FieldValue; + diff --git a/textproc/redisearch28/files/patch-deps_readies_cmake_cc b/textproc/redisearch28/files/patch-deps_readies_cmake_cc new file mode 100644 index 000000000000..d5f26c8c0cd4 --- /dev/null +++ b/textproc/redisearch28/files/patch-deps_readies_cmake_cc @@ -0,0 +1,31 @@ +--- deps/readies/cmake/cc.orig 2023-05-03 09:56:10 UTC ++++ deps/readies/cmake/cc +@@ -26,7 +26,7 @@ function(extract_debug_symbols TARGET) + #---------------------------------------------------------------------------------------------- + + function(extract_debug_symbols TARGET) +- if (NOT DEBUG AND NOT APPLE) ++ if (NOT DEBUG AND CMAKE_SYSTEM_NAME STREQUAL "Linux") + add_custom_command(TARGET ${TARGET} POST_BUILD + COMMAND "$ENV{MK}/extract-obj-symbols" "$<TARGET_FILE:${TARGET}>") + endif() +@@ -70,13 +70,15 @@ function(setup_cc_options) + + # dirty trick to override default CMake flags (like: -O2 -DNDEBUG) + # by appending the overiding options using add_compile_options(). +- # we rely on the overiding options being defined in CMAKE_CC_FLAGS rather than the ++ # we rely on the overiding options being defined in CMAKE_CC_FLAGS rather than the + # language-specific CMAKE_CC_C_FLAGS and CMAKE_CC_CXX_FLAGS. + + # need to be a list, otherwise quotes are erroneously inserted +- string(REPLACE " " ";" CMAKE_CC_FLAGS_LIST ${CMAKE_CC_FLAGS}) +- add_compile_options(${CMAKE_CC_FLAGS_LIST}) +- ++ if(CMAKE_CC_FLAGS) ++ string(REPLACE " " ";" CMAKE_CC_FLAGS_LIST ${CMAKE_CC_FLAGS}) ++ add_compile_options(${CMAKE_CC_FLAGS_LIST}) ++ endif() ++ + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_LD_FLAGS} ${CMAKE_EXE_LD_FLAGS}" PARENT_SCOPE) + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${CMAKE_LD_FLAGS} ${CMAKE_SO_LD_FLAGS}" PARENT_SCOPE) + endfunction() diff --git a/textproc/redisearch28/files/patch-deps_rmutil_rm__assert.h b/textproc/redisearch28/files/patch-deps_rmutil_rm__assert.h new file mode 100644 index 000000000000..8d6dffd85ad0 --- /dev/null +++ b/textproc/redisearch28/files/patch-deps_rmutil_rm__assert.h @@ -0,0 +1,32 @@ +--- deps/rmutil/rm_assert.h.orig 2026-05-30 23:42:51 UTC ++++ deps/rmutil/rm_assert.h +@@ -12,8 +12,8 @@ + + #ifdef NDEBUG + +-#define RS_LOG_ASSERT(ctx, condition, fmt, ...) (__ASSERT_VOID_CAST (0)) +-#define RS_LOG_ASSERT_STR(ctx, condition, str) (__ASSERT_VOID_CAST (0)) ++#define RS_LOG_ASSERT(condition, str) ++#define RS_LOG_ASSERT_STR(condition, str) + + #else + +@@ -21,7 +21,7 @@ + if (__builtin_expect(!(condition), 0)) { \ + RedisModule_Log(RSDummyContext, "warning", (fmt), __VA_ARGS__); \ + RedisModule_Assert(condition); /* Crashes server and create a crash report*/ \ +- } ++ } + + #define RS_LOG_ASSERT(condition, str) RS_LOG_ASSERT_FMT(condition, str "%s", "") + +@@ -30,6 +30,6 @@ + #define RS_CHECK_FUNC(funcName, ...) \ + if (funcName) { \ + funcName(__VA_ARGS__); \ +- } ++ } + +-#endif //__REDISEARCH_ASSERT__ +\ No newline at end of file ++#endif //__REDISEARCH_ASSERT__ diff --git a/textproc/redisearch28/files/patch-src_fork__gc.c b/textproc/redisearch28/files/patch-src_fork__gc.c new file mode 100644 index 000000000000..fd39972024ca --- /dev/null +++ b/textproc/redisearch28/files/patch-src_fork__gc.c @@ -0,0 +1,21 @@ +--- src/fork_gc.c.orig 2023-05-04 07:44:04 UTC ++++ src/fork_gc.c +@@ -265,6 +265,7 @@ static void sendHeaderString(ForkGC *gc, void *arg) { + } + + static void sendHeaderString(ForkGC *gc, void *arg) { ++ struct iovec { void *iov_base; size_t iov_len; }; + struct iovec *iov = arg; + FGC_sendBuffer(gc, iov->iov_base, iov->iov_len); + } +@@ -281,7 +282,9 @@ static void FGC_childCollectTerms(ForkGC *gc, RedisSea + RedisModuleKey *idxKey = NULL; + InvertedIndex *idx = Redis_OpenInvertedIndexEx(sctx, term, strlen(term), 1, NULL, &idxKey); + if (idx) { +- struct iovec iov = {.iov_base = (void *)term, termLen}; ++ struct iovec { void *iov_base; size_t iov_len; } iov; ++ iov.iov_base = term; ++ iov.iov_len = termLen; + FGC_childRepairInvidx(gc, sctx, idx, sendHeaderString, &iov, NULL); + } + if (idxKey) { diff --git a/textproc/redisearch28/files/patch-src_numeric__index.c b/textproc/redisearch28/files/patch-src_numeric__index.c new file mode 100644 index 000000000000..d1cbc3855745 --- /dev/null +++ b/textproc/redisearch28/files/patch-src_numeric__index.c @@ -0,0 +1,11 @@ +--- src/numeric_index.c.orig 2023-05-04 07:44:04 UTC ++++ src/numeric_index.c +@@ -700,7 +700,7 @@ int NumericIndexType_Register(RedisModuleCtx *ctx) { + .rdb_save = NumericIndexType_RdbSave, + .aof_rewrite = GenericAofRewrite_DisabledHandler, + .free = NumericIndexType_Free, +- .mem_usage = NumericIndexType_MemUsage}; ++ .mem_usage = (const void *)NumericIndexType_MemUsage}; + + NumericIndexType = RedisModule_CreateDataType(ctx, "numericdx", NUMERIC_INDEX_ENCVER, &tm); + if (NumericIndexType == NULL) { diff --git a/textproc/redisearch28/files/patch-src_redis__index.c b/textproc/redisearch28/files/patch-src_redis__index.c new file mode 100644 index 000000000000..c74a899df108 --- /dev/null +++ b/textproc/redisearch28/files/patch-src_redis__index.c @@ -0,0 +1,11 @@ +--- src/redis_index.c.orig 2023-05-04 07:44:04 UTC ++++ src/redis_index.c +@@ -114,7 +114,7 @@ int InvertedIndex_RegisterType(RedisModuleCtx *ctx) { + .rdb_load = InvertedIndex_RdbLoad, + .rdb_save = InvertedIndex_RdbSave, + .aof_rewrite = GenericAofRewrite_DisabledHandler, +- .mem_usage = InvertedIndex_MemUsage, ++ .mem_usage = (const void *)InvertedIndex_MemUsage, + .free = InvertedIndex_Free}; + + InvertedIndexType = RedisModule_CreateDataType(ctx, "ft_invidx", INVERTED_INDEX_ENCVER, &tm); diff --git a/textproc/redisearch28/pkg-descr b/textproc/redisearch28/pkg-descr new file mode 100644 index 000000000000..41d10f88f3e7 --- /dev/null +++ b/textproc/redisearch28/pkg-descr @@ -0,0 +1,10 @@ +RediSearch is a source available Full-Text and Secondary Index +engine over Redis, developed by Redis Labs. + +Redisearch implements a search engine on top of Redis, but +unlike other Redis search libraries, it does not use internal +data structures like sorted sets. + +This also enables more advanced features, like exact phrase +matching and numeric filtering for text queries, that are not +possible or efficient with traditional Redis search approaches.home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6a1c4bb3.275f5.1bd37670>
