From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/the_silver_searcher/, sys-apps/the_silver_searcher/files/
Date: Mon, 17 Jun 2024 01:47:56 +0000 (UTC) [thread overview]
Message-ID: <1718588808.4aaecc02ba23581ee2fdb50d3f8b9d2480da5f6e.sam@gentoo> (raw)
commit: 4aaecc02ba23581ee2fdb50d3f8b9d2480da5f6e
Author: Eli Schwartz <eschwartz93 <AT> gmail <DOT> com>
AuthorDate: Sun Jun 16 19:41:07 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Jun 17 01:46:48 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4aaecc02
sys-apps/the_silver_searcher: fix compatibility with bash-completion 2.12
Signed-off-by: Eli Schwartz <eschwartz93 <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../0001-bash-completion-port-to-v2-API.patch | 58 ++++++++++++++++++++
.../the_silver_searcher-2.2.0_p20201217-r3.ebuild | 63 ++++++++++++++++++++++
2 files changed, 121 insertions(+)
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/the_silver_searcher-2.2.0_p20201217-r3.ebuild b/sys-apps/the_silver_searcher/the_silver_searcher-2.2.0_p20201217-r3.ebuild
new file mode 100644
index 000000000000..93ac9f8cc8f8
--- /dev/null
+++ b/sys-apps/the_silver_searcher/the_silver_searcher-2.2.0_p20201217-r3.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit autotools bash-completion-r1 flag-o-matic vcs-snapshot
+
+COMMIT="a61f1780b64266587e7bc30f0f5f71c6cca97c0f"
+
+DESCRIPTION="A code-searching tool similar to ack, but faster"
+HOMEPAGE="https://github.com/ggreer/the_silver_searcher"
+SRC_URI="https://github.com/ggreer/${PN}/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~x86 ~amd64-linux ~x64-macos"
+IUSE="lzma test zlib"
+RESTRICT="!test? ( test )"
+
+RDEPEND="dev-libs/libpcre
+ lzma? ( app-arch/xz-utils )
+ zlib? ( sys-libs/zlib )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ test? (
+ dev-util/cram
+ dev-vcs/git
+ )"
+
+DOCS="README.md"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.1.0-lzma.patch
+ "${FILESDIR}"/${PN}-2.2.0-no_lfs64.patch
+ # https://github.com/ggreer/the_silver_searcher/issues/1537
+ # broken with >=app-shells/bash-completion-2.12
+ "${FILESDIR}"/0001-bash-completion-port-to-v2-API.patch
+)
+
+src_prepare() {
+ sed '/^dist_bashcomp/d' -i Makefile.am || die
+
+ default
+ eautoreconf
+}
+
+src_configure() {
+ # false positive TEXTRELs on riscv
+ # https://bugs.gentoo.org/797355
+ append-flags -fPIC
+
+ econf \
+ $(use_enable lzma) \
+ $(use_enable zlib)
+}
+
+src_test() {
+ cram -v tests/*.t || die "tests failed"
+}
+
+src_install() {
+ default
+ newbashcomp ag.bashcomp.sh ag
+}
next reply other threads:[~2024-06-17 1:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-17 1:47 Sam James [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-01-22 3:55 [gentoo-commits] repo/gentoo:master commit in: sys-apps/the_silver_searcher/, sys-apps/the_silver_searcher/files/ Sam James
2024-04-05 22:31 Marek Szuba
2020-07-12 10:24 Sam Jorna
2018-01-13 3:55 Benda XU
2017-08-31 15:39 Tim Harder
2016-12-04 0:32 Tim Harder
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1718588808.4aaecc02ba23581ee2fdb50d3f8b9d2480da5f6e.sam@gentoo \
--to=sam@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox