summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuli Suominen <ssuominen@gentoo.org>2012-05-11 09:28:45 +0000
committerSamuli Suominen <ssuominen@gentoo.org>2012-05-11 09:28:45 +0000
commitd96f4442fa2a06b91723c970e8167fcc87fe9eec (patch)
tree2fb1474787c921b7e723a6e4737271e6ae261737 /media-tv/gtk-v4l
parentClean old entries. (diff)
downloadgentoo-2-d96f4442fa2a06b91723c970e8167fcc87fe9eec.tar.gz
gentoo-2-d96f4442fa2a06b91723c970e8167fcc87fe9eec.tar.bz2
gentoo-2-d96f4442fa2a06b91723c970e8167fcc87fe9eec.zip
Initial commit.
(Portage version: 2.2.0_alpha102/cvs/Linux x86_64)
Diffstat (limited to 'media-tv/gtk-v4l')
-rw-r--r--media-tv/gtk-v4l/ChangeLog10
-rw-r--r--media-tv/gtk-v4l/Manifest5
-rw-r--r--media-tv/gtk-v4l/files/gtk-v4l-0.4-device-remove-source-on-finalize.patch53
-rw-r--r--media-tv/gtk-v4l/gtk-v4l-0.4.ebuild38
-rw-r--r--media-tv/gtk-v4l/metadata.xml9
5 files changed, 115 insertions, 0 deletions
diff --git a/media-tv/gtk-v4l/ChangeLog b/media-tv/gtk-v4l/ChangeLog
new file mode 100644
index 000000000000..c079e5c0e6aa
--- /dev/null
+++ b/media-tv/gtk-v4l/ChangeLog
@@ -0,0 +1,10 @@
+# ChangeLog for media-tv/gtk-v4l
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/media-tv/gtk-v4l/ChangeLog,v 1.1 2012/05/11 09:28:45 ssuominen Exp $
+
+*gtk-v4l-0.4 (11 May 2012)
+
+ 11 May 2012; Samuli Suominen <ssuominen@gentoo.org> +gtk-v4l-0.4.ebuild,
+ +files/gtk-v4l-0.4-device-remove-source-on-finalize.patch:
+ Initial commit.
+
diff --git a/media-tv/gtk-v4l/Manifest b/media-tv/gtk-v4l/Manifest
new file mode 100644
index 000000000000..01c8dec2bf2b
--- /dev/null
+++ b/media-tv/gtk-v4l/Manifest
@@ -0,0 +1,5 @@
+AUX gtk-v4l-0.4-device-remove-source-on-finalize.patch 1850 RMD160 9a08510adbcee2f3289be4fad92b7f832ddaf06e SHA1 2e5d6d3447ac44df9f59b36240b0e0499427711e SHA256 9284321fd38cdd73089b029cce3b869e2f4a69803ec2b5c86063a9edf6568c08
+DIST gtk-v4l-0.4.tar.gz 328732 RMD160 70961b76674c1c4f2d12bf4eff0cce687fc13d78 SHA1 20bca49645bb86b42f562d399ffe2ade2ac4d78c SHA256 a87fe9e3afc141dd98be7bf8875faa679a914f438611fb01a7b25b75c2d75b6c
+EBUILD gtk-v4l-0.4.ebuild 865 RMD160 d0e371ddf4219c109b0c555248953312f50f0509 SHA1 8d387cfee552fdce2a0b2fbe1a698aff5673cc87 SHA256 580730104922b2d3592a227125c4ccdc0335f2da9232e297cfc408b388cb0966
+MISC ChangeLog 300 RMD160 7dc20ffc39342c971b8227be1687534b421c58ab SHA1 337cdd256df651bb85c0e2939ab06a29777e2e4f SHA256 5d33be6425451b8d5808b6868aad5de3b5b87e03627131b08c13db155f2e7348
+MISC metadata.xml 260 RMD160 2bb437728941cace30d6d43f2098d4e731251fe0 SHA1 52746ae468a9f37546e32bb4b4a80f98bd57696d SHA256 bf8ed941af6ef82ee0f6280fad3ef2339adcdd0a282c19ca4c63f95e77e30b3c
diff --git a/media-tv/gtk-v4l/files/gtk-v4l-0.4-device-remove-source-on-finalize.patch b/media-tv/gtk-v4l/files/gtk-v4l-0.4-device-remove-source-on-finalize.patch
new file mode 100644
index 000000000000..301c6b152810
--- /dev/null
+++ b/media-tv/gtk-v4l/files/gtk-v4l-0.4-device-remove-source-on-finalize.patch
@@ -0,0 +1,53 @@
+From e7730e2eb0e148e94f6bba13a70ddf61ae94b313 Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede@redhat.com>
+Date: Wed, 9 May 2012 13:00:07 +0200
+Subject: [PATCH] gtk-v4l-device: remove source on finalize
+
+This fixes us from getting events from it, with a user_data argument
+pointing to the finalized object, when the fd gets re-used if another device
+gets plugged in later, and that device then generates ctrl events.
+
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+---
+ lib/gtk-v4l-device.c | 10 +++++++---
+ 1 file changed, 7 insertions(+), 3 deletions(-)
+
+diff --git a/lib/gtk-v4l-device.c b/lib/gtk-v4l-device.c
+index c4ce1e5..67e8ccc 100644
+--- a/lib/gtk-v4l-device.c
++++ b/lib/gtk-v4l-device.c
+@@ -43,6 +43,7 @@ enum
+ struct _Gtkv4lDevicePrivate {
+ GList *controls;
+ GIOChannel *channel;
++ guint channel_source_id;
+ };
+
+ /* will create gtk_v4l_device_get_type and set gtk_v4l_device_parent_class */
+@@ -166,8 +167,10 @@ gtk_v4l_device_finalize (GObject *object)
+ g_list_foreach (self->priv->controls, gtk_v4l_device_free_control, NULL);
+ g_list_free (self->priv->controls);
+
+- if (self->priv->channel)
++ if (self->priv->channel) {
++ g_source_remove (self->priv->channel_source_id);
+ g_io_channel_unref (self->priv->channel);
++ }
+
+ if (self->fd != -1)
+ close (self->fd);
+@@ -303,8 +306,9 @@ gtk_v4l_device_new_control (Gtkv4lDevice *self, struct v4l2_queryctrl *query)
+ r = v4l2_ioctl(self->fd, VIDIOC_SUBSCRIBE_EVENT, &sub);
+ if (r >= 0 && !self->priv->channel) {
+ self->priv->channel = g_io_channel_unix_new (self->fd);
+- g_io_add_watch (self->priv->channel, G_IO_PRI, gtk_v4l_device_ctrl_event,
+- self);
++ self->priv->channel_source_id =
++ g_io_add_watch (self->priv->channel, G_IO_PRI, gtk_v4l_device_ctrl_event,
++ self);
+ }
+ }
+
+--
+1.7.10
+
diff --git a/media-tv/gtk-v4l/gtk-v4l-0.4.ebuild b/media-tv/gtk-v4l/gtk-v4l-0.4.ebuild
new file mode 100644
index 000000000000..5853eac97994
--- /dev/null
+++ b/media-tv/gtk-v4l/gtk-v4l-0.4.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-tv/gtk-v4l/gtk-v4l-0.4.ebuild,v 1.1 2012/05/11 09:28:45 ssuominen Exp $
+
+EAPI=4
+inherit eutils
+
+DESCRIPTION="A control application for Video 4 Linux (based on C and GTK+)"
+HOMEPAGE="http://fedorahosted.org/gtk-v4l/"
+SRC_URI="http://fedorahosted.org/releases/${PN:0:1}/${PN:1:1}/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND=">=dev-libs/glib-2
+ >=media-libs/libv4l-0.6
+ || ( >=sys-fs/udev-171-r5[gudev] <sys-fs/udev-171[extras] )
+ x11-libs/gtk+:3"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+DOCS="AUTHORS ChangeLog README"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-device-remove-source-on-finalize.patch
+ sed -i -e '/^Categories/s:Application:GTK:' ${PN}.desktop.in || die
+}
+
+src_configure() {
+ econf --disable-static
+}
+
+src_install() {
+ default
+ rm -f "${ED}"/usr/lib*/lib*.la
+}
diff --git a/media-tv/gtk-v4l/metadata.xml b/media-tv/gtk-v4l/metadata.xml
new file mode 100644
index 000000000000..91724ddf6152
--- /dev/null
+++ b/media-tv/gtk-v4l/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>media-tv</herd>
+ <maintainer>
+ <email>ssuominen@gentoo.org</email>
+ <name>Samuli Suominen</name>
+ </maintainer>
+</pkgmetadata>