summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPacho Ramos <pacho@gentoo.org>2015-04-26 12:22:43 +0000
committerPacho Ramos <pacho@gentoo.org>2015-04-26 12:22:43 +0000
commit08fa936c32d0636f35b81b222c63572f3201be8c (patch)
tree869eba481b204072e40c14e68a1292081df02d56 /x11-misc
parentRemove redundant dependency on dbus-python. This fixes bug #547578. Thanks to... (diff)
downloadgentoo-2-08fa936c32d0636f35b81b222c63572f3201be8c.tar.gz
gentoo-2-08fa936c32d0636f35b81b222c63572f3201be8c.tar.bz2
gentoo-2-08fa936c32d0636f35b81b222c63572f3201be8c.zip
Fix bug #539638, thanks a lot to Agustin Ferrari
(Portage version: 2.2.18/cvs/Linux x86_64, signed Manifest commit with key A188FBD4)
Diffstat (limited to 'x11-misc')
-rw-r--r--x11-misc/gdevilspie/ChangeLog10
-rw-r--r--x11-misc/gdevilspie/files/gdevilspie-0.5-paths.patch84
-rw-r--r--x11-misc/gdevilspie/gdevilspie-0.5-r1.ebuild (renamed from x11-misc/gdevilspie/gdevilspie-0.5.ebuild)31
3 files changed, 108 insertions, 17 deletions
diff --git a/x11-misc/gdevilspie/ChangeLog b/x11-misc/gdevilspie/ChangeLog
index 80d5c48d7b79..44c77de61e1c 100644
--- a/x11-misc/gdevilspie/ChangeLog
+++ b/x11-misc/gdevilspie/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for x11-misc/gdevilspie
-# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/x11-misc/gdevilspie/ChangeLog,v 1.8 2014/08/10 20:02:27 slyfox Exp $
+# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/x11-misc/gdevilspie/ChangeLog,v 1.9 2015/04/26 12:22:43 pacho Exp $
+
+*gdevilspie-0.5-r1 (26 Apr 2015)
+
+ 26 Apr 2015; Pacho Ramos <pacho@gentoo.org> +files/gdevilspie-0.5-paths.patch,
+ +gdevilspie-0.5-r1.ebuild, -gdevilspie-0.5.ebuild:
+ Fix bug #539638, thanks a lot to Agustin Ferrari
10 Aug 2014; Sergei Trofimovich <slyfox@gentoo.org> gdevilspie-0.5.ebuild:
QA: drop trailing '.' from DESCRIPTION
diff --git a/x11-misc/gdevilspie/files/gdevilspie-0.5-paths.patch b/x11-misc/gdevilspie/files/gdevilspie-0.5-paths.patch
new file mode 100644
index 000000000000..771501b0045e
--- /dev/null
+++ b/x11-misc/gdevilspie/files/gdevilspie-0.5-paths.patch
@@ -0,0 +1,84 @@
+--- /home/usuario/Escritorio/gdevilspie 2015-04-26 03:30:16.760326671 -0300
++++ /usr/lib/python-exec/python2.7/gdevilspie 2015-04-26 03:32:11.247227671 -0300
+@@ -48,6 +48,10 @@
+ DISABLE_XDG=""
+ try:
+ import xdg.DesktopEntry
++ if xdg.DesktopEntry.__dict__.has_key('xdg_config_home') == True:
++ xdg_config_home = xdg.DesktopEntry.xdg_config_home
++ else:
++ xdg_config_home = os.path.join(os.environ["HOME"], "config")
+ except:
+ error = gtk.MessageDialog(None, 0, gtk.MESSAGE_ERROR, gtk.BUTTONS_CLOSE, "Make sure that Python-xdg is correctly installed if you need autostart handling.")
+ response = error.run()
+@@ -300,22 +304,32 @@
+ return strous
+
+ # Glade file used in all classes
+-if os.path.isfile(os.path.dirname(sys.argv[0])+'/gdevilspie.glade'):
+- gladefile = os.path.dirname(sys.argv[0])+'/gdevilspie.glade'
+-elif os.path.isfile(os.path.dirname(sys.argv[0]) + '/../share/gdevilspie/gdevilspie.glade'):
+- gladefile = os.path.dirname(sys.argv[0])+'/../share/gdevilspie/gdevilspie.glade'
+-else:
+- gtk.MessageDialog(None, 0, gtk.MESSAGE_ERROR, gtk.BUTTONS_CLOSE, "Glade file not found, exiting.").run()
+- quit()
++for syspath in os.environ["PATH"].split(":"):
++ if os.path.isfile(os.path.dirname(syspath) + '/../share/gdevilspie/gdevilspie.glade'):
++ gladefile = os.path.dirname(syspath)+'/../share/gdevilspie/gdevilspie.glade'
++ break
++if "gladefile" not in globals():
++ if os.path.isfile(os.path.dirname(sys.argv[0])+'/gdevilspie.glade'):
++ gladefile = os.path.dirname(sys.argv[0])+'/gdevilspie.glade'
++ elif os.path.isfile(os.path.dirname(sys.argv[0]) + '/../share/gdevilspie/gdevilspie.glade'):
++ gladefile = os.path.dirname(sys.argv[0])+'/../share/gdevilspie/gdevilspie.glade'
++ else:
++ gtk.MessageDialog(None, 0, gtk.MESSAGE_ERROR, gtk.BUTTONS_CLOSE, "Glade file not found, exiting.").run()
++ quit()
+
+
+ # icon used
+-if os.path.isfile(os.path.dirname(sys.argv[0])+'/gdevilspie.png'):
+- gdevilspie_icon = os.path.dirname(sys.argv[0])+'/gdevilspie.png'
+-elif os.path.isfile(os.path.dirname(sys.argv[0]) + '/../share/gdevilspie/gdevilspie.png'):
+- gdevilspie_icon = os.path.dirname(sys.argv[0])+'/../share/gdevilspie/gdevilspie.png'
+-else:
+- gtk.MessageDialog(None, 0, gtk.MESSAGE_ERROR, gtk.BUTTONS_CLOSE, "Icon file not found.").run()
++for syspath in os.environ["PATH"].split(":"):
++ if os.path.isfile(os.path.dirname(syspath) + '/../share/gdevilspie/gdevilspie.png'):
++ gdevilspie_icon = os.path.dirname(syspath)+'/../share/gdevilspie/gdevilspie.png'
++ break
++if "gdevilspie_icon" not in globals():
++ if os.path.isfile(os.path.dirname(sys.argv[0])+'/gdevilspie.png'):
++ gdevilspie_icon = os.path.dirname(sys.argv[0])+'/gdevilspie.png'
++ elif os.path.isfile(os.path.dirname(sys.argv[0]) + '/../share/gdevilspie/gdevilspie.png'):
++ gdevilspie_icon = os.path.dirname(sys.argv[0])+'/../share/gdevilspie/gdevilspie.png'
++ else:
++ gtk.MessageDialog(None, 0, gtk.MESSAGE_ERROR, gtk.BUTTONS_CLOSE, "Icon file not found.").run()
+
+ # Directory where we store .ds files
+ dir = os.path.expanduser("~/.devilspie")
+@@ -542,12 +556,12 @@
+ if ( DISABLE_XDG == "True" ):
+ self.DaemonAutostart.set_sensitive(False)
+ else:
+- if (os.path.exists(xdg.DesktopEntry.xdg_config_home + "/autostart/devilspie.desktop")):
+- df = xdg.DesktopEntry.DesktopEntry(xdg.DesktopEntry.xdg_config_home + "/autostart/devilspie.desktop")
++ if (os.path.exists(xdg_config_home + "/autostart/devilspie.desktop")):
++ df = xdg.DesktopEntry.DesktopEntry(xdg_config_home + "/autostart/devilspie.desktop")
+ if (df.get('X-GNOME-Autostart-enabled') == 'true'):
+ self.DaemonAutostart.set_active(True)
+ else:
+- df = xdg.DesktopEntry.DesktopEntry(xdg.DesktopEntry.xdg_config_home + "/autostart/devilspie.desktop")
++ df = xdg.DesktopEntry.DesktopEntry(xdg_config_home + "/autostart/devilspie.desktop")
+ df.set('Name','Devilspie')
+ df.set('Exec','devilspie')
+ df.set('X-GNOME-Autostart-enabled','false')
+@@ -555,7 +569,7 @@
+
+
+ def on_DaemonAutostart_toggled(self,widget):
+- df = xdg.DesktopEntry.DesktopEntry(xdg.DesktopEntry.xdg_config_home + "/autostart/devilspie.desktop")
++ df = xdg.DesktopEntry.DesktopEntry(xdg_config_home + "/autostart/devilspie.desktop")
+ if (widget.get_active()):
+ df.set('X-GNOME-Autostart-enabled','true')
+ df.write()
diff --git a/x11-misc/gdevilspie/gdevilspie-0.5.ebuild b/x11-misc/gdevilspie/gdevilspie-0.5-r1.ebuild
index a4b30f189941..7e4c189c4eb6 100644
--- a/x11-misc/gdevilspie/gdevilspie-0.5.ebuild
+++ b/x11-misc/gdevilspie/gdevilspie-0.5-r1.ebuild
@@ -1,11 +1,11 @@
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/x11-misc/gdevilspie/gdevilspie-0.5.ebuild,v 1.2 2014/08/10 20:02:27 slyfox Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-misc/gdevilspie/gdevilspie-0.5-r1.ebuild,v 1.1 2015/04/26 12:22:43 pacho Exp $
-EAPI=4
-PYTHON_DEPEND="2:2.6"
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
-inherit distutils
+inherit distutils-r1
DESCRIPTION="A user friendly interface to the devilspie window matching daemon, to create rules easily"
HOMEPAGE="http://code.google.com/p/gdevilspie/"
@@ -16,19 +16,20 @@ SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""
-DEPEND="=dev-python/pygtk-2*
- dev-python/libwnck-python"
+DEPEND="
+ dev-python/pygtk:2[${PYTHON_USEDEP}]
+ dev-python/libwnck-python[${PYTHON_USEDEP}]
+"
RDEPEND="${DEPEND}
- x11-misc/devilspie"
+ x11-misc/devilspie
+"
-PYTHON_MODNAME="gDevilspie"
-
-pkg_setup() {
- python_set_active_version 2
- python_pkg_setup
-}
+PATCHES=(
+ # Fix paths for finding XDG and glade file, bug #539638
+ "${FILESDIR}/${P}-paths.patch"
+)
src_prepare() {
sed -i -e "s:doc/gdevilspie:doc/${PF}:" setup.py || die
- distutils_src_prepare
+ distutils-r1_src_prepare
}