summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-apps/the_silver_searcher/files')
-rw-r--r--sys-apps/the_silver_searcher/files/0001-bash-completion-port-to-v2-API.patch58
-rw-r--r--sys-apps/the_silver_searcher/files/the_silver_searcher-2.2.0-no_lfs64.patch52
2 files changed, 110 insertions, 0 deletions
diff --git a/sys-apps/the_silver_searcher/files/0001-bash-completion-port-to-v2-API.patch b/sys-apps/the_silver_searcher/files/0001-bash-completion-port-to-v2-API.patch
new file mode 100644
index 000000000000..151e8a1274b4
--- /dev/null
+++ b/sys-apps/the_silver_searcher/files/0001-bash-completion-port-to-v2-API.patch
@@ -0,0 +1,58 @@
+From eca81ee573f30f8eb790d33db1c86d2970f7fc4a Mon Sep 17 00:00:00 2001
+From: Eli Schwartz <eschwartz93@gmail.com>
+Date: Sun, 16 Jun 2024 15:35:30 -0400
+Subject: [PATCH] bash-completion: port to v2 API
+
+Fixes: #1537
+Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
+---
+ ag.bashcomp.sh | 16 +++++++---------
+ 1 file changed, 7 insertions(+), 9 deletions(-)
+
+diff --git a/ag.bashcomp.sh b/ag.bashcomp.sh
+index 5637ce4..e03f580 100644
+--- a/ag.bashcomp.sh
++++ b/ag.bashcomp.sh
+@@ -1,11 +1,9 @@
+ _ag() {
+- local lngopt shtopt split=false
+- local cur prev
++ local cur prev words cword split
++ local lngopt shtopt
+
+ COMPREPLY=()
+- cur=$(_get_cword "=")
+- prev="${COMP_WORDS[COMP_CWORD-1]}"
+-
++ _init_completion -s || return 0
+ _expand || return 0
+
+ lngopt='
+@@ -96,12 +94,10 @@ _ag() {
+ types=$(ag --list-file-types |grep -- '--')
+
+ # these options require an argument
+- if [[ "${prev}" == -[ABCGgm] ]] ; then
++ if [[ "${prev}" = -[ABCGgm] ]] ; then
+ return 0
+ fi
+
+- _split_longopt && split=true
+-
+ case "${prev}" in
+ --ignore-dir) # directory completion
+ _filedir -d
+@@ -117,7 +113,9 @@ _ag() {
+ return 0;;
+ esac
+
+- $split && return 0
++ if [[ ${split} = true ]]; then
++ return 0
++ fi
+
+ case "${cur}" in
+ -*)
+--
+2.44.2
+
diff --git a/sys-apps/the_silver_searcher/files/the_silver_searcher-2.2.0-no_lfs64.patch b/sys-apps/the_silver_searcher/files/the_silver_searcher-2.2.0-no_lfs64.patch
new file mode 100644
index 000000000000..7468a47a0568
--- /dev/null
+++ b/sys-apps/the_silver_searcher/files/the_silver_searcher-2.2.0-no_lfs64.patch
@@ -0,0 +1,52 @@
+LFS64 interfaces are now generally considered deprecated, and are no longer
+available in MUSL since version 1.2.4.
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -12,6 +12,8 @@
+ AC_PREREQ([2.59])
+ AC_PROG_GREP
+
++AC_SYS_LARGEFILE
++
+ m4_ifdef(
+ [AM_SILENT_RULES],
+ [AM_SILENT_RULES([yes])])
+--- a/src/zfile.c
++++ b/src/zfile.c
+@@ -4,7 +4,7 @@
+ #include <sys/types.h>
+
+ #ifdef __CYGWIN__
+-typedef _off64_t off64_t;
++typedef _off64_t off_t;
+ #endif
+
+ #include <assert.h>
+@@ -331,14 +331,14 @@
+ }
+
+ static int
+-zfile_seek(void *cookie_, off64_t *offset_, int whence) {
++zfile_seek(void *cookie_, off_t *offset_, int whence) {
+ struct zfile *cookie = cookie_;
+- off64_t new_offset = 0, offset = *offset_;
++ off_t new_offset = 0, offset = *offset_;
+
+ if (whence == SEEK_SET) {
+ new_offset = offset;
+ } else if (whence == SEEK_CUR) {
+- new_offset = (off64_t)cookie->logic_offset + offset;
++ new_offset = (off_t)cookie->logic_offset + offset;
+ } else {
+ /* SEEK_END not ok */
+ return -1;
+@@ -348,7 +348,7 @@
+ return -1;
+
+ /* Backward seeks to anywhere but 0 are not ok */
+- if (new_offset < (off64_t)cookie->logic_offset && new_offset != 0) {
++ if (new_offset < (off_t)cookie->logic_offset && new_offset != 0) {
+ return -1;
+ }
+