summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Weber <xmw@gentoo.org>2012-06-04 20:24:23 +0000
committerMichael Weber <xmw@gentoo.org>2012-06-04 20:24:23 +0000
commit3700d865f21bcd1f32a2058144512ddc299c8e4f (patch)
tree924fdd642bcf7b0985eceab0f0b25af916e63022 /dev-vcs
parentDepend on binutils[cxx] for gold plugin wrt #419383. (diff)
downloadgentoo-2-3700d865f21bcd1f32a2058144512ddc299c8e4f.tar.gz
gentoo-2-3700d865f21bcd1f32a2058144512ddc299c8e4f.tar.bz2
gentoo-2-3700d865f21bcd1f32a2058144512ddc299c8e4f.zip
Revbump to include gedit3 patch (thanks pacho, bug 419647)
(Portage version: 2.1.10.63/cvs/Linux x86_64)
Diffstat (limited to 'dev-vcs')
-rw-r--r--dev-vcs/rabbitvcs/ChangeLog9
-rw-r--r--dev-vcs/rabbitvcs/files/50_fix_gedit3_plugin.patch309
-rw-r--r--dev-vcs/rabbitvcs/rabbitvcs-0.14.2.1.ebuild88
-rw-r--r--dev-vcs/rabbitvcs/rabbitvcs-0.15.0.5-r2.ebuild (renamed from dev-vcs/rabbitvcs/rabbitvcs-0.15.0.5.ebuild)13
4 files changed, 326 insertions, 93 deletions
diff --git a/dev-vcs/rabbitvcs/ChangeLog b/dev-vcs/rabbitvcs/ChangeLog
index f9e4c8dea10d..31b5a1597403 100644
--- a/dev-vcs/rabbitvcs/ChangeLog
+++ b/dev-vcs/rabbitvcs/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for dev-vcs/rabbitvcs
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-vcs/rabbitvcs/ChangeLog,v 1.8 2012/03/07 23:11:43 xmw Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-vcs/rabbitvcs/ChangeLog,v 1.9 2012/06/04 20:24:23 xmw Exp $
+
+*rabbitvcs-0.15.0.5-r2 (04 Jun 2012)
+
+ 04 Jun 2012; Michael Weber <xmw@gentoo.org> +files/50_fix_gedit3_plugin.patch,
+ +rabbitvcs-0.15.0.5-r2.ebuild, -rabbitvcs-0.14.2.1.ebuild,
+ -rabbitvcs-0.15.0.5.ebuild:
+ Revbump to include gedit3 patch (thanks pacho, bug 419647)
*rabbitvcs-0.15.0.5-r1 (07 Mar 2012)
diff --git a/dev-vcs/rabbitvcs/files/50_fix_gedit3_plugin.patch b/dev-vcs/rabbitvcs/files/50_fix_gedit3_plugin.patch
new file mode 100644
index 000000000000..9407efa033f3
--- /dev/null
+++ b/dev-vcs/rabbitvcs/files/50_fix_gedit3_plugin.patch
@@ -0,0 +1,309 @@
+Description: Fix the gedit plugin for Gedit3
+From: Adam Plumb <adamplumb@gmail.com>
+Origin: upstream, http://code.google.com/p/rabbitvcs/source/detail?r=3022
+Bug: http://code.google.com/p/rabbitvcs/issues/detail?id=622
+Bug-Debian: http://bugs.debian.org/635123
+
+--- a/rabbitvcs/util/contextmenuitems.py
++++ b/rabbitvcs/util/contextmenuitems.py
+@@ -204,7 +204,7 @@
+ )
+
+ return action
+-
++
+ def make_gtk_menu_item(self, id_magic = None):
+ action = self.make_action(id_magic)
+
+@@ -217,6 +217,17 @@
+ else:
+ menuitem = action.create_menu_item()
+
++ return menuitem
++
++ def make_gtk3_menu_item(self, id_magic = None):
++ action = self.make_action(id_magic)
++
++ if self.icon:
++ menuitem = action.create_menu_item()
++ menuitem.set_image(gtk.Image.new_from_icon_name(self.icon, gtk.IconSize.MENU))
++ else:
++ menuitem = action.create_menu_item()
++
+ return menuitem
+
+ def make_nautilus_menu_item(self, id_magic = None):
+--- a/clients/gedit/rabbitvcs.gedit-plugin
++++ /dev/null
+@@ -1,10 +0,0 @@
+-[Gedit Plugin]
+-Loader=python
+-Module=rabbitvcs-plugin
+-IAge=2
+-Name=RabbitVCS
+-Description=RabbitVCS plugin for Gedit
+-Authors=Adam Plumb <adamplumb@gmail.com>
+-Copyright=Copyright © 2009 Adam Plumb
+-Website=http://www.rabbitvcs.org
+-
+--- /dev/null
++++ b/clients/gedit/rabbitvcs-gedit2.gedit-plugin
+@@ -0,0 +1,10 @@
++[Gedit Plugin]
++Loader=python
++Module=rabbitvcs-plugin
++IAge=2
++Name=RabbitVCS
++Description=RabbitVCS plugin for Gedit
++Authors=Adam Plumb <adamplumb@gmail.com>
++Copyright=Copyright © 2011 Adam Plumb
++Website=http://www.rabbitvcs.org
++
+--- a/clients/gedit/rabbitvcs-plugin.py
++++ b/clients/gedit/rabbitvcs-plugin.py
+@@ -2,7 +2,7 @@
+ # This is a Gedit plugin to allow for RabbitVCS integration in the Gedit
+ # text editor.
+ #
+-# Copyright (C) 2008-2008 by Adam Plumb <adamplumb@gmail.com>
++# Copyright (C) 2008-2011 by Adam Plumb <adamplumb@gmail.com>
+ #
+ # RabbitVCS is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License as published by
+@@ -21,8 +21,17 @@
+ from gettext import gettext as _
+
+ import os
+-import gtk
+-import gedit
++
++try:
++ from gi.repository import Gedit
++ os.environ["NAUTILUS_PYTHON_REQUIRE_GTK3"] = "1"
++ GTK3 = True
++except ImportError:
++ import gedit
++ GTK3 = False
++
++from gi.repository import GObject
++from gi.repository import Gtk as gtk
+
+ import rabbitvcs.util.helper
+ from rabbitvcs.vcs import create_vcs_instance
+@@ -327,8 +336,15 @@
+
+ manager = self._window.get_ui_manager()
+ for menu_path in self._menu_paths:
+- widget = manager.get_widget(menu_path)
+- self._menubar_menu.update_action(widget.get_action())
++ # Gtk3 changes how we access a widget's action. Get it from the
++ # UI Manager instead of the widget directly
++ if hasattr(manager, "get_action"):
++ action = manager.get_action(menu_path)
++ else:
++ widget = manager.get_widget(menu_path)
++ action = widget.get_action()
++
++ self._menubar_menu.update_action(action)
+
+ # Menu activate handlers
+ def reload_settings(self, proc):
+@@ -337,49 +353,100 @@
+ def on_context_menu_command_finished(self):
+ self.update_ui()
+
+-class RabbitVCSPlugin(gedit.Plugin):
+- def __init__(self):
+- gedit.Plugin.__init__(self)
+- self._instances = {}
+- self.id_name = "RabbitVCSContextMenuID"
+-
+- def activate(self, window):
+- self._instances[window] = RabbitVCSWindowHelper(self, window)
+-
+- handler_ids = []
+- for signal in ('tab-added', 'tab-removed'):
+- method = getattr(self, 'on_window_' + signal.replace('-', '_'))
+- handler_ids.append(window.connect(signal, method))
+-
+- window.set_data(self.id_name, handler_ids)
+- if window in self._instances:
+- for view in window.get_views():
+- self._instances[window].connect_view(view, self.id_name)
+-
+- def deactivate(self, window):
+- widgets = [window] + window.get_views()
+- for widget in widgets:
+- handler_ids = widget.get_data(self.id_name)
+- if handler_ids is not None:
+- for handler_id in handler_ids:
+- widget.disconnect(handler_id)
+- widget.set_data(self.id_name, None)
+-
+- if window in self._instances:
+- self._instances[window].deactivate()
+- del self._instances[window]
+-
+- def update_ui(self, window):
+- if window in self._instances:
+- self._instances[window].update_ui()
+-
+- def on_window_tab_added(self, window, tab):
+- if window in self._instances:
+- self._instances[window].connect_view(tab.get_view(), self.id_name)
+-
+- def on_window_tab_removed(self, window, tab):
+- if window in self._instances:
+- self._instances[window].disconnect_view(tab.get_view(), self.id_name)
++if GTK3:
++ class RabbitVCSGedit3Plugin(GObject.Object, Gedit.WindowActivatable):
++ __gtype_name__ = "RabbitVCSGedit3Plugin"
++ window = GObject.property(type=Gedit.Window)
++
++ def __init__(self):
++ GObject.Object.__init__(self)
++ self._instances = {}
++ self.id_name = "RabbitVCSContextMenuID"
++
++ def do_activate(self):
++ self._instances[self.window] = RabbitVCSWindowHelper(self, self.window)
++
++ handler_ids = []
++ for signal in ('tab-added', 'tab-removed'):
++ method = getattr(self, 'on_window_' + signal.replace('-', '_'))
++ handler_ids.append(self.window.connect(signal, method))
++
++ self.window.set_data(self.id_name, handler_ids)
++ if self.window in self._instances:
++ for view in self.window.get_views():
++ self._instances[self.window].connect_view(view, self.id_name)
++
++ def do_deactivate(self):
++ widgets = [self.window] + self.window.get_views()
++ for widget in widgets:
++ handler_ids = widget.get_data(self.id_name)
++ if handler_ids is not None:
++ for handler_id in handler_ids:
++ widget.disconnect(handler_id)
++ widget.set_data(self.id_name, None)
++
++ if self.window in self._instances:
++ self._instances[self.window].deactivate()
++ del self._instances[self.window]
++
++ def do_update_state(self):
++ self.update_ui()
++
++ def update_ui(self):
++ if self.window in self._instances:
++ self._instances[self.window].update_ui()
++
++ def on_window_tab_added(self, window, tab):
++ if self.window in self._instances:
++ self._instances[self.window].connect_view(tab.get_view(), self.id_name)
++
++ def on_window_tab_removed(self, window, tab):
++ if window in self._instances:
++ self._instances[self.window].disconnect_view(tab.get_view(), self.id_name)
++else:
++ class RabbitVCSGedit2Plugin(gedit.Plugin):
++ def __init__(self):
++ gedit.Plugin.__init__(self)
++ self._instances = {}
++ self.id_name = "RabbitVCSContextMenuID"
++
++ def activate(self, window):
++ self._instances[window] = RabbitVCSWindowHelper(self, window)
++
++ handler_ids = []
++ for signal in ('tab-added', 'tab-removed'):
++ method = getattr(self, 'on_window_' + signal.replace('-', '_'))
++ handler_ids.append(window.connect(signal, method))
++
++ window.set_data(self.id_name, handler_ids)
++ if window in self._instances:
++ for view in window.get_views():
++ self._instances[window].connect_view(view, self.id_name)
++
++ def deactivate(self, window):
++ widgets = [window] + window.get_views()
++ for widget in widgets:
++ handler_ids = widget.get_data(self.id_name)
++ if handler_ids is not None:
++ for handler_id in handler_ids:
++ widget.disconnect(handler_id)
++ widget.set_data(self.id_name, None)
++
++ if window in self._instances:
++ self._instances[window].deactivate()
++ del self._instances[window]
++
++ def update_ui(self, window):
++ if window in self._instances:
++ self._instances[window].update_ui()
++
++ def on_window_tab_added(self, window, tab):
++ if window in self._instances:
++ self._instances[window].connect_view(tab.get_view(), self.id_name)
++
++ def on_window_tab_removed(self, window, tab):
++ if window in self._instances:
++ self._instances[window].disconnect_view(tab.get_view(), self.id_name)
+
+ class MenuIgnoreByFilename(MenuItem):
+ identifier = "RabbitVCS::Ignore_By_Filename"
+@@ -593,7 +660,10 @@
+ signal = "activate"
+
+ def make_menu_item(self, item, id_magic):
+- return item.make_gtk_menu_item(id_magic)
++ if GTK3:
++ return item.make_gtk3_menu_item(id_magic)
++ else:
++ return item.make_gtk_menu_item(id_magic)
+
+ def attach_submenu(self, menu_node, submenu_list):
+ submenu = gtk.Menu()
+--- /dev/null
++++ b/clients/gedit/rabbitvcs-gedit3.plugin
+@@ -0,0 +1,9 @@
++[Plugin]
++Loader=python
++Module=rabbitvcs-plugin
++IAge=3
++Name=RabbitVCS
++Description=RabbitVCS plugin for Gedit
++Authors=Adam Plumb <adamplumb@gmail.com>
++Copyright=Copyright © 2011 Adam Plumb
++Website=http://www.rabbitvcs.org
+--- a/clients/gedit/README
++++ b/clients/gedit/README
+@@ -8,14 +8,24 @@
+ * gedit
+ * (all other RabbitVCS requirements)
+
+-To install:
++To install for Gedit 3:
+ To install for all users, copy rabbitvcs-plugin.py and
+- rabbitvcs.gedit-plugin to:
++ rabbitvcs-gedit3.plugin to:
++ /usr/share/gedit/plugins
++
++ To install for a single user, copy rabbitvcs-plugin.py and
++ rabbitvcs-gedit3.plugin to:
++ ~/.local/share/gedit/plugins
++
++To install for Gedit 2:
++ To install for all users, copy rabbitvcs-plugin.py and
++ rabbitvcs-gedit2.gedit-plugin to:
+ /usr/lib/gedit-2/plugins
+
+ To install for a single user, copy rabbitvcs-plugin.py and
+- rabbitvcs.gedit-plugin to:
+- ~/.gnome2/gedit/plugins
++ rabbitvcs-gedit2.gedit-plugin to:
++ ~/.gnome2/gedit/plugins
++
+
+ Troubleshooting:
+
diff --git a/dev-vcs/rabbitvcs/rabbitvcs-0.14.2.1.ebuild b/dev-vcs/rabbitvcs/rabbitvcs-0.14.2.1.ebuild
deleted file mode 100644
index 0d12bde68267..000000000000
--- a/dev-vcs/rabbitvcs/rabbitvcs-0.14.2.1.ebuild
+++ /dev/null
@@ -1,88 +0,0 @@
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-vcs/rabbitvcs/rabbitvcs-0.14.2.1.ebuild,v 1.4 2012/02/05 01:43:47 floppym Exp $
-
-EAPI=2
-
-PYTHON_DEPEND="2:2.5"
-SUPPORT_PYTHON_ABIS="1"
-RESTRICT_PYTHON_ABIS="2.4 3.*"
-
-inherit gnome2-utils multilib distutils
-
-DESCRIPTION="Integrated version control support for your desktop"
-HOMEPAGE="http://rabbitvcs.org"
-SRC_URI="http://rabbitvcs.googlecode.com/files/${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="cli diff gedit git nautilus spell thunar"
-
-RDEPEND="dev-python/configobj
- dev-python/pygobject:2
- dev-python/pygtk
- dev-python/pysvn
- dev-python/simplejson
- diff? ( dev-util/meld )
- gedit? ( app-editors/gedit )
- git? ( dev-python/dulwich )
- nautilus? ( >=dev-python/nautilus-python-0.7.0
- dev-python/dbus-python
- dev-python/gnome-vfs-python )
- spell? ( dev-python/gtkspell-python )
- thunar? ( dev-python/thunarx-python
- dev-python/dbus-python )"
-
-src_prepare() {
- python_convert_shebangs -r 2 .
-
- distutils_src_prepare
-
- # we should not do gtk-update-icon-cache from setup script
- # we prefer portage for that
- sed -e 's/"install"/"fakeinstall"/' -i "${S}/setup.py" || die
-}
-
-src_install() {
- distutils_src_install
-
- if use cli ; then
- dobin clients/cli/${PN} || die
- fi
- if use gedit ; then
- insinto /usr/$(get_libdir)/gedit-2/plugins
- doins clients/gedit/${PN}-plugin.py || die
- doins clients/gedit/${PN}.gedit-plugin || die
- fi
- if use nautilus ; then
- insinto /usr/$(get_libdir)/nautilus/extensions-2.0/python
- doins clients/nautilus/RabbitVCS.py || die
- fi
- if use thunar ; then
- has_version '>=xfce-base/thunar-1.1.0' && tv=2 || tv=1
- insinto "/usr/$(get_libdir)/thunarx-${tv}/python"
- doins clients/thunar/RabbitVCS.py || die
- fi
-}
-
-pkg_preinst() {
- gnome2_icon_savelist
-}
-
-pkg_postinst() {
- distutils_pkg_postinst
- gnome2_icon_cache_update
-
- elog "You should restart file manager to changes take effect:"
- use nautilus && elog "\$ nautilus -q"
- use thunar && elog "\$ thunar -q && thunar &"
- elog ""
- elog "Also you should really look at known issues page:"
- elog "http://wiki.rabbitvcs.org/wiki/support/known-issues"
-}
-
-pkg_postrm() {
- distutils_pkg_postrm
- gnome2_icon_cache_update
-}
diff --git a/dev-vcs/rabbitvcs/rabbitvcs-0.15.0.5.ebuild b/dev-vcs/rabbitvcs/rabbitvcs-0.15.0.5-r2.ebuild
index 3bdd3e3b2667..b1249fdaea74 100644
--- a/dev-vcs/rabbitvcs/rabbitvcs-0.15.0.5.ebuild
+++ b/dev-vcs/rabbitvcs/rabbitvcs-0.15.0.5-r2.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-vcs/rabbitvcs/rabbitvcs-0.15.0.5.ebuild,v 1.3 2012/02/05 01:43:47 floppym Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-vcs/rabbitvcs/rabbitvcs-0.15.0.5-r2.ebuild,v 1.1 2012/06/04 20:24:23 xmw Exp $
EAPI=4
@@ -8,7 +8,7 @@ PYTHON_DEPEND="2:2.5"
SUPPORT_PYTHON_ABIS="1"
RESTRICT_PYTHON_ABIS="2.4 3.*"
-inherit gnome2-utils multilib distutils
+inherit eutils gnome2-utils multilib distutils
DESCRIPTION="Integrated version control support for your desktop"
HOMEPAGE="http://rabbitvcs.org"
@@ -42,6 +42,8 @@ src_prepare() {
# we should not do gtk-update-icon-cache from setup script
# we prefer portage for that
sed -e 's/"install"/"fakeinstall"/' -i "${S}/setup.py" || die
+
+ epatch "${FILESDIR}"/50_fix_gedit3_plugin.patch #bug 419647
}
src_install() {
@@ -53,12 +55,15 @@ src_install() {
if use gedit ; then
insinto /usr/$(get_libdir)/gedit-2/plugins
doins clients/gedit/${PN}-plugin.py
- doins clients/gedit/${PN}.gedit-plugin
+ doins clients/gedit/${PN}-gedit2.gedit-plugin
+ insinto /usr/$(get_libdir)/gedit/plugins
+ doins clients/gedit/${PN}-plugin.py
+ doins clients/gedit/${PN}-gedit3.plugin
fi
if use nautilus ; then
insinto /usr/$(get_libdir)/nautilus/extensions-2.0/python
doins clients/nautilus/RabbitVCS.py
- insinto /usr/$(get_libdir)/nautilus/extensions-3.0/python
+ insinto /usr/share/nautilus-python/extensions
doins clients/nautilus-3.0/RabbitVCS.py
fi
if use thunar ; then