diff options
author | jmmv <jmmv> | 2006-09-18 16:38:44 +0000 |
---|---|---|
committer | jmmv <jmmv> | 2006-09-18 16:38:44 +0000 |
commit | bb9fc00fe8c9b90f19def9d3f97745f7a6daa5d5 (patch) | |
tree | 71578aeb198a666bc9c2db33ffc4936dcc42da10 | |
parent | e3fbf3bfbdadfb505a9e565891c61054011fb23d (diff) | |
download | pkgsrc-bb9fc00fe8c9b90f19def9d3f97745f7a6daa5d5.tar.gz |
Fix the gnome-screenshot application under NetBSD and close PR pkg/31936.
Bump PKGREVISION to 2.
NetBSD's poll(2) raises a POLLIN event when a file descriptor is closed;
Linux doesn't seem to do this. This caused an unexpected G_IO_IN event
in gnome-screenshot's code that was used to detect errors, instead of the
G_IO_HUP it was expecting.
-rw-r--r-- | misc/gnome2-utils/Makefile | 4 | ||||
-rw-r--r-- | misc/gnome2-utils/distinfo | 4 | ||||
-rw-r--r-- | misc/gnome2-utils/patches/patch-ac | 41 |
3 files changed, 42 insertions, 7 deletions
diff --git a/misc/gnome2-utils/Makefile b/misc/gnome2-utils/Makefile index 99564ed257c..2c4349ce075 100644 --- a/misc/gnome2-utils/Makefile +++ b/misc/gnome2-utils/Makefile @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.60 2006/09/16 12:20:39 jmmv Exp $ +# $NetBSD: Makefile,v 1.61 2006/09/18 16:38:44 jmmv Exp $ # DISTNAME= gnome-utils-2.16.0 -PKGREVISION= 1 +PKGREVISION= 2 CATEGORIES= misc gnome MASTER_SITES= ${MASTER_SITE_GNOME:=sources/gnome-utils/2.16/} EXTRACT_SUFX= .tar.bz2 diff --git a/misc/gnome2-utils/distinfo b/misc/gnome2-utils/distinfo index 590e647204a..dd67d83d882 100644 --- a/misc/gnome2-utils/distinfo +++ b/misc/gnome2-utils/distinfo @@ -1,7 +1,7 @@ -$NetBSD: distinfo,v 1.17 2006/09/15 15:23:27 jmmv Exp $ +$NetBSD: distinfo,v 1.18 2006/09/18 16:38:45 jmmv Exp $ SHA1 (gnome-utils-2.16.0.tar.bz2) = 32af23b4f5948ab94c2d0e1cf7e657ab2bd92874 RMD160 (gnome-utils-2.16.0.tar.bz2) = 9b166182a0f1ed5baf6caa1b6ab66643c5ecdca3 Size (gnome-utils-2.16.0.tar.bz2) = 3144914 bytes SHA1 (patch-aa) = 0ae23e6027b164a2e8a42eafeadcede0b9034ede -SHA1 (patch-ac) = 331b43a0f5d79555f79d448c6ea2a36ce6783ea5 +SHA1 (patch-ac) = 29075057d795d7604980471ce1c88411f1c9bec3 diff --git a/misc/gnome2-utils/patches/patch-ac b/misc/gnome2-utils/patches/patch-ac index fee94b785f3..f4efab91e2a 100644 --- a/misc/gnome2-utils/patches/patch-ac +++ b/misc/gnome2-utils/patches/patch-ac @@ -1,8 +1,8 @@ -$NetBSD: patch-ac,v 1.3 2006/01/20 03:16:14 joerg Exp $ +$NetBSD: patch-ac,v 1.4 2006/09/18 16:38:45 jmmv Exp $ ---- gnome-screenshot/screenshot-save.c.orig 2006-01-20 02:52:06.000000000 +0000 +--- gnome-screenshot/screenshot-save.c.orig 2006-06-11 13:19:30.000000000 +0200 +++ gnome-screenshot/screenshot-save.c -@@ -12,8 +12,6 @@ static char *tmp_filename = NULL; +@@ -14,8 +14,6 @@ static char *tmp_filename = NULL; static SaveFunction save_callback = NULL; static gpointer save_user_data = NULL; @@ -11,3 +11,38 @@ $NetBSD: patch-ac,v 1.3 2006/01/20 03:16:14 joerg Exp $ /* Strategy for saving: +@@ -98,6 +96,7 @@ read_pipe_from_child (GIOChannel *sour + GtkWidget *dialog; + + g_io_channel_read_line (source, &error_message, NULL, NULL, NULL); ++ if (error_message != NULL && strcmp (error_message, "OK") != 0) { + message = g_strdup_printf ("Unable to save the screenshot to disk:\n\n%s", error_message); + dialog = gtk_message_dialog_new (NULL, 0, + GTK_MESSAGE_ERROR, +@@ -106,6 +105,7 @@ read_pipe_from_child (GIOChannel *sour + gtk_dialog_run (GTK_DIALOG (dialog)); + gtk_widget_destroy (dialog); + exit (1); ++ } + } + + (*save_callback) (save_user_data); +@@ -194,8 +194,7 @@ screenshot_save_start (GdkPixbuf *pix + ERROR_MESSAGE, + strlen (ERROR_MESSAGE)); + } +- /* By closing the pipe, we let the main process know that we're +- * done saving it. */ ++ write (pipe_from_child[1], "OK", strlen ("OK")); + close (pipe_from_child[1]); + read (parent_exit_notification[0], &c, 1); + +@@ -211,7 +210,7 @@ screenshot_save_start (GdkPixbuf *pix + + channel = g_io_channel_unix_new (pipe_from_child[0]); + g_io_add_watch (channel, +- G_IO_IN | G_IO_ERR | G_IO_HUP | G_IO_NVAL, ++ G_IO_IN | G_IO_ERR | G_IO_NVAL, + read_pipe_from_child, + NULL); + g_io_channel_unref (channel); |