Accepting request 1137208 from utilities

OBS-URL: https://build.opensuse.org/request/show/1137208
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/ugrep?expand=0&rev=61
This commit is contained in:
Dominique Leuenberger 2024-01-06 16:29:50 +00:00 committed by Git OBS Bridge
commit 4e775078f7
6 changed files with 199 additions and 26 deletions

View File

@ -1,20 +0,0 @@
From 8f4ced87032edd356a94ce9e5a2786d89f75e14a Mon Sep 17 00:00:00 2001
From: Andreas Stieger <Andreas.Stieger@gmx.de>
Date: Tue, 19 Dec 2023 19:27:32 +0100
Subject: [PATCH] remove shebang from bash completion script
References: https://github.com/Genivia/ugrep/pull/338
---
completions/bash/ug | 1 -
1 file changed, 1 deletion(-)
diff --git a/completions/bash/ug b/completions/bash/ug
index 540b65ce..376575cc 100755
--- a/completions/bash/ug
+++ b/completions/bash/ug
@@ -1,4 +1,3 @@
-#!/usr/bin/env bash
# bash completion for ug and ugrep
# recommended: add the following lines to ~/.inputrc
# set colored-stats on

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e134f5080412dec8023ca8d10433c4860e95557c1ac05140285a203b06ebab61
size 5957895

View File

