[gentoo-commits] repo/gentoo:master commit in: www-client/surfraw/files/, www-client/surfraw/

2020-09-24 Thread Jeroen Roovers
commit: e5322b7cc4ef2e6a722e2cdc3f5388d801af36b1
Author: Jeroen Roovers  gentoo  org>
AuthorDate: Thu Sep 24 13:48:21 2020 +
Commit: Jeroen Roovers  gentoo  org>
CommitDate: Thu Sep 24 13:49:17 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e5322b7c

www-client/surfraw: Update live ebuild

Package-Manager: Portage-3.0.8, Repoman-3.0.1
Signed-off-by: Jeroen Roovers  gentoo.org>

 .../surfraw/files/surfraw-9-sr-completion-path.patch  | 11 +++
 www-client/surfraw/surfraw-9.ebuild   |  3 ++-
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/www-client/surfraw/files/surfraw-9-sr-completion-path.patch 
b/www-client/surfraw/files/surfraw-9-sr-completion-path.patch
new file mode 100644
index 000..273ffcb3ce5
--- /dev/null
+++ b/www-client/surfraw/files/surfraw-9-sr-completion-path.patch
@@ -0,0 +1,11 @@
+--- a/Makefile.am
 b/Makefile.am
+@@ -112,7 +112,7 @@
+   mkdir -p $(DESTDIR)@datadir@/bash-completion/completions
+   @cp $(top_srcdir)/surfraw-bash-completion 
$(DESTDIR)@datadir@/bash-completion/completions/surfraw
+ if INSTALLSR
+-  @ln -sf $(DESTDIR)@datadir@/bash-completion/completions/surfraw 
$(DESTDIR)@datadir@/bash-completion/completions/sr
++  @ln -sf surfraw $(DESTDIR)@datadir@/bash-completion/completions/sr
+ endif  # INSTALLSR
+ endif  # BASHCOMPLETIONS
+ 

diff --git a/www-client/surfraw/surfraw-9.ebuild 
b/www-client/surfraw/surfraw-9.ebuild
index 6c4ea3c9876..2ec87d0aa31 100644
--- a/www-client/surfraw/surfraw-9.ebuild
+++ b/www-client/surfraw/surfraw-9.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -23,6 +23,7 @@ DOCS=(
 )
 PATCHES=(
"${FILESDIR}"/${PN}-2.3.0-completion.patch
+   "${FILESDIR}"/${PN}-9-sr-completion-path.patch
 )
 
 src_prepare() {



[gentoo-commits] repo/gentoo:master commit in: www-client/surfraw/files/, www-client/surfraw/

2018-02-05 Thread Jeroen Roovers
commit: 90495f87e0831ee83b4da2634d03618a099fe5ac
Author: Jeroen Roovers  gentoo  org>
AuthorDate: Mon Feb  5 20:47:51 2018 +
Commit: Jeroen Roovers  gentoo  org>
CommitDate: Mon Feb  5 20:48:08 2018 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=90495f87

www-client/surfraw: Version 2.3.0.

Package-Manager: Portage-2.3.24, Repoman-2.3.6

 www-client/surfraw/Manifest|  1 +
 .../surfraw/files/surfraw-2.3.0-completion.patch   | 43 +++
 www-client/surfraw/surfraw-2.3.0.ebuild| 87 ++
 3 files changed, 131 insertions(+)

diff --git a/www-client/surfraw/Manifest b/www-client/surfraw/Manifest
index 792ef3f87f8..ee68fecec4b 100644
--- a/www-client/surfraw/Manifest
+++ b/www-client/surfraw/Manifest
@@ -1 +1,2 @@
 DIST surfraw-2.2.9.tar.gz 200042 BLAKE2B 
c360da9826b6473a1159e67a19e9e12eaf4697b5be4373088169eb6ee1b85f126854f8594c5de8fd0517b7020947be42a5678d1ed7bd798f0925c53a68728c15
 SHA512 
81ddfc5300f5f052e09187144f39c0e1f0d6a0df9ad82d4457b60498278061ac6736a8236bd2b3516f6ad885d22c8616372b354f11b2dbb46ef4f3790456f016
+DIST surfraw-2.3.0.tar.gz 205557 BLAKE2B 
35ca2b46f14fc123fd014682a413c6f22e8c9f05d85e8e76660e099536fda8648446757d467afbe8807c91ec1628c568854ebfda48953e9499a018c30f2bc5ee
 SHA512 
51cdfb68bab701bce635a64ab3d5af669b2330c895180d01cca1c6f3c4005972ba4c573b693df59a2cc4fdb97d4fd11224bae500bbd4a17c3ab446de5241c9a0

diff --git a/www-client/surfraw/files/surfraw-2.3.0-completion.patch 
b/www-client/surfraw/files/surfraw-2.3.0-completion.patch
new file mode 100644
index 000..1f86ec55f01
--- /dev/null
+++ b/www-client/surfraw/files/surfraw-2.3.0-completion.patch
@@ -0,0 +1,43 @@
+--- a/surfraw-bash-completion.IN
 b/surfraw-bash-completion.IN
+@@ -4,6 +4,23 @@
+ # installing the bash-completion package which sets this explicitly.
+ shopt -s extglob
+ 
++_srpkgname()
++{
++  local pd
++  local dir=$(sed -n -e '/^PORTDIR=/ { 
s/^[^=]\+="\?\([^"]\+\|\S\+\).*/\1/p ; q }' \
++  /etc/make.{conf,globals})/*
++  local cur="$1"
++
++  COMPREPLY=($(compgen -W "$(
++  for pd in $dir
++  do
++  [ ! -d ${pd} ] && continue
++  builtin cd ${pd}
++  echo *
++  done)" -- ${cur})
++  )
++}
++
+ _surfraw()
+ {   COMPREPLY=()
+   local cur=${COMP_WORDS[COMP_CWORD]}
+@@ -20,7 +37,7 @@
+   thenCOMPREPLY=( $( compgen -W "$elvi" -- $cur ) )
+   # "sr go" for google
+   elif[[ $prev == 
@(alioth|deb@(bugs|contents|packages|pts|sec)|freshmeat|fsfdir|sourceforge) ]]
+-  thenCOMPREPLY=( $(apt-cache --generate pkgnames $cur) )
++  then_srpkgname ${cur}
+   # "sr debbugs 4" to check 44bsd-rdist bugs...
+   elif[[ -x /usr/bin/look ]] # in bsdmainutils, "important"
+   thenCOMPREPLY=( $(/usr/bin/look ${cur:-''}) )
+@@ -29,5 +46,5 @@
+   fi
+   return 0
+ }
+-# test first in case removed-but-unpurged
+-type -p surfraw >/dev/null 2>&1 && complete -F _surfraw surfraw sr
++
++complete -F _surfraw surfraw sr

