Wed Feb 1 18:23:05 2012 UTC ()
replace the patch for the printing problem by the official upstream one,
bump PKGREV


(drochner)
diff -r1.225 -r1.226 pkgsrc/x11/gtk2/Makefile
diff -r1.140 -r1.141 pkgsrc/x11/gtk2/distinfo
diff -r1.5 -r1.6 pkgsrc/x11/gtk2/patches/patch-ak

cvs diff -r1.225 -r1.226 pkgsrc/x11/gtk2/Makefile (expand / switch to unified diff)

--- pkgsrc/x11/gtk2/Makefile 2012/01/29 10:56:44 1.225
+++ pkgsrc/x11/gtk2/Makefile 2012/02/01 18:23:04 1.226
@@ -1,17 +1,18 @@ @@ -1,17 +1,18 @@
1# $NetBSD: Makefile,v 1.225 2012/01/29 10:56:44 drochner Exp $ 1# $NetBSD: Makefile,v 1.226 2012/02/01 18:23:04 drochner Exp $
2 2
3DISTNAME= gtk+-2.24.9 3DISTNAME= gtk+-2.24.9
4PKGNAME= ${DISTNAME:S/gtk/gtk2/} 4PKGNAME= ${DISTNAME:S/gtk/gtk2/}
 5PKGREVISION= 1
5CATEGORIES= x11 6CATEGORIES= x11
6MASTER_SITES= ftp://ftp.gtk.org/pub/gtk/2.24/ \ 7MASTER_SITES= ftp://ftp.gtk.org/pub/gtk/2.24/ \
7 ${MASTER_SITE_GNOME:=sources/gtk+/2.24/} 8 ${MASTER_SITE_GNOME:=sources/gtk+/2.24/}
8EXTRACT_SUFX= .tar.xz 9EXTRACT_SUFX= .tar.xz
9 10
10MAINTAINER= pkgsrc-users@NetBSD.org 11MAINTAINER= pkgsrc-users@NetBSD.org
11HOMEPAGE= http://www.gtk.org/ 12HOMEPAGE= http://www.gtk.org/
12COMMENT= GIMP Toolkit v2 - libraries for building X11 user interfaces 13COMMENT= GIMP Toolkit v2 - libraries for building X11 user interfaces
13LICENSE= gnu-lgpl-v2.1 14LICENSE= gnu-lgpl-v2.1
14 15
15# gtk-builder-convert uses minidom from xml.dom, which needs expat 16# gtk-builder-convert uses minidom from xml.dom, which needs expat
16DEPENDS+= ${PYPKGPREFIX}-expat-[0-9]*:../../textproc/py-expat 17DEPENDS+= ${PYPKGPREFIX}-expat-[0-9]*:../../textproc/py-expat
17 18

cvs diff -r1.140 -r1.141 pkgsrc/x11/gtk2/distinfo (expand / switch to unified diff)

--- pkgsrc/x11/gtk2/distinfo 2012/01/29 10:56:44 1.140
+++ pkgsrc/x11/gtk2/distinfo 2012/02/01 18:23:04 1.141
@@ -1,10 +1,10 @@ @@ -1,10 +1,10 @@
1$NetBSD: distinfo,v 1.140 2012/01/29 10:56:44 drochner Exp $ 1$NetBSD: distinfo,v 1.141 2012/02/01 18:23:04 drochner Exp $
2 2
3SHA1 (gtk+-2.24.9.tar.xz) = 7760411a8ee50a1e01e4480e074f9f221f0884db 3SHA1 (gtk+-2.24.9.tar.xz) = 7760411a8ee50a1e01e4480e074f9f221f0884db
4RMD160 (gtk+-2.24.9.tar.xz) = 4e51be9955a9f3d359fcaca9cc30c12477789d28 4RMD160 (gtk+-2.24.9.tar.xz) = 4e51be9955a9f3d359fcaca9cc30c12477789d28
5Size (gtk+-2.24.9.tar.xz) = 13200580 bytes 5Size (gtk+-2.24.9.tar.xz) = 13200580 bytes
6SHA1 (patch-aa) = 9eec7fc4764b18856455a18b49f1bb101e5e6b11 6SHA1 (patch-aa) = 9eec7fc4764b18856455a18b49f1bb101e5e6b11
7SHA1 (patch-ab) = 9c82cc60f3825d377a197c876fcc6faa379cbde3 7SHA1 (patch-ab) = 9c82cc60f3825d377a197c876fcc6faa379cbde3
8SHA1 (patch-af) = d59414e24a7da7f8694dbefbd2f0c2c2b60ec5ad 8SHA1 (patch-af) = d59414e24a7da7f8694dbefbd2f0c2c2b60ec5ad
9SHA1 (patch-aj) = 9887573ac7ade9e8f8ee2ead68e279f67836a1a3 9SHA1 (patch-aj) = 9887573ac7ade9e8f8ee2ead68e279f67836a1a3
10SHA1 (patch-ak) = 4f9badd2b5607c94c8ccb5c22d60a87105cc1ae3 10SHA1 (patch-ak) = 90c49bf6b7bf79bb8ad270c2661876ea7b0cb5ad