@ -0,0 +1,175 @@
From 3c4abe68cce1b9d5202b3b1f63e7de169f3f7c93 Mon Sep 17 00:00:00 2001
From: Robert van Engelen <genivia-inc@users.noreply.github.com>
Date: Fri, 5 Jan 2024 16:26:10 -0500
Subject: [PATCH 1/2] fix bzip3/7zip detection interference
---
configure | 46 +++++++++++++++++++++++-----------------------
configure.ac | 24 ++++++++++++------------
2 files changed, 35 insertions(+), 35 deletions(-)
diff --git a/configure b/configure
index 3cb96da2..12649f50 100755
--- a/configure
+++ b/configure
@@ -796,8 +796,8 @@ with_lzma
with_lz4
with_zstd
with_brotli
-enable_7zip
with_bzip3
+enable_7zip
with_bash_completion_dir
with_fish_completion_dir
with_zsh_completion_dir
@@ -8764,28 +8764,6 @@ printf "%s\n" "#define HAVE_LIBBROTLI 1" >>confdefs.h
fi
-# Check whether --enable-7zip was given.
-if test ${enable_7zip+y}
-then :
- enableval=$enable_7zip; with_no_7zip="yes"
-else $as_nop
- with_no_7zip="no"
-fi
-
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --disable-7zip" >&5
-printf %s "checking for --disable-7zip... " >&6; }
-if test "x$with_no_7zip" = "xno"; then
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
- CPPFLAGS="$CPPFLAGS -I../lzma/C"
- LDFLAGS="$LDFLAGS -L../lzma/C"
- LIBS="-lviiz $LIBS"
-else
- EXTRA_CFLAGS="-DWITH_NO_7ZIP ${EXTRA_CFLAGS}"
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-printf "%s\n" "yes" >&6; }
-fi
-
# Check whether --with-bzip3 was given.
if test ${with_bzip3+y}
@@ -8933,6 +8911,28 @@ fi
fi
+# Check whether --enable-7zip was given.
+if test ${enable_7zip+y}
+then :
+ enableval=$enable_7zip; with_no_7zip="yes"
+else $as_nop
+ with_no_7zip="no"
+fi
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --disable-7zip" >&5
+printf %s "checking for --disable-7zip... " >&6; }
+if test "x$with_no_7zip" = "xno"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ CPPFLAGS="$CPPFLAGS -I../lzma/C"
+ LDFLAGS="$LDFLAGS -L../lzma/C"
+ LIBS="-lviiz $LIBS"
+else
+ EXTRA_CFLAGS="-DWITH_NO_7ZIP ${EXTRA_CFLAGS}"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+fi
+
fi
diff --git a/configure.ac b/configure.ac
index bb557e92..c54d530d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -82,6 +82,18 @@ AX_CHECK_ZSTDLIB([], [echo "optional libzstd not found: install if you want ugre
AX_CHECK_BROTLILIB([], [echo "optional brotli library not found: install if you want ugrep option -z to search .br files"])
+AC_ARG_WITH(bzip3,
+ [AS_HELP_STRING([--with-bzip3],
+ [to enable bzip3 library to decompress .bz3 files])],
+ [with_bzip3_library="$withval"],
+ [with_bzip3_library=""])
+if test "x$with_bzip3_library" != "x"; then
+ if test "x$with_bzip3" = "xyes"; then
+ unset with_bzip3
+ fi
+ AX_CHECK_BZIP3LIB([], [echo "optional libbzip3 not found: install if you want ugrep option -z to search .bz3 files"])
+fi
+
AC_ARG_ENABLE(7zip,
[AS_HELP_STRING([--disable-7zip],
[to disable 7zip and no longer search .7z files (7z requires more memory and takes long to decompress)])],
@@ -98,18 +110,6 @@ else
AC_MSG_RESULT(yes)
fi
-AC_ARG_WITH(bzip3,
- [AS_HELP_STRING([--with-bzip3],
- [to enable bzip3 library to decompress .bz3 files])],
- [with_bzip3_library="$withval"],
- [with_bzip3_library=""])
-if test "x$with_bzip3_library" != "x"; then
- if test "x$with_bzip3" = "xyes"; then
- unset with_bzip3
- fi
- AX_CHECK_BZIP3LIB([], [echo "optional libbzip3 not found: install if you want ugrep option -z to search .bz3 files"])
-fi
-
fi
AC_ARG_WITH([bash-completion-dir],
From 7da2fba26253d33f9d6aafd9facc325e2aa419af Mon Sep 17 00:00:00 2001
From: Robert van Engelen <genivia-inc@users.noreply.github.com>
Date: Fri, 5 Jan 2024 16:32:00 -0500
Subject: [PATCH 2/2] fix #10 --disable-7zip
---
configure | 6 +++---
configure.ac | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/configure b/configure
index 12649f50..30db0e1f 100755
--- a/configure
+++ b/configure
@@ -8914,14 +8914,14 @@ fi
# Check whether --enable-7zip was given.
if test ${enable_7zip+y}
then :
- enableval=$enable_7zip; with_no_7zip="yes"
+ enableval=$enable_7zip; with_7zip="$enableval"
else $as_nop
- with_no_7zip="no"
+ with_7zip="yes"
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --disable-7zip" >&5
printf %s "checking for --disable-7zip... " >&6; }
-if test "x$with_no_7zip" = "xno"; then
+if test "x$with_7zip" = "xyes"; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
CPPFLAGS="$CPPFLAGS -I../lzma/C"
diff --git a/configure.ac b/configure.ac
index c54d530d..4d7e93b7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -97,10 +97,10 @@ fi
AC_ARG_ENABLE(7zip,
[AS_HELP_STRING([--disable-7zip],
[to disable 7zip and no longer search .7z files (7z requires more memory and takes long to decompress)])],
- [with_no_7zip="yes"],
- [with_no_7zip="no"])
+ [with_7zip="$enableval"],
+ [with_7zip="yes"])
AC_MSG_CHECKING(for --disable-7zip)
-if test "x$with_no_7zip" = "xno"; then
+if test "x$with_7zip" = "xyes"; then
AC_MSG_RESULT(no)
CPPFLAGS="$CPPFLAGS -I../lzma/C"
LDFLAGS="$LDFLAGS -L../lzma/C"

3
ugrep-4.5.0.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:55cc44007fbc01fdb962e253ca58771b2d81570d990c4108d7e5c6fa86f6fae5
size 6197815

View File

@ -1,3 +1,15 @@
-------------------------------------------------------------------
Sat Jan 6 09:14:00 UTC 2024 - Andreas Stieger <andreas.stieger@gmx.de>
- update to 4.5.0:
* 7zip archive search with option -z
* apply Unicode normalization to canonicalize literal combining
characters in regex patterns
* improved TUI TAB directory navigation when searching from the FS
root
- drop ugrep-4.4.1-remove-shebang-from-bash-completion.patch
- add ugrep-4.5.0-fix-bzip3-configure.patch
-------------------------------------------------------------------
Tue Dec 19 17:46:14 UTC 2023 - Andreas Stieger <andreas.stieger@gmx.de>

View File

@ -1,7 +1,7 @@
#
# spec file for package ugrep
#
# Copyright (c) 2023 SUSE LLC
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -17,14 +17,18 @@
Name: ugrep
Version: 4.4.1
Version: 4.5.0
Release: 0
Summary: Universal grep: a feature-rich grep implementation with focus on speed
License: BSD-3-Clause
Group: Productivity/File utilities
URL: https://github.com/Genivia/ugrep
Source: https://github.com/Genivia/ugrep/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
Patch0: ugrep-4.4.1-remove-shebang-from-bash-completion.patch
Patch0: ugrep-4.5.0-fix-bzip3-configure.patch
# for ugrep-4.5.0-fix-bzip3-configure.patch
BuildRequires: autoconf
BuildRequires: automake
#
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: pkgconfig
@ -84,6 +88,8 @@ This package contains the fish completion for ugrep.
%autosetup -p1
%build
# for ugrep-4.5.0-fix-bzip3-configure.patch
autoreconf -fiv
%configure \
--disable-avx \
--enable-color \