summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO17
-rw-r--r--3e2e3de.patch128
-rw-r--r--PKGBUILD25
3 files changed, 150 insertions, 20 deletions
diff --git a/.SRCINFO b/.SRCINFO
index a83adab836b4..d96269d69a17 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,17 +1,18 @@
pkgbase = camorama
- pkgdesc = GNOME 2 Webcam application featuring various image filters
- pkgver = 0.20.7.r51.gcde678b
+ pkgdesc = GNOME 3 Webcam application featuring various image filters
+ pkgver = 0.21.2
pkgrel = 1
- url = https://github.com/mchehab/camorama
+ url = https://github.com/alessio/camorama
arch = x86_64
license = GPL2
- makedepends = git
makedepends = gnome-common
- makedepends = v4l-utils
- depends = libgnomeui
+ depends = gtk3
+ depends = v4l-utils
provides = camorama
conflicts = camorama-git
- source = git+https://github.com/mchehab/camorama.git
- sha256sums = SKIP
+ source = https://github.com/alessio/camorama/archive/refs/tags/0.21.2.tar.gz
+ source = 3e2e3de.patch
+ sha256sums = 434ea95081b90f88f8dd6d67d6d9d4a517d55d83da9f04870bb27633511c5d39
+ sha256sums = 9d9ab85eee0f18ea2f696dc8ac072483de84a2b44845d2d01a8f05eb280ea14e
pkgname = camorama
diff --git a/3e2e3de.patch b/3e2e3de.patch
new file mode 100644
index 000000000000..c25a2d6581be
--- /dev/null
+++ b/3e2e3de.patch
@@ -0,0 +1,128 @@
+diff --git a/src/callbacks.c b/src/callbacks.c
+index 3cd5222..a7a6b52 100644
+--- a/src/callbacks.c
++++ b/src/callbacks.c
+@@ -870,7 +870,9 @@ static void reset_ctrls(GtkButton *btn, cam_t *cam)
+
+ static void close_controls(GtkWidget* widget, cam_t *cam)
+ {
++ g_mutex_lock(&cam->control_win_mutex);
+ cam->controls_window = NULL;
++ g_mutex_unlock(&cam->control_win_mutex);
+ }
+
+ void show_controls(GtkWidget *widget, cam_t *cam)
+@@ -982,7 +984,9 @@ void show_controls(GtkWidget *widget, cam_t *cam)
+ g_signal_connect(G_OBJECT(window), "destroy",
+ G_CALLBACK (close_controls), cam);
+
++ g_mutex_lock(&cam->control_win_mutex);
+ cam->controls_window = window;
++ g_mutex_unlock(&cam->control_win_mutex);
+
+ gtk_widget_show_all(window);
+ }
+@@ -1150,8 +1154,10 @@ void contrast_change(GtkScale *sc1, cam_t *cam)
+ cam->contrast = gtk_range_get_value((GtkRange *) sc1);
+ cam_set_control(cam, V4L2_CID_CONTRAST, &cam->contrast);
+
++ g_mutex_lock(&cam->control_win_mutex);
+ if (cam->controls_window)
+ gtk_container_forall(GTK_CONTAINER(cam->controls_window), send_update_signal, 0);
++ g_mutex_unlock(&cam->control_win_mutex);
+ }
+
+ void brightness_change(GtkScale *sc1, cam_t *cam)
+@@ -1160,8 +1166,10 @@ void brightness_change(GtkScale *sc1, cam_t *cam)
+ cam->brightness = gtk_range_get_value((GtkRange *) sc1);
+ cam_set_control(cam, V4L2_CID_BRIGHTNESS, &cam->brightness);
+
++ g_mutex_lock(&cam->control_win_mutex);
+ if (cam->controls_window)
+ gtk_container_forall(GTK_CONTAINER(cam->controls_window), send_update_signal, 0);
++ g_mutex_unlock(&cam->control_win_mutex);
+ }
+
+ void zoom_change(GtkScale *sc1, cam_t *cam)
+@@ -1180,8 +1188,10 @@ void colour_change(GtkScale *sc1, cam_t *cam)
+ cam->colour = gtk_range_get_value((GtkRange *) sc1);
+ cam_set_control(cam, V4L2_CID_SATURATION, &cam->colour);
+
++ g_mutex_lock(&cam->control_win_mutex);
+ if (cam->controls_window)
+ gtk_container_forall(GTK_CONTAINER(cam->controls_window), send_update_signal, 0);
++ g_mutex_unlock(&cam->control_win_mutex);
+ }
+
+ void hue_change(GtkScale *sc1, cam_t *cam)
+@@ -1190,8 +1200,10 @@ void hue_change(GtkScale *sc1, cam_t *cam)
+ cam->hue = gtk_range_get_value((GtkRange *) sc1);
+ cam_set_control(cam, V4L2_CID_HUE, &cam->hue);
+
++ g_mutex_lock(&cam->control_win_mutex);
+ if (cam->controls_window)
+ gtk_container_forall(GTK_CONTAINER(cam->controls_window), send_update_signal, 0);
++ g_mutex_unlock(&cam->control_win_mutex);
+ }
+
+ void wb_change(GtkScale *sc1, cam_t *cam)
+@@ -1200,8 +1212,10 @@ void wb_change(GtkScale *sc1, cam_t *cam)
+ cam->whiteness = gtk_range_get_value((GtkRange *) sc1);
+ cam_set_control(cam, V4L2_CID_WHITENESS, &cam->whiteness);
+
++ g_mutex_lock(&cam->control_win_mutex);
+ if (cam->controls_window)
+ gtk_container_forall(GTK_CONTAINER(cam->controls_window), send_update_signal, 0);
++ g_mutex_unlock(&cam->control_win_mutex);
+ }
+
+ /*
+@@ -1409,6 +1423,7 @@ int select_video_dev(cam_t *cam)
+
+ void on_change_camera(GtkWidget *widget, cam_t *cam)
+ {
++ GtkWidget *window;
+ gchar *old_cam;
+
+ old_cam = g_strdup(cam->video_dev);
+@@ -1421,6 +1436,16 @@ void on_change_camera(GtkWidget *widget, cam_t *cam)
+ }
+ g_free(old_cam);
+
++ g_mutex_lock(&cam->control_win_mutex);
++ if (cam->controls_window) {
++ window = cam->controls_window;
++ cam->controls_window = NULL;
++ g_mutex_unlock(&cam->control_win_mutex);
++ gtk_window_close(GTK_WINDOW(window));
++ } else {
++ g_mutex_unlock(&cam->control_win_mutex);
++ }
++
+ start_camera(cam);
+ update_sliders(cam);
+ }
+diff --git a/src/main.c b/src/main.c
+index 2f18136..d8ef8b8 100644
+--- a/src/main.c
++++ b/src/main.c
+@@ -107,6 +107,7 @@ static void activate(GtkApplication *app)
+ cam->app = app;
+ g_mutex_init(&cam->remote_save_mutex);
+ g_mutex_init(&cam->pixbuf_mutex);
++ g_mutex_init(&cam->control_win_mutex);
+
+ /* gtk is initialized now */
+ camorama_filters_init();
+diff --git a/src/v4l.h b/src/v4l.h
+index d432e15..cc69875 100644
+--- a/src/v4l.h
++++ b/src/v4l.h
+@@ -103,6 +103,7 @@ typedef struct camera {
+
+ GMutex remote_save_mutex; /* Protects n_threads */
+ GMutex pixbuf_mutex; /* Protects pic_buf */
++ GMutex control_win_mutex; /* Protects controls_window */
+
+ unsigned int min_width, min_height, max_width, max_height;
+ struct colorspace_parms colorspc;
diff --git a/PKGBUILD b/PKGBUILD
index f6c814cc7c35..80545251e268 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,31 +4,32 @@
# Contributor: Federico Quagliata (quaqo) <quaqo@despammed.com>
pkgname=camorama
-pkgver=0.20.7.r51.gcde678b
+pkgver=0.21.2
pkgrel=1
-pkgdesc="GNOME 2 Webcam application featuring various image filters"
-url="https://github.com/mchehab/camorama"
+pkgdesc="GNOME 3 Webcam application featuring various image filters"
+url="https://github.com/alessio/camorama"
arch=('x86_64')
license=('GPL2')
-depends=('libgnomeui')
-makedepends=('git' 'gnome-common' 'v4l-utils')
+depends=('gtk3' 'v4l-utils')
+makedepends=('gnome-common')
provides=("${pkgname}")
conflicts=("${pkgname}-git")
-source=("git+${url}.git")
-sha256sums=('SKIP')
+source=("${url}/archive/refs/tags/0.21.2.tar.gz" '3e2e3de.patch')
+sha256sums=('434ea95081b90f88f8dd6d67d6d9d4a517d55d83da9f04870bb27633511c5d39'
+ '9d9ab85eee0f18ea2f696dc8ac072483de84a2b44845d2d01a8f05eb280ea14e')
-pkgver() {
- cd "${srcdir}/${pkgname}"
- git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
+prepare() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ patch -p1 <../3e2e3de.patch
}
build() {
- cd "${srcdir}/${pkgname}"
+ cd "${srcdir}/${pkgname}-${pkgver}"
./autogen.sh --prefix=/usr
make
}
package() {
- cd "${srcdir}/${pkgname}"
+ cd "${srcdir}/${pkgname}-${pkgver}"
DESTDIR="${pkgdir}" make install
}