From: Brad Smith Subject: Re: UPDATE: ugrep 7.8.3 To: Volker Schlecht , ports@openbsd.org Date: Wed, 5 Aug 2026 18:05:27 -0400 On 2026-08-02 5:41 a.m., Volker Schlecht wrote: > Builds with passing tests on amd64 here - could you explain briefly why > the two patches can go now? LZMA was synched upstream and the other is no longer relevant. > On 8/1/26 7:08 AM, Brad Smith wrote: >> Here is an update to ugrep 7.8.3. >> >> Tested on aarch64, amd64 and i386. >> >> >> ugrep v7.8 >> >> - improve TUI custom-command option --view to wait for key >>    press after viewing, by specifying + in --view=+COMMAND, >>    such as --view=+file to display file type info in the TUI >>    with CTRL-Y (overrides viewing the file contents) #543 >> - update TUI to block ANSI OSC escape codes, such as ESC >>    ] P n rr gg bb that may hang the terminal according to >>    Wikipedia >> - update the ug+ and ugrep+ scripts to end options in >>    filter commands with --, in case a filename starts >>    with a - (dash) >> - improve config parsing to ignore some options that do >>    not make sense to set in a (local) config file >> - local config files located in the working directory are >>    only read when owned by the user running the ug or >>    ugrep --config process (already implemented in update >>    7.7) >> >> ugrep v7.7.0 >> >> - support TUI search on slow and incomplete standard input pipes >>    e.g. from tail -f #540 >> - update options -m (--max-count) and -K (--max-line) to stop >>    reading input upon reaching the stopping criterium, then exit >>    without draining the standard input pipe like GNU grep #538 >> - improve binary file detection for huge mixed files #537 >> - add new option ./build.sh --disable-avx512 #534 >> - local config files located in the working directory are only >>    read when owned by the user running the ugrep process >> - fix lzma 7zip api memory leak >> >> >> Index: Makefile >> =================================================================== >> RCS file: /cvs/ports/sysutils/ugrep/Makefile,v >> retrieving revision 1.59 >> diff -u -p -u -p -r1.59 Makefile >> --- Makefile    6 Mar 2026 10:22:49 -0000    1.59 >> +++ Makefile    1 Aug 2026 04:11:47 -0000 >> @@ -3,7 +3,7 @@ CATEGORIES =    textproc sysutils >>     GH_ACCOUNT =    Genivia >>   GH_PROJECT =    ugrep >> -GH_TAGNAME =    v7.6.0 >> +GH_TAGNAME =    v7.8.3 >>     # BSD >>   PERMIT_PACKAGE =    Yes >> @@ -15,23 +15,21 @@ WANTLIB += m pcre2-8 z zstd >>   COMPILER =    base-clang ports-gcc >>     LIB_DEPENDS =    archivers/brotli \ >> +        archivers/bzip2 \ >>           archivers/lz4 \ >>           archivers/xz \ >>           archivers/zstd \ >>           devel/pcre2 >>   TEST_DEPENDS =    shells/bash >>   -CONFIGURE_STYLE =    autoreconf >> -AUTOCONF_VERSION =    2.72 >> -AUTOMAKE_VERSION =    1.16 >> -CONFIGURE_ARGS =    --disable-avx2 \ >> -            --without-boost-regex >> +CONFIGURE_STYLE =    gnu >>   -# All amd64 machines support SSE2, but the same is not true of i386 >> +.if ${MACHINE_ARCH:Marm} >> +CONFIGURE_ARGS +=    --disable-neon >> +.endif >>   .if ${MACHINE_ARCH:Mi386} >>   CONFIGURE_ARGS +=    --disable-sse2 >>   .endif >> -# All supported armv7/aarch64 have NEON >>     USE_GMAKE =    Yes >>   Index: distinfo >> =================================================================== >> RCS file: /cvs/ports/sysutils/ugrep/distinfo,v >> retrieving revision 1.56 >> diff -u -p -u -p -r1.56 distinfo >> --- distinfo    6 Mar 2026 10:22:49 -0000    1.56 >> +++ distinfo    1 Aug 2026 04:11:47 -0000 >> @@ -1,2 +1,2 @@ >> -SHA256 (ugrep-7.6.0.tar.gz) = >> r+iL30BiI53yQKqitMeIu0KC9VTe4JggELs9Nu8p4cA= >> -SIZE (ugrep-7.6.0.tar.gz) = 7181894 >> +SHA256 (ugrep-7.8.3.tar.gz) = >> C92iQ+fcsyMZQ6e3Kz5zz62VvlbCl9BJxgN+8UrgPX4= >> +SIZE (ugrep-7.8.3.tar.gz) = 7220051 >> Index: patches/patch-configure_ac >> =================================================================== >> RCS file: patches/patch-configure_ac >> diff -N patches/patch-configure_ac >> --- patches/patch-configure_ac    6 Mar 2026 10:22:49 -0000 1.1 >> +++ /dev/null    1 Jan 1970 00:00:00 -0000 >> @@ -1,34 +0,0 @@ >> -Index: configure.ac >> ---- configure.ac.orig >> -+++ configure.ac >> -@@ -156,15 +156,6 @@ if test "x$cross_compiling" = "xyes"; then >> -                             [mneon_ok=no]) >> -           if test "x$mneon_ok" = "xyes"; then >> -             SIMD_FLAGS="-mfpu=neon -DHAVE_NEON" >> --          else >> --            # this part is a bit iffy,,, >> --            CXXFLAGS="-march=native -mfpu=neon" >> --            AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include >> ]], [[uint64x2_t n; uint64_t m = vgetq_lane_u64(n, 0);]])], >> --                              [mneon_ok=yes], >> --                              [mneon_ok=no]) >> --            if test "x$mneon_ok" = "xyes"; then >> --              SIMD_FLAGS="-march=native -mfpu=neon -DHAVE_NEON" >> --            fi >> -           fi >> -           CXXFLAGS=$save_CXXFLAGS >> -         fi >> -@@ -239,14 +230,6 @@ else >> -                       [mneon_ok=no]) >> -         if test "x$mneon_ok" = "xyes"; then >> -           SIMD_FLAGS="-mfpu=neon -DHAVE_NEON" >> --        else >> --          CXXFLAGS="-march=native -mfpu=neon" >> --          AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include >> ]],[[uint64x2_t n; uint64_t m = vgetq_lane_u64(n, 0);]])], >> --                        [mneon_ok=yes], >> --                        [mneon_ok=no]) >> --          if test "x$mneon_ok" = "xyes"; then >> --            SIMD_FLAGS="-march=native -mfpu=neon -DHAVE_NEON" >> --          fi >> -         fi >> -         CXXFLAGS=$save_CXXFLAGS >> -       fi >> Index: patches/patch-lzma_C_CpuArch_c >> =================================================================== >> RCS file: patches/patch-lzma_C_CpuArch_c >> diff -N patches/patch-lzma_C_CpuArch_c >> --- patches/patch-lzma_C_CpuArch_c    3 Feb 2024 06:58:38 -0000    1.1 >> +++ /dev/null    1 Jan 1970 00:00:00 -0000 >> @@ -1,41 +0,0 @@ >> -Index: lzma/C/CpuArch.c >> ---- lzma/C/CpuArch.c.orig >> -+++ lzma/C/CpuArch.c >> -@@ -757,8 +757,36 @@ BoolInt CPU_IsSupported_SHA1(void) { return >> APPLE_CRYP >> - BoolInt CPU_IsSupported_SHA2(void) { return >> APPLE_CRYPTO_SUPPORT_VAL; } >> - BoolInt CPU_IsSupported_AES (void) { return >> APPLE_CRYPTO_SUPPORT_VAL; } >> - >> -+#elif defined(__OpenBSD__) // __APPLE__ >> - >> --#else // __APPLE__ >> -+#include >> -+#include >> -+#include >> -+#include >> -+ >> -+BoolInt CPU_IsSupported_NEON() { return 1; } >> -+ >> -+#define MY_HWCAP_CHECK_FUNC_2(name1, name2) \ >> -+  BoolInt CPU_IsSupported_ ## name1() { \ >> -+    int isar0_mib[] = { CTL_MACHDEP, CPU_ID_AA64ISAR0 }; \ >> -+    size_t len = sizeof(uint64_t); \ >> -+    uint64_t cpu_id = 0; \ >> -+    if (sysctl(isar0_mib, 2, &cpu_id, &len, NULL, 0) < 0) \ >> -+      return 0; \ >> -+    if (ID_AA64ISAR0_ ## name2(cpu_id) >= ID_AA64ISAR0_## name2 >> ##_BASE) \ >> -+      return 1; \ >> -+    return 0; \ >> -+  } >> -+ >> -+#define MY_HWCAP_CHECK_FUNC(name) \ >> -+  MY_HWCAP_CHECK_FUNC_2(name, name) >> -+ >> -+MY_HWCAP_CHECK_FUNC (CRC32) >> -+MY_HWCAP_CHECK_FUNC (SHA1) >> -+MY_HWCAP_CHECK_FUNC (SHA2) >> -+MY_HWCAP_CHECK_FUNC (AES) >> -+ >> -+#else // __OpenBSD__ >> - >> - #include >> - >> Index: patches/patch-tests_verify_sh >> =================================================================== >> RCS file: patches/patch-tests_verify_sh >> diff -N patches/patch-tests_verify_sh >> --- /dev/null    1 Jan 1970 00:00:00 -0000 >> +++ patches/patch-tests_verify_sh    1 Aug 2026 04:11:47 -0000 >> @@ -0,0 +1,9 @@ >> +Index: tests/verify.sh >> +--- tests/verify.sh.orig >> ++++ tests/verify.sh >> +@@ -1,4 +1,4 @@ >> +-#!/bin/bash >> ++#!/usr/local/bin/bash >> + >> + UGREP=${UGREP_ABS_PATH:-../src/ugrep} >> + CONFIGH=${CONFIGH_ABS_PATH:-../config.h} >> >