diff --git a/textproc/redisearch26/Makefile b/textproc/redisearch26/Makefile index c7ae01820a92..73b69ebb6bf8 100644 --- a/textproc/redisearch26/Makefile +++ b/textproc/redisearch26/Makefile @@ -1,47 +1,49 @@ PORTNAME= redisearch DISTVERSIONPREFIX= v -DISTVERSION= 2.6.4 +DISTVERSION= 2.6.5 CATEGORIES= textproc PKGNAMESUFFIX= ${DISTVERSION:R:S/.//} MAINTAINER= bofh@FreeBSD.org COMMENT= Full-text search over Redis (2.6.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_RSALv2= ${WRKSRC}/licenses/RSALv2.txt LICENSE_FILE_SSPLv1= ${WRKSRC}/licenses/SSPLv1.txt LICENSE_FILE= ${WRKSRC}/LICENSE.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 LIB_DEPENDS= libcpu_features.so:devel/cpu_features USES= cmake compiler localbase:ldflags USE_GITHUB= yes GH_ACCOUNT= RediSearch GH_PROJECT= RediSearch -GH_TUPLE= RedisAI:VectorSimilarity:4e065d8:vectorsimilarity/deps/VectorSimilarity +GH_TUPLE= RedisAI:VectorSimilarity:4e065d8:vectorsimilarity/deps/VectorSimilarity \ + RedisLabsModules:readies:d225f34:readies/deps/readies CMAKE_ARGS= -DGIT_DESCRIBE_VERSION:STRING=${PKGVERSION} \ -DOS=freebsd CFLAGS+= -DCLOCK_MONOTONIC_RAW=CLOCK_MONOTONIC CXXFLAGS+= -Wno-vla-cxx-extension -I${LOCALBASE}/include/cpu_features LDFLAGS+= -lcpu_features CONFLICTS_INSTALL= redisearch* PLIST_FILES= lib/${PORTNAME}${PKGNAMESUFFIX}.so +CFLAGS+= -DCLOCK_MONOTONIC_RAW=CLOCK_MONOTONIC -fPIC post-patch: ${ECHO_CMD} "find_package(CpuFeatures REQUIRED)" > ${WRKSRC}/deps/VectorSimilarity/cmake/cpu_features.cmake do-install: ${INSTALL} -m 0755 ${INSTALL_WRKSRC}/redisearch.so \ ${STAGEDIR}${PREFIX}/lib/${PORTNAME}${PKGNAMESUFFIX}.so .include diff --git a/textproc/redisearch26/distinfo b/textproc/redisearch26/distinfo index 1448b51a1209..7b57a1bd194b 100644 --- a/textproc/redisearch26/distinfo +++ b/textproc/redisearch26/distinfo @@ -1,5 +1,7 @@ -TIMESTAMP = 1782590176 -SHA256 (RediSearch-RediSearch-v2.6.4_GH0.tar.gz) = 5f19b32cd276d15cc309e05fb450b65dd3f8705c026524908eec347a9d8a38d0 -SIZE (RediSearch-RediSearch-v2.6.4_GH0.tar.gz) = 4453677 +TIMESTAMP = 1783202137 +SHA256 (RediSearch-RediSearch-v2.6.5_GH0.tar.gz) = 43343cc972ee44986669799dc417819cce63df0900823db0710e7abf06b047b3 +SIZE (RediSearch-RediSearch-v2.6.5_GH0.tar.gz) = 4459027 SHA256 (RedisAI-VectorSimilarity-4e065d8_GH0.tar.gz) = 9d5ef51491032c22f6cf9f13ac429e3c6cf25af0d7fbce82c85d4ff621e12d84 SIZE (RedisAI-VectorSimilarity-4e065d8_GH0.tar.gz) = 240019 +SHA256 (RedisLabsModules-readies-d225f34_GH0.tar.gz) = ed8c603e6f8c5f274774d3b33afe1dfa28f5672330a27a462e0cd4dcaf00d9fa +SIZE (RedisLabsModules-readies-d225f34_GH0.tar.gz) = 83586 diff --git a/textproc/redisearch26/files/patch-deps_VectorSimilarity_src_VecSim_info__iterator.h b/textproc/redisearch26/files/patch-deps_VectorSimilarity_src_VecSim_info__iterator.h index 583a82f2032f..9076bd79c7ca 100644 --- a/textproc/redisearch26/files/patch-deps_VectorSimilarity_src_VecSim_info__iterator.h +++ b/textproc/redisearch26/files/patch-deps_VectorSimilarity_src_VecSim_info__iterator.h @@ -1,18 +1,19 @@ ---- deps/VectorSimilarity/src/VecSim/info_iterator.h.orig 2022-10-20 13:03:07 UTC +--- deps/VectorSimilarity/src/VecSim/info_iterator.h.orig 2022-11-15 11:19:11 UTC +++ deps/VectorSimilarity/src/VecSim/info_iterator.h -@@ -1,5 +1,6 @@ +@@ -6,6 +6,7 @@ + #pragma once #include +#include #ifdef __cplusplus extern "C" { #endif -@@ -21,7 +22,7 @@ typedef union { +@@ -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/redisearch26/files/patch-deps_readies_cmake_cc b/textproc/redisearch26/files/patch-deps_readies_cmake_cc new file mode 100644 index 000000000000..d5f26c8c0cd4 --- /dev/null +++ b/textproc/redisearch26/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" "$") + 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/redisearch26/files/patch-deps_rmutil_rm__assert.h b/textproc/redisearch26/files/patch-deps_rmutil_rm__assert.h new file mode 100644 index 000000000000..8d6dffd85ad0 --- /dev/null +++ b/textproc/redisearch26/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/redisearch26/files/patch-src_fork__gc.c b/textproc/redisearch26/files/patch-src_fork__gc.c index 4afe483721d8..9727e7c9a4d1 100644 --- a/textproc/redisearch26/files/patch-src_fork__gc.c +++ b/textproc/redisearch26/files/patch-src_fork__gc.c @@ -1,21 +1,21 @@ ---- src/fork_gc.c.orig 2022-08-22 22:56:20 UTC +--- src/fork_gc.c.orig 2023-01-30 16:15:52 UTC +++ src/fork_gc.c -@@ -287,6 +287,7 @@ static void sendHeaderString(ForkGC *gc, void *arg) { +@@ -299,6 +299,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); } -@@ -303,7 +304,9 @@ static void FGC_childCollectTerms(ForkGC *gc, RedisSea +@@ -315,7 +316,9 @@ static void FGC_childCollectTerms(ForkGC *gc, RedisSea RedisModuleKey *idxKey = NULL; - InvertedIndex *idx = Redis_OpenInvertedIndexEx(sctx, term, strlen(term), 1, &idxKey); + 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/redisearch26/files/patch-src_numeric__index.c b/textproc/redisearch26/files/patch-src_numeric__index.c index ab14c189c74b..42acda6d649c 100644 --- a/textproc/redisearch26/files/patch-src_numeric__index.c +++ b/textproc/redisearch26/files/patch-src_numeric__index.c @@ -1,11 +1,11 @@ ---- src/numeric_index.c.orig 2022-08-22 22:56:20 UTC +--- src/numeric_index.c.orig 2023-01-30 16:15:52 UTC +++ src/numeric_index.c -@@ -622,7 +622,7 @@ int NumericIndexType_Register(RedisModuleCtx *ctx) { +@@ -670,7 +670,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/redisearch26/files/patch-src_redis__index.c b/textproc/redisearch26/files/patch-src_redis__index.c index 36e1bc262208..a285eb449698 100644 --- a/textproc/redisearch26/files/patch-src_redis__index.c +++ b/textproc/redisearch26/files/patch-src_redis__index.c @@ -1,11 +1,11 @@ ---- src/redis_index.c.orig 2020-02-29 20:35:56 UTC +--- src/redis_index.c.orig 2023-01-30 16:15:52 UTC +++ src/redis_index.c -@@ -108,7 +108,7 @@ int InvertedIndex_RegisterType(RedisModuleCtx *ctx) { +@@ -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);