summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordrochner <drochner@pkgsrc.org>2012-02-01 18:23:04 +0000
committerdrochner <drochner@pkgsrc.org>2012-02-01 18:23:04 +0000
commitc1765c54497a50efcf05a904c06ca2e3a14b4615 (patch)
tree6084aa7849e48675bc7e3bc72a19e87825975c55
parentab6f13cba9f794de3d366a3981839b98ab721ba2 (diff)
downloadpkgsrc-c1765c54497a50efcf05a904c06ca2e3a14b4615.tar.gz
replace the patch for the printing problem by the official upstream one,
bump PKGREV
-rw-r--r--x11/gtk2/Makefile3
-rw-r--r--x11/gtk2/distinfo4
-rw-r--r--x11/gtk2/patches/patch-ak123
3 files changed, 80 insertions, 50 deletions
diff --git a/x11/gtk2/Makefile b/x11/gtk2/Makefile
index a0401e282a6..75b12649ae9 100644
--- a/x11/gtk2/Makefile
+++ b/x11/gtk2/Makefile
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.225 2012/01/29 10:56:44 drochner Exp $
+# $NetBSD: Makefile,v 1.226 2012/02/01 18:23:04 drochner Exp $
DISTNAME= gtk+-2.24.9
PKGNAME= ${DISTNAME:S/gtk/gtk2/}
+PKGREVISION= 1
CATEGORIES= x11
MASTER_SITES= ftp://ftp.gtk.org/pub/gtk/2.24/ \
${MASTER_SITE_GNOME:=sources/gtk+/2.24/}
diff --git a/x11/gtk2/distinfo b/x11/gtk2/distinfo
index 1bf7aba71b6..f1a42fc1e5e 100644
--- a/x11/gtk2/distinfo
+++ b/x11/gtk2/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.140 2012/01/29 10:56:44 drochner Exp $
+$NetBSD: distinfo,v 1.141 2012/02/01 18:23:04 drochner Exp $
SHA1 (gtk+-2.24.9.tar.xz) = 7760411a8ee50a1e01e4480e074f9f221f0884db
RMD160 (gtk+-2.24.9.tar.xz) = 4e51be9955a9f3d359fcaca9cc30c12477789d28
@@ -7,4 +7,4 @@ SHA1 (patch-aa) = 9eec7fc4764b18856455a18b49f1bb101e5e6b11
SHA1 (patch-ab) = 9c82cc60f3825d377a197c876fcc6faa379cbde3
SHA1 (patch-af) = d59414e24a7da7f8694dbefbd2f0c2c2b60ec5ad
SHA1 (patch-aj) = 9887573ac7ade9e8f8ee2ead68e279f67836a1a3
-SHA1 (patch-ak) = 4f9badd2b5607c94c8ccb5c22d60a87105cc1ae3
+SHA1 (patch-ak) = 90c49bf6b7bf79bb8ad270c2661876ea7b0cb5ad
diff --git a/x11/gtk2/patches/patch-ak b/x11/gtk2/patches/patch-ak
index 1485c85f947..2a8b84f7e48 100644
--- a/x11/gtk2/patches/patch-ak
+++ b/x11/gtk2/patches/patch-ak
@@ -1,62 +1,81 @@
-$NetBSD: patch-ak,v 1.5 2012/01/29 10:56:44 drochner Exp $
+$NetBSD: patch-ak,v 1.6 2012/02/01 18:23:05 drochner Exp $
-revert upstream commit 8170436e61ea68c713d75ad374d22c3261be9203,
-it causes firefox crashes (see gnome bug #543520)
+gnome bug #543520
--- modules/printbackends/cups/gtkprintbackendcups.c.orig 2012-01-24 19:38:37.000000000 +0000
+++ modules/printbackends/cups/gtkprintbackendcups.c
-@@ -483,44 +483,22 @@ cups_print_cb (GtkPrintBackendCups *prin
- GDK_THREADS_LEAVE ();
- }
+@@ -485,7 +485,7 @@ cups_print_cb (GtkPrintBackendCups *prin
--typedef struct {
-- GtkCupsRequest *request;
+ typedef struct {
+ GtkCupsRequest *request;
- GtkPrinterOptionSet *options;
--} CupsOptionsData;
--
++ GtkPrinterCups *printer;
+ } CupsOptionsData;
+
static void
- add_cups_options (const gchar *key,
- const gchar *value,
- gpointer user_data)
+@@ -495,9 +495,13 @@ add_cups_options (const gchar *key,
{
-- CupsOptionsData *data = (CupsOptionsData *) user_data;
-- GtkCupsRequest *request = data->request;
+ CupsOptionsData *data = (CupsOptionsData *) user_data;
+ GtkCupsRequest *request = data->request;
- GtkPrinterOptionSet *options = data->options;
- GtkPrinterOption *option = NULL;
-- gchar *new_value = NULL;
-+ GtkCupsRequest *request = user_data;
++ GtkPrinterCups *printer = data->printer;
++ gboolean custom_value = FALSE;
+ gchar *new_value = NULL;
++ gint i;
++
++ if (!key || !value)
++ return;
if (!g_str_has_prefix (key, "cups-"))
return;
-
+@@ -505,17 +509,37 @@ add_cups_options (const gchar *key,
if (strcmp (value, "gtk-ignore-value") == 0)
return;
--
+
- option = gtk_printer_option_set_lookup (options, key);
-
+-
key = key + strlen ("cups-");
- /* Add "Custom." prefix to custom values */
- if (value && option &&
- !gtk_printer_option_has_choice (option, value))
- new_value = g_strdup_printf ("Custom.%s", value);
--
-- if (new_value)
-- {
-- gtk_cups_request_encode_option (request, key, new_value);
-- g_free (new_value);
-- }
-- else
-- gtk_cups_request_encode_option (request, key, value);
-+ gtk_cups_request_encode_option (request, key, value);
- }
++ if (printer && printer->ppd_file)
++ {
++ ppd_coption_t *coption;
++ gboolean found = FALSE;
++ gboolean custom_values_enabled = FALSE;
++
++ coption = ppdFindCustomOption (printer->ppd_file, key);
++ if (coption && coption->option)
++ {
++ for (i = 0; i < coption->option->num_choices; i++)
++ {
++ /* Are custom values enabled ? */
++ if (g_str_equal (coption->option->choices[i].choice, "Custom"))
++ custom_values_enabled = TRUE;
++
++ /* Is the value among available choices ? */
++ if (g_str_equal (coption->option->choices[i].choice, value))
++ found = TRUE;
++ }
++
++ if (custom_values_enabled && !found)
++ custom_value = TRUE;
++ }
++ }
- static void
-@@ -533,12 +511,8 @@ gtk_print_backend_cups_print_stream (Gtk
- {
- GtkPrinterCups *cups_printer;
- CupsPrintStreamData *ps;
-- CupsOptionsData *options_data;
+- if (new_value)
++ /* Add "Custom." prefix to custom values. */
++ if (custom_value)
+ {
++ new_value = g_strdup_printf ("Custom.%s", value);
+ gtk_cups_request_encode_option (request, key, new_value);
+ g_free (new_value);
+ }
+@@ -536,9 +560,6 @@ gtk_print_backend_cups_print_stream (Gtk
+ CupsOptionsData *options_data;
GtkCupsRequest *request;
GtkPrintSettings *settings;
- GtkPrinterOptionSet *options;
@@ -65,7 +84,7 @@ it causes firefox crashes (see gnome bug #543520)
const gchar *title;
char printer_absolute_uri[HTTP_MAX_URI];
-@@ -547,8 +521,6 @@ gtk_print_backend_cups_print_stream (Gtk
+@@ -547,8 +568,6 @@ gtk_print_backend_cups_print_stream (Gtk
cups_printer = GTK_PRINTER_CUPS (gtk_print_job_get_printer (job));
settings = gtk_print_job_get_settings (job);
@@ -74,24 +93,34 @@ it causes firefox crashes (see gnome bug #543520)
request = gtk_cups_request_new_with_username (NULL,
GTK_CUPS_POST,
-@@ -586,18 +558,8 @@ gtk_print_backend_cups_print_stream (Gtk
+@@ -586,16 +605,10 @@ gtk_print_backend_cups_print_stream (Gtk
IPP_TAG_NAME, "job-name",
NULL, title);
- options = cups_printer_get_options (GTK_PRINTER (cups_printer), settings, page_setup, capabilities);
-
-- options_data = g_new0 (CupsOptionsData, 1);
-- options_data->request = request;
+ options_data = g_new0 (CupsOptionsData, 1);
+ options_data->request = request;
- options_data->options = options;
-
-- gtk_print_settings_foreach (settings, add_cups_options, options_data);
++ options_data->printer = cups_printer;
+ gtk_print_settings_foreach (settings, add_cups_options, options_data);
-
- g_object_unref (page_setup);
- g_object_unref (options);
-- g_free (options_data);
--
-+ gtk_print_settings_foreach (settings, add_cups_options, request);
-+
+ g_free (options_data);
+
ps = g_new0 (CupsPrintStreamData, 1);
- ps->callback = callback;
- ps->user_data = user_data;
+@@ -4606,7 +4619,12 @@ cups_printer_get_default_page_size (GtkP
+ return NULL;
+
+ option = ppdFindOption (ppd_file, "PageSize");
++ if (option == NULL)
++ return NULL;
++
+ size = ppdPageSize (ppd_file, option->defchoice);
++ if (size == NULL)
++ return NULL;
+
+ return create_page_setup (ppd_file, size);
+ }