summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2009-08-03 20:52:24 +0000
committerMichał Górny <mgorny@gentoo.org>2009-08-03 20:52:24 +0000
commit74c8cedb0447a601d262535997a956f41d4723ff (patch)
tree53a0f70582506284c2d4ddf34b36539479944313
parentdev-ruby/sinatra: New Ebuild for bug 280020 thanks to scarabeus, idl0r, a3li,... (diff)
downloadsunrise-74c8cedb0447a601d262535997a956f41d4723ff.tar.gz
sunrise-74c8cedb0447a601d262535997a956f41d4723ff.tar.bz2
sunrise-74c8cedb0447a601d262535997a956f41d4723ff.zip
x11-misc/gestikk: Ebuild for x11-misc/gestikk (bug #248260).
svn path=/sunrise/; revision=8937
-rw-r--r--x11-misc/gestikk/ChangeLog9
-rw-r--r--x11-misc/gestikk/Manifest6
-rw-r--r--x11-misc/gestikk/files/gestikk-0.6-remove-libnotify.diff87
-rw-r--r--x11-misc/gestikk/files/gestikk-icon-path.diff12
-rw-r--r--x11-misc/gestikk/gestikk-0.6.ebuild65
-rw-r--r--x11-misc/gestikk/metadata.xml5
6 files changed, 184 insertions, 0 deletions
diff --git a/x11-misc/gestikk/ChangeLog b/x11-misc/gestikk/ChangeLog
new file mode 100644
index 000000000..1b4de50fe
--- /dev/null
+++ b/x11-misc/gestikk/ChangeLog
@@ -0,0 +1,9 @@
+# ChangeLog for x11-misc/gestikk
+# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+ 03 Aug 2009; Michał Górny (sedzimir) <gentoo@mgorny.alt.pl>
+ +gestikk-0.6.ebuild, +files/gestikk-0.6-remove-libnotify.diff,
+ +files/gestikk-icon-path.diff, +metadata.xml:
+ Ebuild for x11-misc/gestikk (bug #248260).
+
diff --git a/x11-misc/gestikk/Manifest b/x11-misc/gestikk/Manifest
new file mode 100644
index 000000000..4568f398e
--- /dev/null
+++ b/x11-misc/gestikk/Manifest
@@ -0,0 +1,6 @@
+AUX gestikk-0.6-remove-libnotify.diff 4248 RMD160 829e2b1a9a6f5d69014b1f66c7c5d1adc7a4d1a9 SHA1 6642ff10026ddf85f70ec9414b618ed660d9cb7e SHA256 852d8abebb6a92113eccf56e1025a9db7cb9c52d9e5103b91258b2aa19591d9a
+AUX gestikk-icon-path.diff 529 RMD160 daf1451659c7a94e501812584a09fc3bf7dc574e SHA1 3d6a089424d6ba3a46cd261882d60fe20b89713a SHA256 fa1a71ee5491df3385d7b829be24c8173ff08395316ea57fe42ce41e38c93f41
+DIST gestikk-0.6.tar.gz 102864 RMD160 ad6ce87e3004ccdcd22dc6e1fc77e7c8ea96865d SHA1 3d67ee291daf064cd6cf84d2a6707fd98734495c SHA256 46f88583a8557805e67834682118cc5dd5fcb91ed1cdad50667159c613e0fb5b
+EBUILD gestikk-0.6.ebuild 1775 RMD160 ef127c236c77c547c97dd096d7f4312d1eb98b5f SHA1 e464e0e600b40994962bcc2d0edac55defdb49dc SHA256 a02c30705c6e70f150883a8d9c4062aafc5c3838795932ee23686c038289db37
+MISC ChangeLog 340 RMD160 28eb95655125981966b17b09c562103385cc6771 SHA1 6bc3c602dbe722f9d5397fde67ea5bd3c362ef0d SHA256 13503a35116f21d88cbc4471f65bdbb57473097c82ffb06ee975a79102c6adf2
+MISC metadata.xml 171 RMD160 ed284df01c230fc7990a6b5888b39166d23f29ba SHA1 f3d64a69044b710e23fb874b3ee4cd338858c8b4 SHA256 a7b30fbacd0e4c312c07a3efac112a3794c81d134442d8104325734d03425adf
diff --git a/x11-misc/gestikk/files/gestikk-0.6-remove-libnotify.diff b/x11-misc/gestikk/files/gestikk-0.6-remove-libnotify.diff
new file mode 100644
index 000000000..29c5f6ce1
--- /dev/null
+++ b/x11-misc/gestikk/files/gestikk-0.6-remove-libnotify.diff
@@ -0,0 +1,87 @@
+diff -dupr gestikk-old/gestikk/start_main.py gestikk-0.6/gestikk/start_main.py
+--- gestikk-old/gestikk/start_main.py 2008-11-23 00:31:14.519650800 +0100
++++ gestikk-0.6/gestikk/start_main.py 2008-11-23 00:31:55.924650920 +0100
+@@ -31,9 +31,6 @@ import subprocess
+ import signal
+ import gtk
+ import gobject
+-import pynotify
+-if not pynotify.init("gestikk"):
+- print "Libnotify daemon error!"
+
+ import osd
+ from gestikk.tools import *
+@@ -102,26 +99,6 @@ class StatusIcon:
+ subprocess.Popen([get_file('gestikk', 'executable'), '-c', '-q'])
+
+
+-class Notifier:
+- """ class for notifying the user when a gesture started """
+- def __init__(self, logic, statusicon):
+- self.logic = logic
+- self.statusicon = statusicon
+-
+- def notify(self, s, gesture):
+- """ Notify and display `s`
+- :type s: String
+- """
+- notify = pynotify.Notification(_("Notification"), s.replace('<', '&lt;').replace('>', '&gt;'))
+- screen, rect, orient = self.statusicon.icon.get_geometry()
+- notify.set_hint("x", rect.x + (rect.width / 2))
+- notify.set_hint("y", rect.y + (rect.height / 2))
+- notify.set_timeout(3000) # timeout in ms
+- color = self.logic.config_get_option('OSD', 'color', '#0000FF')
+- pb = pixmap_to_pixbuf(gesture_to_pixmap(gesture2py(gesture), 40, color), (255, 255, 255))
+- notify.set_icon_from_pixbuf(pb)
+- notify.show()
+-
+ class Listener:
+ """ class for listening the mouse positions """
+ def __init__(self, logic, notifier, debugger):
+@@ -224,9 +201,8 @@ class Listener:
+ if action.check_condition():
+ action.do()
+ self.debugger.debug(self.notify_string(gesture_repr))
+- if self.notify_method == 'balloon' or self.notify_method == 'osd':
+- self.notifier.notify(action.get_formatted(), action.gesture)
+ if self.notify_method == 'osd':
++ self.notifier.notify(action.get_formatted(), action.gesture)
+ gobject.timeout_add(3000, self._osd_clear) # show it 2 sec
+ return self.running
+
+@@ -248,9 +224,7 @@ class Listener:
+ self.notify_method = self.logic.config_get_option('Notification', 'type')
+ if isinstance(self.notifier, osd.OSDNotifier):
+ self.notifier.destroy()
+- if self.notify_method == 'balloon':
+- self.notifier = Notifier(self.logic, self.logic.status_icon)
+- elif self.notify_method == 'osd':
++ if self.notify_method == 'osd':
+ notify_colorstr = self.logic.config_get_option('Notification', 'color', 'red')
+ notify_font = self.logic.config_get_option('Notification', 'font', 'Sans')
+ notify_fontsize = self.logic.config_get_option('Notification' , 'font_size', '20')
+@@ -269,11 +243,7 @@ def main(debug):
+ logic.status_icon = status # Not clean... TODO?
+ # get notifiers
+ notify_m = logic.config_get_option('Notification', 'type')
+- if notify_m == 'balloon':
+- debugger.debug("Using balloontip notification")
+- notifier = Notifier(logic, status)
+- osd_obj = False
+- elif notify_m == 'osd':
++ if notify_m == 'osd':
+ debugger.debug("Using OSD notification")
+ notify_colorstr = logic.config_get_option('Notification', 'color', 'red')
+ notify_font = logic.config_get_option('Notification', 'font', 'Sans')
+diff -dupr gestikk-old/gestikk/tools.py gestikk-0.6/gestikk/tools.py
+--- gestikk-old/gestikk/tools.py 2008-11-23 00:31:14.519650800 +0100
++++ gestikk-0.6/gestikk/tools.py 2008-11-23 00:31:07.654525360 +0100
+@@ -679,7 +679,7 @@ class Logic():
+ print 'You have chosen a gesture switcher which is not supported anymore. I\'ll reset it.'
+ self.current_switcher = 'rightdown'
+ self.current_switcher_txt = dict_rev(self.gesture_switchers_txt)[self.gesture_switchers.index(self.current_switcher)]
+- self.notifiers = {"0":_("None"), "balloon":_("Balloontip"), "osd":_("OSD")}
++ self.notifiers = {"0":_("None"), "osd":_("OSD")}
+
+ self.enable_conditions = True
+
diff --git a/x11-misc/gestikk/files/gestikk-icon-path.diff b/x11-misc/gestikk/files/gestikk-icon-path.diff
new file mode 100644
index 000000000..707392907
--- /dev/null
+++ b/x11-misc/gestikk/files/gestikk-icon-path.diff
@@ -0,0 +1,12 @@
+diff -dupr gestikk-old/gestikk/tools.py gestikk-0.6/gestikk/tools.py
+--- gestikk-old/gestikk/tools.py 2008-11-22 22:17:34.905524960 +0100
++++ gestikk-0.6/gestikk/tools.py 2008-11-22 22:18:01.084529360 +0100
+@@ -114,7 +114,7 @@ def get_path(kind):
+ :param kind: one of 'pixmap', 'icon'
+ """
+ return {'pixmap':'/usr/share/pixmaps',
+- 'icon':'/usr/share/icons',
++ 'icon':'/usr/share/pixmaps',
+ 'gladefile':'/usr/share/gestikk',
+ 'executable':'/usr/bin'}.get(kind, '')
+
diff --git a/x11-misc/gestikk/gestikk-0.6.ebuild b/x11-misc/gestikk/gestikk-0.6.ebuild
new file mode 100644
index 000000000..df4e729fe
--- /dev/null
+++ b/x11-misc/gestikk/gestikk-0.6.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI="2"
+NEED_PYTHON="2.5"
+
+inherit eutils python
+
+DESCRIPTION="Mouse gesture recognition for netwm-compliant WMs"
+HOMEPAGE="http://gestikk.reichbier.de/"
+SRC_URI="http://gestikk.reichbier.de/downloads/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="libnotify"
+
+RDEPEND="dev-python/kiwi
+ >=dev-python/pyparsing-1.4.7
+ dev-python/python-virtkey
+ libnotify? ( dev-python/notify-python )"
+
+src_prepare() {
+ # By default, libnotify is required even if it's not used.
+ # This removes whole libnotify-dependant code if we don't want it.
+ use libnotify || epatch "${FILESDIR}"/${P}-remove-libnotify.diff
+
+ # Fix icon location.
+ epatch "${FILESDIR}"/${PN}-icon-path.diff
+
+ # Single .po leftover.
+ rm locale/de/LC_MESSAGES/gestikk.po
+}
+
+src_install() {
+ # Layout based on .deb.
+
+ newbin gestikk.py gestikk || die "dobin failed."
+ insinto "$(python_get_sitedir)"/gestikk
+ doins gestikk/*.py || die "doins failed."
+ insinto /usr/share/gestikk
+ doins gestikk.glade || die "doins failed."
+ insinto /usr/share
+ doins -r locale || die "doins failed."
+
+ # Package provides both .xpm & .png, but internally refers to .xpm only.
+ doicon media/gestikk.xpm || die "doicon failed."
+
+ # Package doesn't supply any .desktop files, so let's make some.
+ make_desktop_entry gestikk '' '' 'Utility;GTK;TrayIcon' \
+ || die "make_desktop_entry failed."
+ make_desktop_entry 'gestikk -c' 'gestikk configuration' gestikk 'Utility;GTK' \
+ || die "make_desktop_entry failed."
+
+ dodoc README TRANSLATORS || die "dodoc failed."
+}
+
+pkg_postinst() {
+ python_mod_optimize "$(python_get_sitedir)"/gestikk
+}
+
+pkg_postrm() {
+ python_mod_cleanup "$(python_get_sitedir)"/gestikk
+}
diff --git a/x11-misc/gestikk/metadata.xml b/x11-misc/gestikk/metadata.xml
new file mode 100644
index 000000000..6f1d493c5
--- /dev/null
+++ b/x11-misc/gestikk/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>maintainer-wanted</herd>
+</pkgmetadata>