summaryrefslogtreecommitdiff
path: root/media-video/cheese
diff options
context:
space:
mode:
Diffstat (limited to 'media-video/cheese')
-rw-r--r--media-video/cheese/Manifest3
-rw-r--r--media-video/cheese/cheese-3.38.0-r1.ebuild97
-rw-r--r--media-video/cheese/files/cheese-3.38.0-Fix-infinite-loop-if-thumbnailer-is-not-available.patch88
-rw-r--r--media-video/cheese/files/cheese-3.38.0-vala-genericarray.patch177
4 files changed, 365 insertions, 0 deletions
diff --git a/media-video/cheese/Manifest b/media-video/cheese/Manifest
index c530a68133d7..7ee047e4dd08 100644
--- a/media-video/cheese/Manifest
+++ b/media-video/cheese/Manifest
@@ -1,4 +1,7 @@
+AUX cheese-3.38.0-Fix-infinite-loop-if-thumbnailer-is-not-available.patch 4008 BLAKE2B 6a8fe1f1514b5e033319a21c2cf3e6d57affc78cf0e46a2d5d34e062a6991fd3a12893f8d0ad9f1c55d56e3e7103cc81f00f97d8e633a4649b3ba0e3d03fb2a8 SHA512 57fc9fada8da49de8e8e23f5211a9a90621b9452104322fe8cc7fbf26f7efcd65a78e324a6b5fc560920d09c865b65268df2ec71e74395cd4a10365b8be5f239
AUX cheese-3.38.0-buildfix.patch 736 BLAKE2B 3118378b5b125ae6fe223d3b114e07805eb2b5d300bb78ec6b8ff3888f19a0b68af0091aa33918c885991a86293c5cc530d65a75d433cd7c5d343889e5740fbe SHA512 6633f5ebdb2662d199d3f44f49754c8e2c9cd2d864084bff079f4f4de9f20d15489f84ca3acba46df0c9af36920c57b1eca94748c097cb744f71669a69fada47
+AUX cheese-3.38.0-vala-genericarray.patch 6731 BLAKE2B 83f283e629106eba1174197f4b0afc9929fcaaaaa6d29ecaa59cbee97a373589638c2aa0da122db0bd11142ef2790e08b8e3a97e757837f4ce420c0f588609a7 SHA512 de93e2664331a792205c29cf893317719b182bece4185452e705cc349d48dbe46d7320a337e16d923dee4da693c07ba0542b4bc4367162212c7df549313849c2
DIST cheese-3.38.0.tar.xz 1086428 BLAKE2B b26a19a019de0385bdd7adbc55c873ebceca90a8f477d2041ef4a5045654f46ee8f7fdfc64f5fd34e059116528cc790610353791a7cbd13d7927a8c3abf38132 SHA512 210b50fc79a7b3a72c94163fe0dd76f7f29f576c1085c671c2c6c3b7f59ee362aec288f885a590ebfd9530534b6a6bad569c6df57874b9fcecf7e9f1ba9531ae
+EBUILD cheese-3.38.0-r1.ebuild 2215 BLAKE2B 8556a48fb5703373ec99ec1100dd2573748f1cbdd83489f0d2896c34202e411462b41eeac8cbcffb3634ba5868ef466bf46c015294e34942ad2628b26f02fb29 SHA512 98ea52ee01d3b26e1f82cc18d020a391052405c0fd743a0733104ec1ab7f2dbb9bcb9b0fd43ae366b4d3bdb16d99c3544e2cb68793ddf517e1ae98c8a7041eed
EBUILD cheese-3.38.0.ebuild 2120 BLAKE2B c28699d5912d6bcf91c9c95b02f00bb1e2c5c88964b67dd46681549eccc0570fe1cd55a3d21bacf5b557ba0bb4c4cd9ac1e4ecea4d13cd067577bca19abda7fa SHA512 5af98575aafab5be072e221cc54d4f317cca56fd1bb60a17c80b5811760d2f63c4140ffeecaa350677491737c2bc4bd66ffc2ca7d7d6be835b978246aad62b4b
MISC metadata.xml 428 BLAKE2B 3a6b33697b144cba857668b55e04897b8b6c6c4323f09be85ce827843ef50c9c6d988a4e60ffde4ecf1e66a73d70f0e71f2f05371f33f3853429107684abbc9a SHA512 cbe065cc8fe75a86d8f16788dc2ddeafda2b1c27858427f6c9ec83841730e3d9c1c9f7815718c86e19626098b96782a1017b614bac5a0121c92af04b11a30a22
diff --git a/media-video/cheese/cheese-3.38.0-r1.ebuild b/media-video/cheese/cheese-3.38.0-r1.ebuild
new file mode 100644
index 000000000000..9b233fac2198
--- /dev/null
+++ b/media-video/cheese/cheese-3.38.0-r1.ebuild
@@ -0,0 +1,97 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit gnome.org gnome2-utils meson vala virtualx xdg
+
+DESCRIPTION="A cheesy program to take pictures and videos from your webcam"
+HOMEPAGE="https://wiki.gnome.org/Apps/Cheese"
+
+LICENSE="GPL-2+"
+SLOT="0/8" # subslot = libcheese soname version
+KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="gtk-doc +introspection test"
+RESTRICT="!test? ( test )"
+
+DEPEND="
+ >=media-libs/clutter-1.13.2:1.0[introspection?]
+ media-libs/clutter-gst:3.0
+ >=media-libs/clutter-gtk-0.91.8:1.0
+ x11-libs/gdk-pixbuf:2[jpeg,introspection?]
+ >=dev-libs/glib-2.39.90:2
+ >=gnome-base/gnome-desktop-2.91.6:3=
+ >=media-libs/gstreamer-1.4:1.0[introspection?]
+ >=media-libs/gst-plugins-base-1.4:1.0[ogg,pango,theora,vorbis]
+ >=media-libs/gst-plugins-bad-1.4:1.0
+ >=x11-libs/gtk+-3.13.4:3
+ >=media-libs/libcanberra-0.26[gtk3]
+ x11-libs/libX11
+ sys-apps/dbus
+ media-video/gnome-video-effects
+ introspection? ( >=dev-libs/gobject-introspection-1.56:= )
+
+ media-libs/cogl:1.0=[introspection?]
+
+"
+RDEPEND="${DEPEND}
+ >=media-libs/gst-plugins-good-1.4:1.0
+
+ >=media-plugins/gst-plugins-jpeg-1.4:1.0
+ >=media-plugins/gst-plugins-v4l2-1.4:1.0
+ >=media-plugins/gst-plugins-vpx-1.4:1.0
+"
+
+BDEPEND="
+ gtk-doc? ( dev-util/gtk-doc )
+ dev-libs/libxslt
+ app-text/docbook-xml-dtd:4.3
+ dev-util/itstool
+ dev-libs/appstream-glib
+ dev-libs/libxml2:2
+ dev-util/glib-utils
+ >=sys-devel/gettext-0.19.8
+ virtual/pkgconfig
+ x11-base/xorg-proto
+ test? ( x11-libs/libXtst )
+ $(vala_depend)
+"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-buildfix.patch
+ "${FILESDIR}"/${P}-Fix-infinite-loop-if-thumbnailer-is-not-available.patch
+ "${FILESDIR}"/${P}-vala-genericarray.patch
+)
+
+src_prepare() {
+ xdg_src_prepare
+ vala_src_prepare
+}
+
+src_configure() {
+ local emesonargs=(
+ $(meson_use gtk-doc gtk_doc)
+ $(meson_use introspection)
+ $(meson_use test tests)
+ -Dman=true
+ )
+
+ meson_src_configure
+
+ # Hack: version.xml is not generated if gtk-doc is not enabled
+ echo ${PV} > docs/reference/version.xml
+}
+
+src_test() {
+ virtx meson_src_test
+}
+
+pkg_postinst() {
+ xdg_pkg_postinst
+ gnome2_schemas_update
+}
+
+pkg_postrm() {
+ xdg_pkg_postrm
+ gnome2_schemas_update
+}
diff --git a/media-video/cheese/files/cheese-3.38.0-Fix-infinite-loop-if-thumbnailer-is-not-available.patch b/media-video/cheese/files/cheese-3.38.0-Fix-infinite-loop-if-thumbnailer-is-not-available.patch
new file mode 100644
index 000000000000..5a27eb6e7844
--- /dev/null
+++ b/media-video/cheese/files/cheese-3.38.0-Fix-infinite-loop-if-thumbnailer-is-not-available.patch
@@ -0,0 +1,88 @@
+From e7046d564a6f76c1af8f5640ac9c569e07284ec0 Mon Sep 17 00:00:00 2001
+From: Bastien Nocera <hadess@hadess.net>
+Date: Fri, 18 Sep 2020 12:06:45 +0200
+Subject: [PATCH] Fix infinite loop if thumbnailer is not available
+
+The code in cheese_thumb_view_idle_append_item() in
+src/thumbview/cheese-thumb-view.c didn't pop the list of items to
+thumbnail if thumbnailing failed.
+
+ #0 0x00007f4a60e55314 in open64 () at /lib64/libc.so.6
+ #1 0x00007f4a60de6386 in _IO_file_open () at /lib64/libc.so.6
+ #2 0x00007f4a60de655a in __GI__IO_file_fopen () at /lib64/libc.so.6
+ #3 0x00007f4a60dd9aad in __fopen_internal () at /lib64/libc.so.6
+ #4 0x00007f4a6157a43f in gdk_pixbuf_new_from_file () at /lib64/libgdk_pixbuf-2.0.so.0
+ #5 0x00007f4a61e84b3a in gnome_desktop_thumbnail_factory_lookup () at /lib64/libgnome-desktop-3.so.19
+ #6 0x000055cef476046f in cheese_thumb_view_idle_append_item ()
+ #7 0x00007f4a6124f47b in g_idle_dispatch () at /lib64/libglib-2.0.so.0
+ #8 0x00007f4a612537af in g_main_context_dispatch () at /lib64/libglib-2.0.so.0
+ #9 0x00007f4a61253b38 in g_main_context_iterate.constprop () at /lib64/libglib-2.0.so.0
+ #10 0x00007f4a61253c03 in g_main_context_iteration () at /lib64/libglib-2.0.so.0
+ #11 0x00007f4a6146a7ca in g_application_run () at /lib64/libgio-2.0.so.0
+ #12 0x000055cef4758547 in _vala_main ()
+ #13 0x00007f4a60d8a042 in __libc_start_main () at /lib64/libc.so.6
+ #14 0x000055cef47554be in _start ()
+
+ #0 0x00007f4a60ec562d in __strlen_avx2 () at /lib64/libc.so.6
+ #1 0x00007f4a61275de8 in g_str_has_suffix () at /lib64/libglib-2.0.so.0
+ #2 0x00007f4a618c0072 in icon_name_is_symbolic () at /lib64/libgtk-3.so.0
+ #3 0x00007f4a618c00b1 in theme_dir_get_icon_suffix () at /lib64/libgtk-3.so.0
+ #4 0x00007f4a618c32ed in theme_lookup_icon () at /lib64/libgtk-3.so.0
+ #5 0x00007f4a618c3adf in real_choose_icon () at /lib64/libgtk-3.so.0
+ #6 0x00007f4a618c4762 in gtk_icon_theme_lookup_icon_for_scale () at /lib64/libgtk-3.so.0
+ #7 0x00007f4a618c5105 in gtk_icon_theme_load_icon_for_scale () at /lib64/libgtk-3.so.0
+ #8 0x000055cef47605c9 in cheese_thumb_view_idle_append_item ()
+ #9 0x00007f4a6124f47b in g_idle_dispatch () at /lib64/libglib-2.0.so.0
+ #10 0x00007f4a612537af in g_main_context_dispatch () at /lib64/libglib-2.0.so.0
+ #11 0x00007f4a61253b38 in g_main_context_iterate.constprop () at /lib64/libglib-2.0.so.0
+ #12 0x00007f4a61253c03 in g_main_context_iteration () at /lib64/libglib-2.0.so.0
+ #13 0x00007f4a6146a7d8 in g_application_run () at /lib64/libgio-2.0.so.0
+ #14 0x000055cef4758547 in _vala_main ()
+ #15 0x00007f4a60d8a042 in __libc_start_main () at /lib64/libc.so.6
+ #16 0x000055cef47554be in _start ()
+
+Closes: #81
+---
+ src/thumbview/cheese-thumb-view.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/src/thumbview/cheese-thumb-view.c b/src/thumbview/cheese-thumb-view.c
+index 1d2d88f5..232fd4b6 100644
+--- a/src/thumbview/cheese-thumb-view.c
++++ b/src/thumbview/cheese-thumb-view.c
+@@ -92,7 +92,7 @@ GtkWidget * cheese_thumb_view_new (void);
+ static gboolean
+ cheese_thumb_view_idle_append_item (gpointer data)
+ {
+- CheeseThumbViewIdleData *item = g_queue_peek_head (data);
++ CheeseThumbViewIdleData *item = g_queue_pop_head (data);
+ CheeseThumbView *thumb_view;
+ CheeseThumbViewPrivate *priv;
+
+@@ -119,6 +119,7 @@ cheese_thumb_view_idle_append_item (gpointer data)
+ if (!info)
+ {
+ g_warning ("Invalid filename\n");
++ g_slice_free (CheeseThumbViewIdleData, item);
+ return TRUE;
+ }
+ g_file_info_get_modification_time (info, &mtime);
+@@ -167,6 +168,7 @@ cheese_thumb_view_idle_append_item (gpointer data)
+ if (error)
+ {
+ g_warning ("%s", error->message);
++ g_slice_free (CheeseThumbViewIdleData, item);
+ return TRUE;
+ }
+ }
+@@ -183,7 +185,6 @@ cheese_thumb_view_idle_append_item (gpointer data)
+ g_object_unref (pixbuf);
+ g_object_unref (file);
+ g_slice_free (CheeseThumbViewIdleData, item);
+- g_queue_pop_head (data);
+
+ return TRUE;
+ }
+--
+2.28.0
+
diff --git a/media-video/cheese/files/cheese-3.38.0-vala-genericarray.patch b/media-video/cheese/files/cheese-3.38.0-vala-genericarray.patch
new file mode 100644
index 000000000000..dcbd1c1b2c5c
--- /dev/null
+++ b/media-video/cheese/files/cheese-3.38.0-vala-genericarray.patch
@@ -0,0 +1,177 @@
+From 7cf6268e54620bbbe5e6e61800c50fb0cb4bea57 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Corentin=20No=C3=ABl?= <corentin@elementary.io>
+Date: Fri, 16 Oct 2020 19:56:26 +0200
+Subject: [PATCH] Change GLib.PtrArray into GLib.GenericArray
+
+This is the vala-friendly way of handling GPtrArray.
+Fix several memory leaks on the go and unnecessary reference increase.
+---
+ src/cheese-preferences.vala | 26 ++++++++++++--------------
+ src/cheese-window.vala | 22 +++++++++++-----------
+ src/vapi/cheese-common.vapi | 2 +-
+ 3 files changed, 24 insertions(+), 26 deletions(-)
+
+diff --git a/src/cheese-preferences.vala b/src/cheese-preferences.vala
+index f56af7e0..80a92431 100644
+--- a/src/cheese-preferences.vala
++++ b/src/cheese-preferences.vala
+@@ -100,7 +100,7 @@ public PreferencesDialog (Cheese.Camera camera)
+ */
+ private void initialize_camera_devices ()
+ {
+- unowned GLib.PtrArray devices = camera.get_camera_devices ();
++ GLib.GenericArray<unowned Cheese.CameraDevice> devices = camera.get_camera_devices ();
+ camera_model = new Gtk.ListStore (2, typeof (string), typeof (Cheese.CameraDevice));
+
+ source_combo.model = camera_model;
+@@ -357,13 +357,13 @@ public PreferencesDialog (Cheese.Camera camera)
+ */
+ private void on_camera_update_num_camera_devices ()
+ {
+- unowned GLib.PtrArray devices = camera.get_camera_devices ();
+- Cheese.CameraDevice dev;
++ GLib.GenericArray<unowned Cheese.CameraDevice> devices = camera.get_camera_devices ();
++ unowned Cheese.CameraDevice dev;
+
+ // Add (if) / Remove (else) a camera device.
+- if (devices.len > camera_model.iter_n_children (null))
++ if (devices.length > camera_model.iter_n_children (null))
+ {
+- dev = (Cheese.CameraDevice) devices.index (devices.len - 1);
++ dev = devices.get (devices.length - 1);
+ add_camera_device(dev);
+ }
+ else
+@@ -382,12 +382,11 @@ public PreferencesDialog (Cheese.Camera camera)
+ bool device_removed = false;
+ devices.foreach ((device) =>
+ {
+- var old_device = (Cheese.CameraDevice) device;
+ Cheese.CameraDevice new_device;
+ camera_model.get (iter, 1, out new_device, -1);
+
+ // Found the device that was removed.
+- if (old_device != new_device)
++ if (device != new_device)
+ {
+ remove_camera_device (iter, new_device, active_device);
+ device_removed = true;
+@@ -418,17 +417,16 @@ public PreferencesDialog (Cheese.Camera camera)
+ *
+ * @param device a Cheese.CameraDevice to add to the device combo box model
+ */
+- private void add_camera_device (void *device)
++ private void add_camera_device (Cheese.CameraDevice device)
+ {
+ TreeIter iter;
+- Cheese.CameraDevice dev = (Cheese.CameraDevice) device;
+
+ camera_model.append (out iter);
+ camera_model.set (iter,
+- 0, dev.get_name (),
+- 1, dev);
++ 0, device.get_name (),
++ 1, device);
+
+- if (camera.get_selected_device () == dev)
++ if (camera.get_selected_device () == device)
+ source_combo.set_active_iter (iter);
+
+ if (camera_model.iter_n_children (null) > 1)
+@@ -445,12 +443,12 @@ public PreferencesDialog (Cheese.Camera camera)
+ private void remove_camera_device (TreeIter iter, Cheese.CameraDevice device_node,
+ Cheese.CameraDevice active_device_node)
+ {
+- unowned GLib.PtrArray devices = camera.get_camera_devices ();
++ GLib.GenericArray<unowned Cheese.CameraDevice> devices = camera.get_camera_devices ();
+
+ // Check if the camera that we want to remove, is the active one
+ if (device_node == active_device_node)
+ {
+- if (devices.len > 0)
++ if (devices.length > 0)
+ set_new_available_camera_device (iter);
+ else
+ this.hide ();
+diff --git a/src/cheese-window.vala b/src/cheese-window.vala
+index ff069808..cc119b68 100644
+--- a/src/cheese-window.vala
++++ b/src/cheese-window.vala
+@@ -1216,9 +1216,9 @@ public class Cheese.MainWindow : Gtk.ApplicationWindow
+ */
+ public void on_switch_camera_clicked ()
+ {
+- Cheese.CameraDevice selected;
+- Cheese.CameraDevice next = null;
+- GLib.PtrArray cameras;
++ unowned Cheese.CameraDevice selected;
++ unowned Cheese.CameraDevice next = null;
++ GLib.GenericArray<unowned Cheese.CameraDevice> cameras;
+ uint i;
+
+ if (camera == null)
+@@ -1235,9 +1235,9 @@ public class Cheese.MainWindow : Gtk.ApplicationWindow
+
+ cameras = camera.get_camera_devices ();
+
+- for (i = 0; i < cameras.len; i++)
++ for (i = 0; i < cameras.length; i++)
+ {
+- next = (Cheese.CameraDevice )cameras.index (i);
++ next = cameras.get (i);
+
+ if (next == selected)
+ {
+@@ -1245,13 +1245,13 @@ public class Cheese.MainWindow : Gtk.ApplicationWindow
+ }
+ }
+
+- if (i + 1 < cameras.len)
++ if (i + 1 < cameras.length)
+ {
+- next = (Cheese.CameraDevice )cameras.index (i + 1);
++ next = cameras.get (i + 1);
+ }
+ else
+ {
+- next = (Cheese.CameraDevice )cameras.index (0);
++ next = cameras.get (0);
+ }
+
+ if (next == selected)
+@@ -1269,8 +1269,8 @@ public class Cheese.MainWindow : Gtk.ApplicationWindow
+ */
+ public void set_switch_camera_button_state ()
+ {
+- Cheese.CameraDevice selected;
+- GLib.PtrArray cameras;
++ unowned Cheese.CameraDevice selected;
++ GLib.GenericArray<unowned Cheese.CameraDevice> cameras;
+
+ if (camera == null)
+ {
+@@ -1288,7 +1288,7 @@ public class Cheese.MainWindow : Gtk.ApplicationWindow
+
+ cameras = camera.get_camera_devices ();
+
+- if (cameras.len > 1)
++ if (cameras.length > 1)
+ {
+ switch_camera_button.set_visible (true);
+ return;
+diff --git a/src/vapi/cheese-common.vapi b/src/vapi/cheese-common.vapi
+index 6517cdfc..e4ae7ad3 100644
+--- a/src/vapi/cheese-common.vapi
++++ b/src/vapi/cheese-common.vapi
+@@ -35,7 +35,7 @@ namespace Cheese
+ [CCode (has_construct_function = false)]
+ public Camera (Clutter.Actor video_texture, string camera_device_node, int x_resolution, int y_resolution);
+ public bool get_balance_property_range (string property, double min, double max, double def);
+- public unowned GLib.PtrArray get_camera_devices ();
++ public GLib.GenericArray<unowned Cheese.CameraDevice> get_camera_devices ();
+ public unowned Cheese.VideoFormat get_current_video_format ();
+ public int get_num_camera_devices ();
+ public unowned Cheese.CameraDevice get_selected_device ();
+--
+GitLab
+