cvs diff -r1.5 -r1.6 pkgsrc/x11/gtk2/patches/Attic/patch-ak (expand / switch to unified diff)

--- pkgsrc/x11/gtk2/patches/Attic/patch-ak 2012/01/29 10:56:44 1.5
+++ pkgsrc/x11/gtk2/patches/Attic/patch-ak 2012/02/01 18:23:05 1.6
@@ -1,97 +1,126 @@ @@ -1,97 +1,126 @@
1$NetBSD: patch-ak,v 1.5 2012/01/29 10:56:44 drochner Exp $ 1$NetBSD: patch-ak,v 1.6 2012/02/01 18:23:05 drochner Exp $
2 2
3revert upstream commit 8170436e61ea68c713d75ad374d22c3261be9203, 3gnome bug #543520
4it causes firefox crashes (see gnome bug #543520) 
5 4
6--- modules/printbackends/cups/gtkprintbackendcups.c.orig 2012-01-24 19:38:37.000000000 +0000 5--- modules/printbackends/cups/gtkprintbackendcups.c.orig 2012-01-24 19:38:37.000000000 +0000
7+++ modules/printbackends/cups/gtkprintbackendcups.c 6+++ modules/printbackends/cups/gtkprintbackendcups.c
8@@ -483,44 +483,22 @@ cups_print_cb (GtkPrintBackendCups *prin 7@@ -485,7 +485,7 @@ cups_print_cb (GtkPrintBackendCups *prin
9 GDK_THREADS_LEAVE ();  
10 } 
11  8
12-typedef struct { 9 typedef struct {
13- GtkCupsRequest *request; 10 GtkCupsRequest *request;
14- GtkPrinterOptionSet *options; 11- GtkPrinterOptionSet *options;
15-} CupsOptionsData; 12+ GtkPrinterCups *printer;
16- 13 } CupsOptionsData;
 14
17 static void 15 static void
18 add_cups_options (const gchar *key, 16@@ -495,9 +495,13 @@ add_cups_options (const gchar *key,
19 const gchar *value, 
20 gpointer user_data) 
21 { 17 {
22- CupsOptionsData *data = (CupsOptionsData *) user_data; 18 CupsOptionsData *data = (CupsOptionsData *) user_data;
23- GtkCupsRequest *request = data->request; 19 GtkCupsRequest *request = data->request;
24- GtkPrinterOptionSet *options = data->options; 20- GtkPrinterOptionSet *options = data->options;
25- GtkPrinterOption *option = NULL; 21- GtkPrinterOption *option = NULL;
26- gchar *new_value = NULL; 22+ GtkPrinterCups *printer = data->printer;
27+ GtkCupsRequest *request = user_data; 23+ gboolean custom_value = FALSE;
 24 gchar *new_value = NULL;
 25+ gint i;
 26+
 27+ if (!key || !value)
 28+ return;
28  29
29 if (!g_str_has_prefix (key, "cups-")) 30 if (!g_str_has_prefix (key, "cups-"))
30 return; 31 return;
31  32@@ -505,17 +509,37 @@ add_cups_options (const gchar *key,
32 if (strcmp (value, "gtk-ignore-value") == 0) 33 if (strcmp (value, "gtk-ignore-value") == 0)
33 return; 34 return;
34- 35
35- option = gtk_printer_option_set_lookup (options, key); 36- option = gtk_printer_option_set_lookup (options, key);
36  37-
37 key = key + strlen ("cups-"); 38 key = key + strlen ("cups-");
38  39
39- /* Add "Custom." prefix to custom values */ 40- /* Add "Custom." prefix to custom values */
40- if (value && option && 41- if (value && option &&
41- !gtk_printer_option_has_choice (option, value)) 42- !gtk_printer_option_has_choice (option, value))
42- new_value = g_strdup_printf ("Custom.%s", value); 43- new_value = g_strdup_printf ("Custom.%s", value);
43- 44+ if (printer && printer->ppd_file)
44- if (new_value) 45+ {
45- { 46+ ppd_coption_t *coption;
46- gtk_cups_request_encode_option (request, key, new_value); 47+ gboolean found = FALSE;
47- g_free (new_value); 48+ gboolean custom_values_enabled = FALSE;
48- } 49+
49- else 50+ coption = ppdFindCustomOption (printer->ppd_file, key);
50- gtk_cups_request_encode_option (request, key, value); 51+ if (coption && coption->option)
51+ gtk_cups_request_encode_option (request, key, value); 52+ {
52 } 53+ for (i = 0; i < coption->option->num_choices; i++)
 54+ {
 55+ /* Are custom values enabled ? */
 56+ if (g_str_equal (coption->option->choices[i].choice, "Custom"))
 57+ custom_values_enabled = TRUE;
 58+
 59+ /* Is the value among available choices ? */
 60+ if (g_str_equal (coption->option->choices[i].choice, value))
 61+ found = TRUE;
 62+ }
 63+
 64+ if (custom_values_enabled && !found)
 65+ custom_value = TRUE;
 66+ }
 67+ }
53  68
54 static void 69- if (new_value)
55@@ -533,12 +511,8 @@ gtk_print_backend_cups_print_stream (Gtk 70+ /* Add "Custom." prefix to custom values. */
56 { 71+ if (custom_value)
57 GtkPrinterCups *cups_printer; 72 {
58 CupsPrintStreamData *ps; 73+ new_value = g_strdup_printf ("Custom.%s", value);
59- CupsOptionsData *options_data; 74 gtk_cups_request_encode_option (request, key, new_value);
 75 g_free (new_value);
 76 }
 77@@ -536,9 +560,6 @@ gtk_print_backend_cups_print_stream (Gtk
 78 CupsOptionsData *options_data;
60 GtkCupsRequest *request; 79 GtkCupsRequest *request;
61 GtkPrintSettings *settings; 80 GtkPrintSettings *settings;
62- GtkPrinterOptionSet *options; 81- GtkPrinterOptionSet *options;
63- GtkPrintCapabilities capabilities; 82- GtkPrintCapabilities capabilities;
64- GtkPageSetup *page_setup; 83- GtkPageSetup *page_setup;
65 const gchar *title; 84 const gchar *title;
66 char printer_absolute_uri[HTTP_MAX_URI]; 85 char printer_absolute_uri[HTTP_MAX_URI];
67  86
68@@ -547,8 +521,6 @@ gtk_print_backend_cups_print_stream (Gtk 87@@ -547,8 +568,6 @@ gtk_print_backend_cups_print_stream (Gtk
69  88
70 cups_printer = GTK_PRINTER_CUPS (gtk_print_job_get_printer (job)); 89 cups_printer = GTK_PRINTER_CUPS (gtk_print_job_get_printer (job));
71 settings = gtk_print_job_get_settings (job); 90 settings = gtk_print_job_get_settings (job);
72- capabilities = cups_printer_get_capabilities (GTK_PRINTER (cups_printer)); 91- capabilities = cups_printer_get_capabilities (GTK_PRINTER (cups_printer));
73- page_setup = gtk_printer_get_default_page_size (GTK_PRINTER (cups_printer)); 92- page_setup = gtk_printer_get_default_page_size (GTK_PRINTER (cups_printer));
74  93
75 request = gtk_cups_request_new_with_username (NULL, 94 request = gtk_cups_request_new_with_username (NULL,
76 GTK_CUPS_POST, 95 GTK_CUPS_POST,
77@@ -586,18 +558,8 @@ gtk_print_backend_cups_print_stream (Gtk 96@@ -586,16 +605,10 @@ gtk_print_backend_cups_print_stream (Gtk
78 IPP_TAG_NAME, "job-name",  97 IPP_TAG_NAME, "job-name",
79 NULL, title); 98 NULL, title);
80  99
81- options = cups_printer_get_options (GTK_PRINTER (cups_printer), settings, page_setup, capabilities); 100- options = cups_printer_get_options (GTK_PRINTER (cups_printer), settings, page_setup, capabilities);
82- 101-
83- options_data = g_new0 (CupsOptionsData, 1); 102 options_data = g_new0 (CupsOptionsData, 1);
84- options_data->request = request; 103 options_data->request = request;
85- options_data->options = options; 104- options_data->options = options;
86- 105-
87- gtk_print_settings_foreach (settings, add_cups_options, options_data); 106+ options_data->printer = cups_printer;
 107 gtk_print_settings_foreach (settings, add_cups_options, options_data);
88- 108-
89- g_object_unref (page_setup); 109- g_object_unref (page_setup);
90- g_object_unref (options); 110- g_object_unref (options);
91- g_free (options_data); 111 g_free (options_data);
92- 112
93+ gtk_print_settings_foreach (settings, add_cups_options, request); 
94+  
95 ps = g_new0 (CupsPrintStreamData, 1); 113 ps = g_new0 (CupsPrintStreamData, 1);
96 ps->callback = callback; 114@@ -4606,7 +4619,12 @@ cups_printer_get_default_page_size (GtkP
97 ps->user_data = user_data; 115 return NULL;
 116
 117 option = ppdFindOption (ppd_file, "PageSize");
 118+ if (option == NULL)
 119+ return NULL;
 120+
 121 size = ppdPageSize (ppd_file, option->defchoice);
 122+ if (size == NULL)
 123+ return NULL;
 124
 125 return create_page_setup (ppd_file, size);
 126 }