diff --git a/textproc/krep/Makefile b/textproc/krep/Makefile index febfb02ae226..97aad70deda7 100644 --- a/textproc/krep/Makefile +++ b/textproc/krep/Makefile @@ -1,21 +1,21 @@ PORTNAME= krep DISTVERSIONPREFIX= v -DISTVERSION= 3.0.2 +DISTVERSION= 3.1.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 7dd47a7ffd7d..669fa5fecde2 100644 --- a/textproc/krep/distinfo +++ b/textproc/krep/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1788437972 -SHA256 (davidesantangelo-krep-v3.0.2_GH0.tar.gz) = 5aa957278bf6c0a1c30b8bfcc481f92ba338d8c93d7d2e3c233581a7055d3b86 -SIZE (davidesantangelo-krep-v3.0.2_GH0.tar.gz) = 92159 +TIMESTAMP = 1789605812 +SHA256 (davidesantangelo-krep-v3.1.0_GH0.tar.gz) = 536342ce821bfaa4afc37c19d96cc54a37755a866b6564dc825be7a0a242a068 +SIZE (davidesantangelo-krep-v3.1.0_GH0.tar.gz) = 97217 diff --git a/textproc/krep/files/patch-Makefile b/textproc/krep/files/patch-Makefile index 1cacaa0c2662..246e11af74fc 100644 --- a/textproc/krep/files/patch-Makefile +++ b/textproc/krep/files/patch-Makefile @@ -1,30 +1,30 @@ ---- Makefile.orig 2026-04-15 10:01:25 UTC +--- Makefile.orig 2026-09-16 08:38:04 UTC +++ Makefile @@ -5,11 +5,15 @@ BINDIR = $(PREFIX)/bin PREFIX ?= /usr/local BINDIR = $(PREFIX)/bin -CC = gcc -CFLAGS = -Wall -Wextra -O3 -std=c11 -pthread -D_GNU_SOURCE -D_DEFAULT_SOURCE \ +CC ?= gcc +CFLAGS ?= -Wall -Wextra -O3 -std=c11 -pthread -D_GNU_SOURCE -D_DEFAULT_SOURCE \ -flto -funroll-loops -finline-functions -LDFLAGS = -pthread -flto +LDFLAGS += -pthread -flto +# All SIMD "hacks/detection" should be disabled as we have CPUTYPE and the current +# approach is also broken as host might not share the same CPU features as target. +ifeq (0, 1) + - # Build mode: set NATIVE=1 for maximum performance on local machine + # Build mode: NATIVE=1 tunes for this CPU; PORTABLE=1 avoids host x86 ISA flags. # Example: make NATIVE=1 - ifdef NATIVE -@@ -46,6 +50,8 @@ else ifeq ($(ARCH), aarch64) + ifeq ($(NATIVE),1) +@@ -48,6 +52,8 @@ else ifeq ($(ARCH), aarch64) else ifeq ($(ARCH), aarch64) # Enable NEON for aarch64 Linux CFLAGS += -D__ARM_NEON +endif + endif # Source files diff --git a/textproc/krep/files/patch-krep.c b/textproc/krep/files/patch-krep.c deleted file mode 100644 index b7d17b8633aa..000000000000 --- a/textproc/krep/files/patch-krep.c +++ /dev/null @@ -1,30 +0,0 @@ ---- krep.c.orig 2026-07-01 08:23:35 UTC -+++ krep.c -@@ -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,