diff --git a/www-client/surfraw/surfraw-2.3.0.ebuild 
b/www-client/surfraw/surfraw-2.3.0.ebuild
new file mode 100644
index 000..cea13e94ecb
--- /dev/null
+++ b/www-client/surfraw/surfraw-2.3.0.ebuild
@@ -0,0 +1,87 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit bash-completion-r1 eutils
+
+DESCRIPTION="A fast unix command line interface to WWW"
+HOMEPAGE="http://surfraw.alioth.debian.org/ https://gitlab.com/surfraw/Surfraw;
+SRC_URI="http://${PN}.alioth.debian.org/dist/${P}.tar.gz;
+
+SLOT="0"
+LICENSE="public-domain"
+KEYWORDS="~amd64 ~hppa ~ppc ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos 
~sparc-solaris"
+RESTRICT="test"
+RDEPEND="
+   dev-lang/perl
+"
+
+DOCS=(AUTHORS ChangeLog HACKING NEWS README TODO)
+PATCHES=(
+   "${FILESDIR}"/${PN}-2.3.0-completion.patch
+)
+
+src_configure() {
+   econf --with-elvidir='$(datadir)'/surfraw
+}
+
+src_install() {
+   default
+
+   newbashcomp surfraw-bash-completion ${PN}
+   bashcomp_alias ${PN} sr
+
+   docinto examples
+   dodoc examples/README
+   insinto /usr/share/doc/${PF}/examples
+   doins examples/uzbl_load_url_from_surfraw
+}
+
+pkg_preinst() {
+   has_version "=${CATEGORY}/${PN}-1.0.7"
+   upgrade_from_1_0_7=$?
+}
+
+pkg_postinst() {
+   local moves f
+
+   einfo
+   einfo "You can get a list of installed elvi by just typing 'surfraw' or"
+   einfo "the abbreviated 'sr'."
+   einfo
+   einfo "You can try some searches, for example:"
+   einfo "$ sr ask why is jeeves gay? "
+   einfo "$ sr google -results=100 RMS, GNU, which is sinner, which is 
sin?"
+   einfo "$ sr rhyme -method=perfect Julian"
+   einfo
+   einfo "The system configuration file is /etc/surfraw.conf"
+   einfo
+