diff --git a/textproc/krep/Makefile b/textproc/krep/Makefile index ea8965e9c32e..46288a0f5c65 100644 --- a/textproc/krep/Makefile +++ b/textproc/krep/Makefile @@ -1,21 +1,21 @@ PORTNAME= krep DISTVERSIONPREFIX= v -DISTVERSION= 2.4.0 +DISTVERSION= 3.0.0 CATEGORIES= textproc MAINTAINER= alven@FreeBSD.org COMMENT= High-performance string search utility WWW= https://github.com/davidesantangelo/krep/ LICENSE= BSD2CLAUSE LICENSE_FILE= ${WRKSRC}/LICENSE USES= gmake USE_GITHUB= yes GH_ACCOUNT= davidesantangelo TEST_TARGET= test PLIST_FILES= bin/krep .include diff --git a/textproc/krep/distinfo b/textproc/krep/distinfo index 8443b1e45453..f7c332fed982 100644 --- a/textproc/krep/distinfo +++ b/textproc/krep/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1779654012 -SHA256 (davidesantangelo-krep-v2.4.0_GH0.tar.gz) = 1b0648938dae88b17c80108a6df83768beb5f061c5bbb65edeafd169c799ea8c -SIZE (davidesantangelo-krep-v2.4.0_GH0.tar.gz) = 83147 +TIMESTAMP = 1783564802 +SHA256 (davidesantangelo-krep-v3.0.0_GH0.tar.gz) = 78ed8e36051145d523c9a7be878f7af82bd26405ff28d1ebdcae07efe4c52fdf +SIZE (davidesantangelo-krep-v3.0.0_GH0.tar.gz) = 89770 diff --git a/textproc/krep/files/patch-krep.c b/textproc/krep/files/patch-krep.c index 1d6dbad2b9aa..b7d17b8633aa 100644 --- a/textproc/krep/files/patch-krep.c +++ b/textproc/krep/files/patch-krep.c @@ -1,30 +1,30 @@ ---- krep.c.orig 2026-05-19 07:06:16 UTC +--- krep.c.orig 2026-07-01 08:23:35 UTC +++ krep.c -@@ -4925,6 +4925,27 @@ uint64_t memchr_short_search(const search_params_t *pa +@@ -5721,6 +5721,27 @@ uint64_t memchr_short_search(const search_params_t *pa // Handles case-sensitive patterns of any length. // Uses 2x 16-byte loads per iteration with fast mask extraction via // vshrn/vmovn instead of store-to-memory. + +#ifdef __aarch64__ +static inline bool +is_nonzero(uint8x16_t a) +{ + return (vmaxvq_u8(a) != 0); +} +#else +/* no vmaxvq_u8() on AArch32 */ +static inline bool +is_nonzero(uint8x16_t a) +{ + uint8x8_t a8, a4; + + a8 = vmax_u8(vget_low_u8(a), vget_high_u8(a)); + a4 = vpmax_u8(a8, a8); + + return (vget_lane_u32(a4, 0) != 0); +} +#endif /* defined(__aarch64__) */ + uint64_t neon_search(const search_params_t *params, const char *text_start, size_t text_len, diff --git a/textproc/krep/pkg-descr b/textproc/krep/pkg-descr index 0fc2e01d096c..17a7175d5313 100644 --- a/textproc/krep/pkg-descr +++ b/textproc/krep/pkg-descr @@ -1,13 +1,14 @@ -krep is an optimized string search utility designed for maximum throughput and -efficiency when processing large files and directories. It is built with -performance in mind, offering multiple search algorithms and SIMD acceleration -when available. +krep is an optimized string search utility designed for maximum throughput, +low-latency feedback, and modern command-line ergonomics when processing large +files and source trees. It combines mmap-based I/O, adaptive algorithms, SIMD +acceleration where available, multi-pattern search, recursive traversal +controls, JSON Lines output, contextual display, and machine-friendly stats. Note: Krep is not intended to be a full replacement or direct competitor to feature-rich tools like grep or ripgrep. Instead, it aims to be a minimal, efficient, and pragmatic tool focused on speed and simplicity. Krep provides the essential features needed for fast searching, without the extensive options and complexity of more comprehensive search utilities. Its design philosophy is to deliver the fastest possible search for the most common use cases, with a clean and minimal interface.