summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Varner <fuzzyray@gentoo.org>2011-08-24 23:40:53 +0000
committerPaul Varner <fuzzyray@gentoo.org>2011-08-24 23:40:53 +0000
commiteb978ce02bc2eef0a7e2d191c04a1363f5a91449 (patch)
tree5aa514ac6787ec41e01bc4c48bf468330d6d352c /app-portage
parentVersion bump to newest 3.x branch ebuild. Tighten up ffmpeg dependency to pre... (diff)
downloadgentoo-2-eb978ce02bc2eef0a7e2d191c04a1363f5a91449.tar.gz
gentoo-2-eb978ce02bc2eef0a7e2d191c04a1363f5a91449.tar.bz2
gentoo-2-eb978ce02bc2eef0a7e2d191c04a1363f5a91449.zip
Revision bump to make esearch-0.7.2 prefix aware.
(Portage version: 2.1.10.11/cvs/Linux x86_64)
Diffstat (limited to 'app-portage')
-rw-r--r--app-portage/esearch/ChangeLog9
-rw-r--r--app-portage/esearch/esearch-0.7.2-r2.ebuild66
-rw-r--r--app-portage/esearch/files/0.7.2-make-prefix-aware.patch152
-rw-r--r--app-portage/esearch/files/0.7.2-update-shebang-lines.patch33
4 files changed, 259 insertions, 1 deletions
diff --git a/app-portage/esearch/ChangeLog b/app-portage/esearch/ChangeLog
index 98905ff33543..953ede34d60e 100644
--- a/app-portage/esearch/ChangeLog
+++ b/app-portage/esearch/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for app-portage/esearch
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-portage/esearch/ChangeLog,v 1.65 2011/08/24 21:17:48 fuzzyray Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-portage/esearch/ChangeLog,v 1.66 2011/08/24 23:40:53 fuzzyray Exp $
+
+*esearch-0.7.2-r2 (24 Aug 2011)
+
+ 24 Aug 2011; Paul Varner <fuzzyray@gentoo.org>
+ +files/0.7.2-make-prefix-aware.patch,
+ +files/0.7.2-update-shebang-lines.patch, +esearch-0.7.2-r2.ebuild:
+ Revision bump to make esearch-0.7.2 prefix aware.
*esearch-9999 (24 Aug 2011)
diff --git a/app-portage/esearch/esearch-0.7.2-r2.ebuild b/app-portage/esearch/esearch-0.7.2-r2.ebuild
new file mode 100644
index 000000000000..66bd898c29bb
--- /dev/null
+++ b/app-portage/esearch/esearch-0.7.2-r2.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-portage/esearch/esearch-0.7.2-r2.ebuild,v 1.1 2011/08/24 23:40:53 fuzzyray Exp $
+
+EAPI=3
+PYTHON_DEPEND=2:2.4
+PYTHON_USE_WITH=readline
+
+inherit base eutils multilib python
+
+DESCRIPTION="Replacement for 'emerge --search' with search-index"
+HOMEPAGE="http://david-peter.de/esearch.html"
+SRC_URI="mirror://gentoo/${P}.tar.bz2 http://dev.gentoo.org/~fuzzyray/distfiles/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
+IUSE="linguas_fr linguas_it"
+
+RDEPEND="sys-apps/portage"
+
+PATCHES=( "${FILESDIR}"/${PV}-esync-quiet.patch
+ "${FILESDIR}"/${PV}-make-prefix-aware.patch
+ "${FILESDIR}"/${PV}-update-shebang-lines.patch
+)
+
+pkg_setup() {
+ python_set_active_version 2
+ python_pkg_setup
+}
+
+src_compile() { :; }
+
+src_install() {
+ dodir /usr/bin/ /usr/sbin/ || die "dodir failed"
+
+ exeinto /usr/$(get_libdir)/esearch
+ doexe eupdatedb.py esearch.py esync.py common.py || die "doexe failed"
+
+ dosym /usr/$(get_libdir)/esearch/esearch.py /usr/bin/esearch || die "dosym failed"
+ dosym /usr/$(get_libdir)/esearch/eupdatedb.py /usr/sbin/eupdatedb || die "dosym failed"
+ dosym /usr/$(get_libdir)/esearch/esync.py /usr/sbin/esync || die "dosym failed"
+
+ doman en/{esearch,eupdatedb,esync}.1 || die "doman failed"
+ dodoc ChangeLog "${FILESDIR}/eupdatedb.cron" || die "dodoc failed"
+
+ if use linguas_it ; then
+ insinto /usr/share/man/it/man1
+ doins it/{esearch,eupdatedb,esync}.1 || die "doins failed"
+ fi
+
+ if use linguas_fr ; then
+ insinto /usr/share/man/fr/man1
+ doins fr/{esearch,eupdatedb,esync}.1 || die "doins failed"
+ fi
+
+ python_convert_shebangs -r 2 "${D}"
+}
+
+pkg_postinst() {
+ python_mod_optimize /usr/$(get_libdir)/esearch
+}
+
+pkg_postrm() {
+ python_mod_cleanup /usr/$(get_libdir)/esearch
+}
diff --git a/app-portage/esearch/files/0.7.2-make-prefix-aware.patch b/app-portage/esearch/files/0.7.2-make-prefix-aware.patch
new file mode 100644
index 000000000000..fbe29b8e3219
--- /dev/null
+++ b/app-portage/esearch/files/0.7.2-make-prefix-aware.patch
@@ -0,0 +1,152 @@
+From 8def0d5c01ba121c9952a987a721db59e2396261 Mon Sep 17 00:00:00 2001
+From: Paul Varner <fuzzyray@gentoo.org>
+Date: Wed, 24 Aug 2011 17:17:32 -0500
+Subject: [PATCH] Make prefix aware.
+
+---
+ esearch.py | 12 +++++++++---
+ esync.py | 27 ++++++++++++++++-----------
+ eupdatedb.py | 13 +++++++++----
+ 3 files changed, 34 insertions(+), 18 deletions(-)
+
+diff --git a/esearch.py b/esearch.py
+index 68c311d..1f15ee9 100755
+--- a/esearch.py
++++ b/esearch.py
+@@ -9,9 +9,15 @@
+
+ from getopt import *
+ import sys
++import os
+
+-sys.path.insert(0, "/usr/lib/portage/pym")
+-sys.path.insert(0, "/usr/lib/esearch")
++try:
++ from portage.const import EPREFIX
++except ImportError:
++ EPREFIX = ''
++
++sys.path.insert(0, EPREFIX + "/usr/lib/portage/pym")
++sys.path.insert(0, EPREFIX + "/usr/lib/esearch")
+
+ try:
+ from portage.output import bold, red, green, darkgreen, turquoise, nocolor
+@@ -22,7 +28,7 @@ import re
+
+ from common import needdbversion
+
+-esearchdbdir = "/var/cache/edb/"
++esearchdbdir = EPREFIX + "/var/cache/edb/"
+
+ def usage():
+ print "esearch (0.7.1) - Replacement for 'emerge search' with search-index"
+diff --git a/esync.py b/esync.py
+index eda504f..2fcc6be 100755
+--- a/esync.py
++++ b/esync.py
+@@ -15,7 +15,12 @@ import os
+ import sys
+ from getopt import *
+
+-sys.path.insert(0, "/usr/lib/portage/pym")
++try:
++ from portage.const import EPREFIX
++except ImportError:
++ EPREFIX = ''
++
++sys.path.insert(0, EPREFIX + "/usr/lib/portage/pym")
+
+ import portage
+ try:
+@@ -25,11 +30,11 @@ except ImportError:
+
+ from common import needdbversion
+
+-syncprogram = "EMERGE_DEFAULT_OPTS=\"\" /usr/bin/emerge --sync"
+-logfile_sync = "/var/log/emerge-sync.log"
+-tmp_prefix = "/tmp/esync"
++syncprogram = "EMERGE_DEFAULT_OPTS=\"\" " + EPREFIX + "/usr/bin/emerge --sync"
++logfile_sync = EPREFIX + "/var/log/emerge-sync.log"
++tmp_prefix = EPREFIX + "/tmp/esync"
+
+-sys.path.append("/tmp")
++sys.path.append(EPREFIX + "/tmp")
+
+ eoptions = ""
+ eupdatedb_extra_options = ""
+@@ -85,11 +90,11 @@ for a in opts[0]:
+ if arg in ("-h", "--help"):
+ usage()
+ elif arg in ("-w", "--webrsync"):
+- syncprogram = "EMERGE_DEFAULT_OPTS=\"\" /usr/sbin/emerge-webrsync"
++ syncprogram = "EMERGE_DEFAULT_OPTS=\"\" " + EPREFIX + "/usr/sbin/emerge-webrsync"
+ elif arg in ("-d", "--delta-webrsync"):
+- syncprogram = "EMERGE_DEFAULT_OPTS=\"\" /usr/bin/emerge-delta-webrsync -u"
++ syncprogram = "EMERGE_DEFAULT_OPTS=\"\" " + EPREFIX + "/usr/bin/emerge-delta-webrsync -u"
+ elif arg in ("-m", "--metadata"):
+- syncprogram = "EMERGE_DEFAULT_OPTS=\"\" /usr/bin/emerge --metadata"
++ syncprogram = "EMERGE_DEFAULT_OPTS=\"\" " + EPREFIX + "/usr/bin/emerge --metadata"
+ elif arg in ("-n", "--nocolor"):
+ eoptions = "-n"
+ nocolor()
+@@ -123,7 +128,7 @@ def gettree(tree):
+ target = tmp_prefix + tree + "tree.pyc"
+ if os.path.exists(target):
+ os.unlink(target)
+- os.symlink("/var/cache/edb/esearchdb.pyc", target)
++ os.symlink(EPREFIX + "/var/cache/edb/esearchdb.pyc", target)
+ except OSError, e:
+ if e.errno != 17:
+ print e
+@@ -166,7 +171,7 @@ if not quiet:
+ emsg("Doing 'eupdatedb' now")
+ print ""
+
+-if os.system("/usr/sbin/eupdatedb " + eoptions + " " + eupdatedb_extra_options) != 0:
++if os.system(EPREFIX + "/usr/sbin/eupdatedb " + eoptions + " " + eupdatedb_extra_options) != 0:
+ print ""
+ print red(" * Error:"), "eupdatedb failed"
+ sys.exit(1)
+@@ -198,7 +203,7 @@ haspkg = False
+
+ for (pkg, version) in items:
+ if (pkg not in old_keys) or (old[pkg] != new[pkg]):
+- os.system("/usr/bin/esearch " + eoptions + " -Fc ^" + pkg + "$ | head -n1")
++ os.system(EPREFIX + "/usr/bin/esearch " + eoptions + " -Fc ^" + pkg + "$ | head -n1")
+ haspkg = True
+
+ if not haspkg:
+diff --git a/eupdatedb.py b/eupdatedb.py
+index 6619b92..e423ea0 100755
+--- a/eupdatedb.py
++++ b/eupdatedb.py
+@@ -17,8 +17,13 @@ from os.path import exists
+ from shutil import copyfile
+ from getopt import *
+
+-sys.path.insert(0, "/usr/lib/portage/pym")
+-sys.path.insert(0, "/usr/lib/esearch")
++try:
++ from portage.const import EPREFIX
++except ImportError:
++ EPREFIX = ''
++
++sys.path.insert(0, EPREFIX + "/usr/lib/portage/pym")
++sys.path.insert(0, EPREFIX + "/usr/lib/esearch")
+
+ import portage
+ try:
+@@ -32,8 +37,8 @@ except ImportError:
+
+ from common import needdbversion, version
+
+-esearchdbdir = "/var/cache/edb/"
+-tmpfile = "/tmp/esearchdb.py.tmp"
++esearchdbdir = EPREFIX + "/var/cache/edb/"
++tmpfile = EPREFIX + "/tmp/esearchdb.py.tmp"
+
+ vartree = portage.vartree()
+
+--
+1.7.6
+
diff --git a/app-portage/esearch/files/0.7.2-update-shebang-lines.patch b/app-portage/esearch/files/0.7.2-update-shebang-lines.patch
new file mode 100644
index 000000000000..53bdd76b9b94
--- /dev/null
+++ b/app-portage/esearch/files/0.7.2-update-shebang-lines.patch
@@ -0,0 +1,33 @@
+From adb18c5758f533a56c228c2c772b4c34a6be2dc2 Mon Sep 17 00:00:00 2001
+From: Paul Varner <fuzzyray@gentoo.org>
+Date: Wed, 24 Aug 2011 18:27:11 -0500
+Subject: [PATCH] Update shebang lines to work with prefix
+
+---
+ common.py | 2 +-
+ esync.py | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/common.py b/common.py
+index 197bd21..e121927 100755
+--- a/common.py
++++ b/common.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python
++#!/usr/bin/env python
+ #
+ # Some functions for esearch,
+ # eupdatedb and esync.
+diff --git a/esync.py b/esync.py
+index 2fcc6be..b9e77b6 100755
+--- a/esync.py
++++ b/esync.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python -u
++#!/usr/bin/env python -u
+ #
+ # 'python -u' for unbuffered output, so you can call
+ # $ esync | tee esync.log
+--
+1.7.6
+