Index: surfraw/files/surfraw-2.1.5-gentoo_pkg_tools.patch =================================================================== --- /dev/null {cset f07c056a-e4c8-486c-9a69-a37b0a42b8c1} +++ surfraw/files/surfraw-2.1.5-gentoo_pkg_tools.patch {local clone} @@ -0,0 +1,37 @@ + Needs a little more thought, or some method which would allow for an upstream +push without affecting the non-Gentoo users. + +Index: surfraw-2.1.5/surfraw-bash-completion.IN +=================================================================== +--- surfraw-2.1.5/surfraw-bash-completion.IN {cset 8f95d483-869f-47ba-aba2-f0a12bb9dd07} ++++ surfraw-2.1.5/surfraw-bash-completion.IN {local clone} +@@ -1,4 +1,20 @@ + # -*- sh -*- bash programmable completion for Surfraw, v2.2 ++_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]} +@@ -14,7 +30,7 @@ _surfraw() + then COMPREPLY=( $( compgen -W "$elvi" -- $cur ) ) + # "sr go" for google + elif [[ $prev == @(alioth|deb@(bugs|contents|packages|pts|sec)|freshmeat|fsfdir|sourceforge) ]] +- then COMPREPLY=( $(apt-cache --generate pkgnames $cur) ) ++ then _srpkgname ${cur} + # "sr debbugs 4" to check 44bsd-rdist bugs... + elif [[ -x /usr/bin/look ]] # in bsdmainutils, "important" + then COMPREPLY=( $(/usr/bin/look ${cur:-''}) ) Prereq: 1.1 Index: surfraw/surfraw-2.1.5.ebuild =================================================================== --- surfraw/surfraw-2.1.5.ebuild {cset 9328fc74-09f6-498d-9f34-8343035f5668} +++ surfraw/surfraw-2.1.5.ebuild {local clone} @@ -4,7 +4,6 @@ inherit bash-completion eutils -S=${WORKDIR}/${PN} DESCRIPTION="A fast unix command line interface to WWW" HOMEPAGE="http://alioth.debian.org/projects/surfraw/" SRC_URI="mirror://debian/pool/main/s/surfraw/${PN}_${PV}.tar.gz" @@ -17,8 +16,7 @@ IUSE="" src_unpack() { unpack ${A}; cd ${S} - sed -i 's,/lib/,/share/,g' surfraw-bash-completion surfraw.1.in elvi.1sr.in - epatch ${FILESDIR}/${PN}-gentoo_pkg_tools.patch + epatch ${FILESDIR}/${PN}-2.1.5-gentoo_pkg_tools.patch } src_compile() { @@ -59,4 +57,8 @@ pkg_postinst() { ewarn "using the 'sr' wrapper script as described above. If you wish to return to" ewarn "the old behaviour you can add /usr/share/surfraw to your \$PATH" fi + # This file was always autogenerated, and is no longer needed. + if [ -f ${ROOT}/etc/surfraw_elvi.list ]; then + rm -f ${ROOT}/etc/surfraw_elvi.list + fi }