summaryrefslogtreecommitdiff
path: root/x11/gnome-screensaver
diff options
context:
space:
mode:
authorwiz <wiz@pkgsrc.org>2009-11-18 08:12:12 +0000
committerwiz <wiz@pkgsrc.org>2009-11-18 08:12:12 +0000
commite3e214030a7bea7f65e760a5efdad87abef27f61 (patch)
treeef47959e8dccc8b8a7bb2c407cfab2bacc77a565 /x11/gnome-screensaver
parent2d77b4a8a41fa957920f614369adcb7fd9e618fa (diff)
downloadpkgsrc-e3e214030a7bea7f65e760a5efdad87abef27f61.tar.gz
Fix crash using Ubuntu patch.
Description: https://bugs.launchpad.net/ubuntu/+source/gnome-screensaver/+bug/446395 Solution: http://patches.ubuntu.com/g/gnome-screensaver/extracted/08_gs_dialog_request_to_exit.patch Reported by David H. Gutteridge in PR 42338.
Diffstat (limited to 'x11/gnome-screensaver')
-rw-r--r--x11/gnome-screensaver/Makefile4
-rw-r--r--x11/gnome-screensaver/distinfo10
-rw-r--r--x11/gnome-screensaver/patches/patch-ac50
-rw-r--r--x11/gnome-screensaver/patches/patch-ad73
4 files changed, 132 insertions, 5 deletions
diff --git a/x11/gnome-screensaver/Makefile b/x11/gnome-screensaver/Makefile
index 182cf7d60c5..b0dd214d2cb 100644
--- a/x11/gnome-screensaver/Makefile
+++ b/x11/gnome-screensaver/Makefile
@@ -1,9 +1,11 @@
-# $NetBSD: Makefile,v 1.38 2009/11/17 17:54:25 wiz Exp $
+# $NetBSD: Makefile,v 1.39 2009/11/18 08:12:12 wiz Exp $
#
DISTNAME= gnome-screensaver-2.28.0
+PKGREVISION= 1
CATEGORIES= x11 gnome
MASTER_SITES= ${MASTER_SITE_GNOME:=sources/gnome-screensaver/2.28/}
+EXTRACT_SUFX= .tar.bz2
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://live.gnome.org/GnomeScreensaver/
diff --git a/x11/gnome-screensaver/distinfo b/x11/gnome-screensaver/distinfo
index 5bef81f8827..a5a172089d2 100644
--- a/x11/gnome-screensaver/distinfo
+++ b/x11/gnome-screensaver/distinfo
@@ -1,7 +1,9 @@
-$NetBSD: distinfo,v 1.18 2009/11/17 17:54:25 wiz Exp $
+$NetBSD: distinfo,v 1.19 2009/11/18 08:12:12 wiz Exp $
-SHA1 (gnome-screensaver-2.28.0.tar.gz) = 806dc40a28e3380ab94426495b9d626f073c83cb
-RMD160 (gnome-screensaver-2.28.0.tar.gz) = 01a6e3eb38e1dd1e75c71e95b2e420c5022fdfac
-Size (gnome-screensaver-2.28.0.tar.gz) = 5069053 bytes
+SHA1 (gnome-screensaver-2.28.0.tar.bz2) = 7981b09f75076ebb8cd55032696f12ed06b224ca
+RMD160 (gnome-screensaver-2.28.0.tar.bz2) = 3e29efc67cafd66c6aac7c2b4d17b0c2d42b4edb
+Size (gnome-screensaver-2.28.0.tar.bz2) = 4779450 bytes
SHA1 (patch-aa) = 20f25a4efc3c134366280afbfb8aeb49db791208
SHA1 (patch-ab) = 5b5f9d69fd071bfd6f9b316626e23585841dad9d
+SHA1 (patch-ac) = 6e7dbae1d0693bf3f20a5e44d2d35c68dbe3ba3f
+SHA1 (patch-ad) = a2b001d143ca7d440c7f22a3f142c8d12e9b17cc
diff --git a/x11/gnome-screensaver/patches/patch-ac b/x11/gnome-screensaver/patches/patch-ac
new file mode 100644
index 00000000000..b0130b60f20
--- /dev/null
+++ b/x11/gnome-screensaver/patches/patch-ac
@@ -0,0 +1,50 @@
+$NetBSD: patch-ac,v 1.7 2009/11/18 08:12:12 wiz Exp $
+
+https://bugs.launchpad.net/ubuntu/+source/gnome-screensaver/+bug/446395
+http://patches.ubuntu.com/g/gnome-screensaver/extracted/08_gs_dialog_request_to_exit.patch
+
+--- src/gnome-screensaver-dialog.c.orig 2009-08-26 16:06:12.000000000 +0000
++++ src/gnome-screensaver-dialog.c
+@@ -29,6 +29,7 @@
+ #include <sys/types.h>
+ #include <sys/wait.h>
+ #include <unistd.h>
++#include <signal.h>
+
+ #include <glib/gi18n.h>
+ #include <gdk/gdkx.h>
+@@ -326,6 +327,21 @@ response_cb (GSLockPlug *plug,
+ }
+
+ static gboolean
++response_request_quit (void)
++{
++ printf ("REQUEST QUIT\n");
++ fflush (stdout);
++ return FALSE;
++}
++
++static gboolean
++quit_timeout_cb (gpointer data)
++{
++ gtk_main_quit ();
++ return FALSE;
++}
++
++static gboolean
+ auth_check_idle (GSLockPlug *plug)
+ {
+ gboolean res;
+@@ -347,7 +363,11 @@ auth_check_idle (GSLockPlug *plug)
+ } else {
+ gs_debug ("Authentication failed, quitting (max failures)");
+ again = FALSE;
+- gtk_main_quit ();
++ /* Don't quit immediately, but rather request that gnome-screensaver
++ * terminates us after it has finished the dialog shake. Time out
++ * after 5 seconds and quit anyway if this doesn't happen though */
++ g_idle_add ((GSourceFunc)response_request_quit, NULL);
++ g_timeout_add (5000, (GSourceFunc)quit_timeout_cb, NULL);
+ }
+ }
+
diff --git a/x11/gnome-screensaver/patches/patch-ad b/x11/gnome-screensaver/patches/patch-ad
new file mode 100644
index 00000000000..c686d459cf6
--- /dev/null
+++ b/x11/gnome-screensaver/patches/patch-ad
@@ -0,0 +1,73 @@
+$NetBSD: patch-ad,v 1.1 2009/11/18 08:12:12 wiz Exp $
+
+https://bugs.launchpad.net/ubuntu/+source/gnome-screensaver/+bug/446395
+http://patches.ubuntu.com/g/gnome-screensaver/extracted/08_gs_dialog_request_to_exit.patch
+
+--- src/gs-window-x11.c.orig 2009-08-19 23:19:14.000000000 +0000
++++ src/gs-window-x11.c
+@@ -91,6 +91,8 @@ struct GSWindowPrivate
+ gint lock_pid;
+ gint lock_watch_id;
+ gint dialog_response;
++ gboolean dialog_quit_requested;
++ gboolean dialog_shake_in_progress;
+
+ gint keyboard_pid;
+ gint keyboard_watch_id;
+@@ -1383,6 +1385,16 @@ gs_window_dialog_finish (GSWindow *windo
+ remove_key_events (window);
+ }
+
++static void
++maybe_kill_dialog (GSWindow *window)
++{
++ if (!window->priv->dialog_shake_in_progress
++ && window->priv->dialog_quit_requested
++ && window->priv->lock_pid > 0) {
++ kill (window->priv->lock_pid, SIGTERM);
++ }
++}
++
+ /* very rudimentary animation for indicating an auth failure */
+ static void
+ shake_dialog (GSWindow *window)
+@@ -1391,6 +1403,8 @@ shake_dialog (GSWindow *window)
+ guint left;
+ guint right;
+
++ window->priv->dialog_shake_in_progress = TRUE;
++
+ for (i = 0; i < 9; i++) {
+ if (i % 2 == 0) {
+ left = 30;
+@@ -1415,6 +1429,9 @@ shake_dialog (GSWindow *window)
+
+ g_usleep (10000);
+ }
++
++ window->priv->dialog_shake_in_progress = FALSE;
++ maybe_kill_dialog (window);
+ }
+
+ static gboolean
+@@ -1457,6 +1474,10 @@ lock_command_watch (GIOChannel *source
+ window->priv->dialog_response = DIALOG_RESPONSE_CANCEL;
+ }
+ finished = TRUE;
++ } else if (strstr (line, "REQUEST QUIT") != NULL) {
++ gs_debug ("Got request for quit");
++ window->priv->dialog_quit_requested = TRUE;
++ maybe_kill_dialog (window);
+ }
+ break;
+ case G_IO_STATUS_EOF:
+@@ -1570,6 +1591,9 @@ popup_dialog_idle (GSWindow *window)
+
+ set_invisible_cursor (GTK_WIDGET (window)->window, FALSE);
+
++ window->priv->dialog_quit_requested = FALSE;
++ window->priv->dialog_shake_in_progress = FALSE;
++
+ result = spawn_on_window (window,
+ command->str,
+ &window->priv->lock_pid,