summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Rostovtsev <tetromino@gentoo.org>2012-08-07 10:18:15 +0000
committerAlexandre Rostovtsev <tetromino@gentoo.org>2012-08-07 10:18:15 +0000
commitba168be5746ec4d47e8a3166bc550cae9ab7e106 (patch)
treeb2a6a09ca37280deccf7ae931f742df1dc5e487b /gnome-base
parentVersion bump. (diff)
downloadgentoo-2-ba168be5746ec4d47e8a3166bc550cae9ab7e106.tar.gz
gentoo-2-ba168be5746ec4d47e8a3166bc550cae9ab7e106.tar.bz2
gentoo-2-ba168be5746ec4d47e8a3166bc550cae9ab7e106.zip
Fix build failure with cups-1.6.x; drop old.
(Portage version: 2.2.0_alpha120/cvs/Linux x86_64)
Diffstat (limited to 'gnome-base')
-rw-r--r--gnome-base/gnome-control-center/ChangeLog9
-rw-r--r--gnome-base/gnome-control-center/files/gnome-control-center-3.2.3-cups-1.6.patch376
-rw-r--r--gnome-base/gnome-control-center/files/gnome-control-center-3.4.2-cups-1.6.patch374
-rw-r--r--gnome-base/gnome-control-center/gnome-control-center-3.2.2.ebuild114
-rw-r--r--gnome-base/gnome-control-center/gnome-control-center-3.2.3.ebuild6
-rw-r--r--gnome-base/gnome-control-center/gnome-control-center-3.4.2-r1.ebuild4
6 files changed, 766 insertions, 117 deletions
diff --git a/gnome-base/gnome-control-center/ChangeLog b/gnome-base/gnome-control-center/ChangeLog
index 28f09154688a..9248654a7e42 100644
--- a/gnome-base/gnome-control-center/ChangeLog
+++ b/gnome-base/gnome-control-center/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for gnome-base/gnome-control-center
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/gnome-base/gnome-control-center/ChangeLog,v 1.106 2012/07/19 02:46:04 tetromino Exp $
+# $Header: /var/cvsroot/gentoo-x86/gnome-base/gnome-control-center/ChangeLog,v 1.107 2012/08/07 10:18:15 tetromino Exp $
+
+ 07 Aug 2012; Alexandre Rostovtsev <tetromino@gentoo.org>
+ -gnome-control-center-3.2.2.ebuild, gnome-control-center-3.2.3.ebuild,
+ +files/gnome-control-center-3.2.3-cups-1.6.patch,
+ gnome-control-center-3.4.2-r1.ebuild,
+ +files/gnome-control-center-3.4.2-cups-1.6.patch:
+ Fix build failure with cups-1.6.x; drop old.
*gnome-control-center-3.4.2-r1 (19 Jul 2012)
diff --git a/gnome-base/gnome-control-center/files/gnome-control-center-3.2.3-cups-1.6.patch b/gnome-base/gnome-control-center/files/gnome-control-center-3.2.3-cups-1.6.patch
new file mode 100644
index 000000000000..10bccbad7baf
--- /dev/null
+++ b/gnome-base/gnome-control-center/files/gnome-control-center-3.2.3-cups-1.6.patch
@@ -0,0 +1,376 @@
+From 3c35742d9cacda5a1e37dd1dfe8f579434a35b84 Mon Sep 17 00:00:00 2001
+From: Jiri Popelka <jpopelka@redhat.com>
+Date: Wed, 11 Jul 2012 17:25:09 +0200
+Subject: [PATCH] Use CUPS-1.6 IPP API getter/setter functions.
+
+CUPS 1.6 makes various structures private and
+introduces these ippGet and ippSet functions
+for all of the fields in these structures.
+http://www.cups.org/str.php?L3928
+
+We define our own accessors when
+building against CUPS < 1.6.
+
+[Alexandre Rostovtsev <tetromino@gentoo.org>: backport to 3.2.x]
+---
+ panels/printers/cc-printers-panel.c | 20 +++-
+ panels/printers/pp-new-printer-dialog.c | 10 ++-
+ panels/printers/pp-utils.c | 159 ++++++++++++++++++------------
+ 3 files changed, 119 insertions(+), 70 deletions(-)
+
+diff --git a/panels/printers/cc-printers-panel.c b/panels/printers/cc-printers-panel.c
+index 8ef9847..35751a6 100644
+--- a/panels/printers/cc-printers-panel.c
++++ b/panels/printers/cc-printers-panel.c
+@@ -59,6 +59,16 @@ G_DEFINE_DYNAMIC_TYPE (CcPrintersPanel, cc_printers_panel, CC_TYPE_PANEL)
+
+ #define CUPS_STATUS_CHECK_INTERVAL 5
+
++#if (CUPS_VERSION_MAJOR > 1) || (CUPS_VERSION_MINOR > 5)
++#define HAVE_CUPS_1_6 1
++#endif
++
++#ifndef HAVE_CUPS_1_6
++#define ippGetState(ipp) ipp->state
++#define ippGetStatusCode(ipp) ipp->request.status.status_code
++#define ippGetString(attr, element, language) attr->values[element].string.text
++#endif
++
+ struct _CcPrintersPanelPrivate
+ {
+ GtkBuilder *builder;
+@@ -312,7 +322,7 @@ on_cups_notification (GDBusConnection *connection,
+
+ if (response)
+ {
+- if (response->request.status.status_code <= IPP_OK_CONFLICT)
++ if (ippGetStatusCode (response) <= IPP_OK_CONFLICT)
+ {
+ ipp_attribute_t *attr_username = NULL;
+ ipp_attribute_t *attr_printer_uri = NULL;
+@@ -320,12 +330,12 @@ on_cups_notification (GDBusConnection *connection,
+ attr_username = ippFindAttribute(response, "job-originating-user-name", IPP_TAG_NAME);
+ attr_printer_uri = ippFindAttribute(response, "job-printer-uri", IPP_TAG_URI);
+ if (attr_username && attr_printer_uri &&
+- g_strcmp0 (attr_username->values[0].string.text, cupsUser ()) == 0 &&
+- g_strrstr (attr_printer_uri->values[0].string.text, "/") != 0 &&
++ g_strcmp0 (ippGetString (attr_username, 0, NULL), cupsUser ()) == 0 &&
++ g_strrstr (ippGetString (attr_printer_uri, 0, NULL), "/") != 0 &&
+ priv->current_dest >= 0 &&
+ priv->current_dest < priv->num_dests &&
+ priv->dests != NULL &&
+- g_strcmp0 (g_strrstr (attr_printer_uri->values[0].string.text, "/") + 1,
++ g_strcmp0 (g_strrstr (ippGetString (attr_printer_uri, 0, NULL), "/") + 1,
+ priv->dests[priv->current_dest].name) == 0)
+ actualize_jobs_list (self);
+ }
+@@ -2263,7 +2273,7 @@ test_page_cb (GtkButton *button,
+
+ if (response)
+ {
+- if (response->state == IPP_ERROR)
++ if (ippGetState(response) == IPP_ERROR)
+ g_warning ("An error has occured during printing of test page.");
+ ippDelete (response);
+ }
+diff --git a/panels/printers/pp-new-printer-dialog.c b/panels/printers/pp-new-printer-dialog.c
+index 583fb60..d2f25c1 100644
+--- a/panels/printers/pp-new-printer-dialog.c
++++ b/panels/printers/pp-new-printer-dialog.c
+@@ -60,6 +60,14 @@
+
+ #define ALLOWED_CHARACTERS "abcdefghijklmnopqrtsuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_"
+
++#if (CUPS_VERSION_MAJOR > 1) || (CUPS_VERSION_MINOR > 5)
++#define HAVE_CUPS_1_6 1
++#endif
++
++#ifndef HAVE_CUPS_1_6
++#define ippGetState(ipp) ipp->state
++#endif
++
+ static void pp_new_printer_dialog_hide (PpNewPrinterDialog *pp);
+ static void actualize_devices_list (PpNewPrinterDialog *pp);
+
+@@ -1696,7 +1704,7 @@ new_printer_add_button_cb (GtkButton *button,
+ _("Automatic configuration"));
+ if (response)
+ {
+- if (response->state == IPP_ERROR)
++ if (ippGetState(response) == IPP_ERROR)
+ g_warning ("An error has occured during automatic configuration of new printer.");
+ ippDelete (response);
+ }
+diff --git a/panels/printers/pp-utils.c b/panels/printers/pp-utils.c
+index c89c4e4..830b39e 100644
+--- a/panels/printers/pp-utils.c
++++ b/panels/printers/pp-utils.c
+@@ -36,6 +36,37 @@
+ #define SCP_PATH "/org/fedoraproject/Config/Printing"
+ #define SCP_IFACE "org.fedoraproject.Config.Printing"
+
++#if (CUPS_VERSION_MAJOR > 1) || (CUPS_VERSION_MINOR > 5)
++#define HAVE_CUPS_1_6 1
++#endif
++
++#ifndef HAVE_CUPS_1_6
++#define ippGetCount(attr) attr->num_values
++#define ippGetGroupTag(attr) attr->group_tag
++#define ippGetValueTag(attr) attr->value_tag
++#define ippGetName(attr) attr->name
++#define ippGetStatusCode(ipp) ipp->request.status.status_code
++#define ippGetInteger(attr, element) attr->values[element].integer
++#define ippGetString(attr, element, language) attr->values[element].string.text
++
++static ipp_attribute_t *
++ippFirstAttribute(ipp_t *ipp)
++{
++ if (!ipp)
++ return (NULL);
++ return (ipp->current = ipp->attrs);
++}
++
++static ipp_attribute_t *
++ippNextAttribute(ipp_t *ipp)
++{
++ if (!ipp || !ipp->current)
++ return (NULL);
++ return (ipp->current = ipp->current->next);
++}
++#endif
++
++
+ DBusGProxy *
+ get_dbus_proxy (const gchar *name,
+ const gchar *path,
+@@ -977,12 +1008,12 @@ DBus method \"GetBestDrivers\". Using fallback solution for now.");
+ response = cupsDoRequest (http, request, "/");
+
+ if (response &&
+- response->request.status.status_code <= IPP_OK_CONFLICT)
++ ippGetStatusCode (response) <= IPP_OK_CONFLICT)
+ {
+- for (attr = response->attrs; attr != NULL; attr = attr->next)
++ for (attr = ippFirstAttribute (response); attr != NULL; attr = ippNextAttribute (response))
+ {
+- while (attr != NULL && attr->group_tag != IPP_TAG_PRINTER)
+- attr = attr->next;
++ while (attr != NULL && ippGetGroupTag (attr) != IPP_TAG_PRINTER)
++ attr = ippNextAttribute (response);
+
+ if (attr == NULL)
+ break;
+@@ -992,22 +1023,22 @@ DBus method \"GetBestDrivers\". Using fallback solution for now.");
+ ppd_name = NULL;
+ ppd_product = NULL;
+
+- while (attr != NULL && attr->group_tag == IPP_TAG_PRINTER)
++ while (attr != NULL && ippGetGroupTag (attr) == IPP_TAG_PRINTER)
+ {
+- if (g_strcmp0 (attr->name, "ppd-device-id") == 0 &&
+- attr->value_tag == IPP_TAG_TEXT)
+- ppd_device_id = attr->values[0].string.text;
+- else if (g_strcmp0 (attr->name, "ppd-make-and-model") == 0 &&
+- attr->value_tag == IPP_TAG_TEXT)
+- ppd_make_and_model = attr->values[0].string.text;
+- else if (g_strcmp0 (attr->name, "ppd-name") == 0 &&
+- attr->value_tag == IPP_TAG_NAME)
+- ppd_name = attr->values[0].string.text;
+- else if (g_strcmp0 (attr->name, "ppd-product") == 0 &&
+- attr->value_tag == IPP_TAG_TEXT)
+- ppd_product = attr->values[0].string.text;
+-
+- attr = attr->next;
++ if (g_strcmp0 (ippGetName (attr), "ppd-device-id") == 0 &&
++ ippGetValueTag (attr) == IPP_TAG_TEXT)
++ ppd_device_id = (gchar *) ippGetString (attr, 0, NULL);
++ else if (g_strcmp0 (ippGetName (attr), "ppd-make-and-model") == 0 &&
++ ippGetValueTag (attr) == IPP_TAG_TEXT)
++ ppd_make_and_model = ippGetString (attr, 0, NULL);
++ else if (g_strcmp0 (ippGetName (attr), "ppd-name") == 0 &&
++ ippGetValueTag (attr) == IPP_TAG_NAME)
++ ppd_name = ippGetString (attr, 0, NULL);
++ else if (g_strcmp0 (ippGetName (attr), "ppd-product") == 0 &&
++ ippGetValueTag (attr) == IPP_TAG_TEXT)
++ ppd_product = ippGetString (attr, 0, NULL);
++
++ attr = ippNextAttribute (response);
+ }
+
+ if (ppd_device_id && ppd_name)
+@@ -1051,15 +1082,15 @@ DBus method \"GetBestDrivers\". Using fallback solution for now.");
+ response = cupsDoRequest (http, request, "/");
+
+ if (response &&
+- response->request.status.status_code <= IPP_OK_CONFLICT)
++ ippGetStatusCode (response) <= IPP_OK_CONFLICT)
+ {
+ for (i = 0; equivalents && equivalents[i]; i++)
+ {
+ eq_normalized = normalize (equivalents[i]);
+- for (attr = response->attrs; attr != NULL; attr = attr->next)
++ for (attr = ippFirstAttribute (response); attr != NULL; attr = ippNextAttribute (response))
+ {
+- while (attr != NULL && attr->group_tag != IPP_TAG_PRINTER)
+- attr = attr->next;
++ while (attr != NULL && ippGetGroupTag (attr) != IPP_TAG_PRINTER)
++ attr = ippNextAttribute (response);
+
+ if (attr == NULL)
+ break;
+@@ -1069,22 +1100,22 @@ DBus method \"GetBestDrivers\". Using fallback solution for now.");
+ ppd_name = NULL;
+ ppd_product = NULL;
+
+- while (attr != NULL && attr->group_tag == IPP_TAG_PRINTER)
++ while (attr != NULL && ippGetGroupTag (attr) == IPP_TAG_PRINTER)
+ {
+- if (g_strcmp0 (attr->name, "ppd-device-id") == 0 &&
+- attr->value_tag == IPP_TAG_TEXT)
+- ppd_device_id = attr->values[0].string.text;
+- else if (g_strcmp0 (attr->name, "ppd-make-and-model") == 0 &&
+- attr->value_tag == IPP_TAG_TEXT)
+- ppd_make_and_model = attr->values[0].string.text;
+- else if (g_strcmp0 (attr->name, "ppd-name") == 0 &&
+- attr->value_tag == IPP_TAG_NAME)
+- ppd_name = attr->values[0].string.text;
+- else if (g_strcmp0 (attr->name, "ppd-product") == 0 &&
+- attr->value_tag == IPP_TAG_TEXT)
+- ppd_product = attr->values[0].string.text;
+-
+- attr = attr->next;
++ if (g_strcmp0 (ippGetName (attr), "ppd-device-id") == 0 &&
++ ippGetValueTag (attr) == IPP_TAG_TEXT)
++ ppd_device_id = ippGetString (attr, 0, NULL);
++ else if (g_strcmp0 (ippGetName (attr), "ppd-make-and-model") == 0 &&
++ ippGetValueTag (attr) == IPP_TAG_TEXT)
++ ppd_make_and_model = ippGetString (attr, 0, NULL);
++ else if (g_strcmp0 (ippGetName (attr), "ppd-name") == 0 &&
++ ippGetValueTag (attr) == IPP_TAG_NAME)
++ ppd_name = ippGetString (attr, 0, NULL);
++ else if (g_strcmp0 (ippGetName (attr), "ppd-product") == 0 &&
++ ippGetValueTag (attr) == IPP_TAG_TEXT)
++ ppd_product = ippGetString (attr, 0, NULL);
++
++ attr = ippNextAttribute (response);
+ }
+
+ if (ppd_device_id && ppd_name)
+@@ -1382,23 +1413,23 @@ ccGetAllowedUsers (gchar ***allowed_users, const char *printer_name)
+ ipp_attribute_t *attr = NULL;
+ ipp_attribute_t *allowed = NULL;
+
+- for (attr = response->attrs; attr != NULL; attr = attr->next)
++ for (attr = ippFirstAttribute (response); attr != NULL; attr = ippNextAttribute (response))
+ {
+- if (attr->group_tag == IPP_TAG_PRINTER &&
+- attr->value_tag == IPP_TAG_NAME &&
+- !g_strcmp0 (attr->name, "requesting-user-name-allowed"))
++ if (ippGetGroupTag (attr)== IPP_TAG_PRINTER &&
++ ippGetValueTag (attr) == IPP_TAG_NAME &&
++ !g_strcmp0 (ippGetName (attr), "requesting-user-name-allowed"))
+ allowed = attr;
+ }
+
+- if (allowed && allowed->num_values > 0)
++ if (allowed && ippGetCount (allowed) > 0)
+ {
+ int i;
+
+- num_allowed_users = allowed->num_values;
++ num_allowed_users = ippGetCount (allowed);
+ users = g_new (gchar*, num_allowed_users);
+
+ for (i = 0; i < num_allowed_users; i ++)
+- users[i] = g_strdup (allowed->values[i].string.text);
++ users[i] = g_strdup (ippGetString (allowed, i, NULL));
+ }
+ ippDelete(response);
+ }
+@@ -1485,12 +1516,12 @@ renew_cups_subscription (gint id,
+ "notify-lease-duration", lease_duration);
+ response = cupsDoRequest (http, request, "/");
+ if (response != NULL &&
+- response->request.status.status_code <= IPP_OK_CONFLICT) {
++ ippGetStatusCode (response) <= IPP_OK_CONFLICT) {
+ if ((attr = ippFindAttribute (response, "notify-lease-duration",
+ IPP_TAG_INTEGER)) == NULL)
+ g_debug ("No notify-lease-duration in response!\n");
+ else
+- if (attr->values[0].integer == lease_duration)
++ if (ippGetInteger (attr, 0) == lease_duration)
+ result = id;
+ }
+ }
+@@ -1512,12 +1543,12 @@ renew_cups_subscription (gint id,
+ response = cupsDoRequest (http, request, "/");
+
+ if (response != NULL &&
+- response->request.status.status_code <= IPP_OK_CONFLICT) {
++ ippGetStatusCode (response) <= IPP_OK_CONFLICT) {
+ if ((attr = ippFindAttribute (response, "notify-subscription-id",
+ IPP_TAG_INTEGER)) == NULL)
+ g_debug ("No notify-subscription-id in response!\n");
+ else
+- result = attr->values[0].integer;
++ result = ippGetInteger (attr, 0);
+ }
+ }
+
+@@ -1687,38 +1718,38 @@ printer_rename (const gchar *old_name,
+
+ if (response)
+ {
+- if (response->request.status.status_code <= IPP_OK_CONFLICT)
++ if (ippGetStatusCode (response) <= IPP_OK_CONFLICT)
+ {
+ attr = ippFindAttribute (response, "printer-error-policy", IPP_TAG_NAME);
+ if (attr)
+- error_policy = g_strdup (attr->values[0].string.text);
++ error_policy = g_strdup (ippGetString (attr, 0, NULL));
+
+ attr = ippFindAttribute (response, "printer-op-policy", IPP_TAG_NAME);
+ if (attr)
+- op_policy = g_strdup (attr->values[0].string.text);
++ op_policy = g_strdup (ippGetString (attr, 0, NULL));
+
+ attr = ippFindAttribute (response, "requesting-user-name-allowed", IPP_TAG_NAME);
+- if (attr && attr->num_values > 0)
++ if (attr && ippGetCount (attr) > 0)
+ {
+- users_allowed = g_new0 (gchar *, attr->num_values + 1);
+- for (i = 0; i < attr->num_values; i++)
+- users_allowed[i] = g_strdup (attr->values[i].string.text);
++ users_allowed = g_new0 (gchar *, ippGetCount (attr) + 1);
++ for (i = 0; i < ippGetCount (attr); i++)
++ users_allowed[i] = g_strdup (ippGetString (attr, i, NULL));
+ }
+
+ attr = ippFindAttribute (response, "requesting-user-name-denied", IPP_TAG_NAME);
+- if (attr && attr->num_values > 0)
++ if (attr && ippGetCount (attr) > 0)
+ {
+- users_denied = g_new0 (gchar *, attr->num_values + 1);
+- for (i = 0; i < attr->num_values; i++)
+- users_denied[i] = g_strdup (attr->values[i].string.text);
++ users_denied = g_new0 (gchar *, ippGetCount (attr) + 1);
++ for (i = 0; i < ippGetCount (attr); i++)
++ users_denied[i] = g_strdup (ippGetString (attr, i, NULL));
+ }
+
+ attr = ippFindAttribute (response, "member-names", IPP_TAG_NAME);
+- if (attr && attr->num_values > 0)
++ if (attr && ippGetCount (attr) > 0)
+ {
+- member_names = g_new0 (gchar *, attr->num_values + 1);
+- for (i = 0; i < attr->num_values; i++)
+- member_names[i] = g_strdup (attr->values[i].string.text);
++ member_names = g_new0 (gchar *, ippGetCount (attr) + 1);
++ for (i = 0; i < ippGetCount (attr); i++)
++ member_names[i] = g_strdup (ippGetString (attr, i, NULL));
+ }
+ }
+ ippDelete (response);
+--
+1.7.8.6
+
diff --git a/gnome-base/gnome-control-center/files/gnome-control-center-3.4.2-cups-1.6.patch b/gnome-base/gnome-control-center/files/gnome-control-center-3.4.2-cups-1.6.patch
new file mode 100644
index 000000000000..92070d64e37a
--- /dev/null
+++ b/gnome-base/gnome-control-center/files/gnome-control-center-3.4.2-cups-1.6.patch
@@ -0,0 +1,374 @@
+From 6fe26549d11b4e12026d81d680cd5ff11678a781 Mon Sep 17 00:00:00 2001
+From: Jiri Popelka <jpopelka@redhat.com>
+Date: Wed, 11 Jul 2012 17:25:09 +0200
+Subject: [PATCH] Use CUPS-1.6 IPP API getter/setter functions.
+
+CUPS 1.6 makes various structures private and
+introduces these ippGet and ippSet functions
+for all of the fields in these structures.
+http://www.cups.org/str.php?L3928
+
+We define our own accessors when
+building against CUPS < 1.6.
+---
+ panels/printers/cc-printers-panel.c | 20 +++-
+ panels/printers/pp-new-printer-dialog.c | 10 +-
+ panels/printers/pp-utils.c | 159 ++++++++++++++++++-------------
+ 3 files changed, 119 insertions(+), 70 deletions(-)
+
+diff --git a/panels/printers/cc-printers-panel.c b/panels/printers/cc-printers-panel.c
+index 0ea51c4..83622cc 100644
+--- a/panels/printers/cc-printers-panel.c
++++ b/panels/printers/cc-printers-panel.c
+@@ -58,6 +58,16 @@ G_DEFINE_DYNAMIC_TYPE (CcPrintersPanel, cc_printers_panel, CC_TYPE_PANEL)
+
+ #define CUPS_STATUS_CHECK_INTERVAL 5
+
++#if (CUPS_VERSION_MAJOR > 1) || (CUPS_VERSION_MINOR > 5)
++#define HAVE_CUPS_1_6 1
++#endif
++
++#ifndef HAVE_CUPS_1_6
++#define ippGetState(ipp) ipp->state
++#define ippGetStatusCode(ipp) ipp->request.status.status_code
++#define ippGetString(attr, element, language) attr->values[element].string.text
++#endif
++
+ struct _CcPrintersPanelPrivate
+ {
+ GtkBuilder *builder;
+@@ -318,7 +328,7 @@ on_cups_notification (GDBusConnection *connection,
+
+ if (response)
+ {
+- if (response->request.status.status_code <= IPP_OK_CONFLICT)
++ if (ippGetStatusCode (response) <= IPP_OK_CONFLICT)
+ {
+ ipp_attribute_t *attr_username = NULL;
+ ipp_attribute_t *attr_printer_uri = NULL;
+@@ -326,12 +336,12 @@ on_cups_notification (GDBusConnection *connection,
+ attr_username = ippFindAttribute(response, "job-originating-user-name", IPP_TAG_NAME);
+ attr_printer_uri = ippFindAttribute(response, "job-printer-uri", IPP_TAG_URI);
+ if (attr_username && attr_printer_uri &&
+- g_strcmp0 (attr_username->values[0].string.text, cupsUser ()) == 0 &&
+- g_strrstr (attr_printer_uri->values[0].string.text, "/") != 0 &&
++ g_strcmp0 (ippGetString (attr_username, 0, NULL), cupsUser ()) == 0 &&
++ g_strrstr (ippGetString (attr_printer_uri, 0, NULL), "/") != 0 &&
+ priv->current_dest >= 0 &&
+ priv->current_dest < priv->num_dests &&
+ priv->dests != NULL &&
+- g_strcmp0 (g_strrstr (attr_printer_uri->values[0].string.text, "/") + 1,
++ g_strcmp0 (g_strrstr (ippGetString (attr_printer_uri, 0, NULL), "/") + 1,
+ priv->dests[priv->current_dest].name) == 0)
+ actualize_jobs_list (self);
+ }
+@@ -2295,7 +2305,7 @@ test_page_cb (GtkButton *button,
+
+ if (response)
+ {
+- if (response->state == IPP_ERROR)
++ if (ippGetState(response) == IPP_ERROR)
+ g_warning ("An error has occured during printing of test page.");
+ ippDelete (response);
+ }
+diff --git a/panels/printers/pp-new-printer-dialog.c b/panels/printers/pp-new-printer-dialog.c
+index eb134b5..6ac4618 100644
+--- a/panels/printers/pp-new-printer-dialog.c
++++ b/panels/printers/pp-new-printer-dialog.c
+@@ -59,6 +59,14 @@
+
+ #define ALLOWED_CHARACTERS "abcdefghijklmnopqrtsuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_"
+
++#if (CUPS_VERSION_MAJOR > 1) || (CUPS_VERSION_MINOR > 5)
++#define HAVE_CUPS_1_6 1
++#endif
++
++#ifndef HAVE_CUPS_1_6
++#define ippGetState(ipp) ipp->state
++#endif
++
+ static void pp_new_printer_dialog_hide (PpNewPrinterDialog *pp);
+ static void actualize_devices_list (PpNewPrinterDialog *pp);
+
+@@ -1760,7 +1768,7 @@ new_printer_add_button_cb (GtkButton *button,
+ _("Automatic configuration"));
+ if (response)
+ {
+- if (response->state == IPP_ERROR)
++ if (ippGetState(response) == IPP_ERROR)
+ g_warning ("An error has occured during automatic configuration of new printer.");
+ ippDelete (response);
+ }
+diff --git a/panels/printers/pp-utils.c b/panels/printers/pp-utils.c
+index 5263af6..41fa3c4 100644
+--- a/panels/printers/pp-utils.c
++++ b/panels/printers/pp-utils.c
+@@ -35,6 +35,37 @@
+ #define SCP_PATH "/org/fedoraproject/Config/Printing"
+ #define SCP_IFACE "org.fedoraproject.Config.Printing"
+
++#if (CUPS_VERSION_MAJOR > 1) || (CUPS_VERSION_MINOR > 5)
++#define HAVE_CUPS_1_6 1
++#endif
++
++#ifndef HAVE_CUPS_1_6
++#define ippGetCount(attr) attr->num_values
++#define ippGetGroupTag(attr) attr->group_tag
++#define ippGetValueTag(attr) attr->value_tag
++#define ippGetName(attr) attr->name
++#define ippGetStatusCode(ipp) ipp->request.status.status_code
++#define ippGetInteger(attr, element) attr->values[element].integer
++#define ippGetString(attr, element, language) attr->values[element].string.text
++
++static ipp_attribute_t *
++ippFirstAttribute(ipp_t *ipp)
++{
++ if (!ipp)
++ return (NULL);
++ return (ipp->current = ipp->attrs);
++}
++
++static ipp_attribute_t *
++ippNextAttribute(ipp_t *ipp)
++{
++ if (!ipp || !ipp->current)
++ return (NULL);
++ return (ipp->current = ipp->current->next);
++}
++#endif
++
++
+ gchar *
+ get_tag_value (const gchar *tag_string, const gchar *tag_name)
+ {
+@@ -935,12 +966,12 @@ DBus method \"GetBestDrivers\". Using fallback solution for now.");
+ response = cupsDoRequest (http, request, "/");
+
+ if (response &&
+- response->request.status.status_code <= IPP_OK_CONFLICT)
++ ippGetStatusCode (response) <= IPP_OK_CONFLICT)
+ {
+- for (attr = response->attrs; attr != NULL; attr = attr->next)
++ for (attr = ippFirstAttribute (response); attr != NULL; attr = ippNextAttribute (response))
+ {
+- while (attr != NULL && attr->group_tag != IPP_TAG_PRINTER)
+- attr = attr->next;
++ while (attr != NULL && ippGetGroupTag (attr) != IPP_TAG_PRINTER)
++ attr = ippNextAttribute (response);
+
+ if (attr == NULL)
+ break;
+@@ -950,22 +981,22 @@ DBus method \"GetBestDrivers\". Using fallback solution for now.");
+ ppd_name = NULL;
+ ppd_product = NULL;
+
+- while (attr != NULL && attr->group_tag == IPP_TAG_PRINTER)
++ while (attr != NULL && ippGetGroupTag (attr) == IPP_TAG_PRINTER)
+ {
+- if (g_strcmp0 (attr->name, "ppd-device-id") == 0 &&
+- attr->value_tag == IPP_TAG_TEXT)
+- ppd_device_id = attr->values[0].string.text;
+- else if (g_strcmp0 (attr->name, "ppd-make-and-model") == 0 &&
+- attr->value_tag == IPP_TAG_TEXT)
+- ppd_make_and_model = attr->values[0].string.text;
+- else if (g_strcmp0 (attr->name, "ppd-name") == 0 &&
+- attr->value_tag == IPP_TAG_NAME)
+- ppd_name = attr->values[0].string.text;
+- else if (g_strcmp0 (attr->name, "ppd-product") == 0 &&
+- attr->value_tag == IPP_TAG_TEXT)
+- ppd_product = attr->values[0].string.text;
+-
+- attr = attr->next;
++ if (g_strcmp0 (ippGetName (attr), "ppd-device-id") == 0 &&
++ ippGetValueTag (attr) == IPP_TAG_TEXT)
++ ppd_device_id = (gchar *) ippGetString (attr, 0, NULL);
++ else if (g_strcmp0 (ippGetName (attr), "ppd-make-and-model") == 0 &&
++ ippGetValueTag (attr) == IPP_TAG_TEXT)
++ ppd_make_and_model = ippGetString (attr, 0, NULL);
++ else if (g_strcmp0 (ippGetName (attr), "ppd-name") == 0 &&
++ ippGetValueTag (attr) == IPP_TAG_NAME)
++ ppd_name = ippGetString (attr, 0, NULL);
++ else if (g_strcmp0 (ippGetName (attr), "ppd-product") == 0 &&
++ ippGetValueTag (attr) == IPP_TAG_TEXT)
++ ppd_product = ippGetString (attr, 0, NULL);
++
++ attr = ippNextAttribute (response);
+ }
+
+ if (ppd_device_id && ppd_name)
+@@ -1009,15 +1040,15 @@ DBus method \"GetBestDrivers\". Using fallback solution for now.");
+ response = cupsDoRequest (http, request, "/");
+
+ if (response &&
+- response->request.status.status_code <= IPP_OK_CONFLICT)
++ ippGetStatusCode (response) <= IPP_OK_CONFLICT)
+ {
+ for (i = 0; equivalents && equivalents[i]; i++)
+ {
+ eq_normalized = normalize (equivalents[i]);
+- for (attr = response->attrs; attr != NULL; attr = attr->next)
++ for (attr = ippFirstAttribute (response); attr != NULL; attr = ippNextAttribute (response))
+ {
+- while (attr != NULL && attr->group_tag != IPP_TAG_PRINTER)
+- attr = attr->next;
++ while (attr != NULL && ippGetGroupTag (attr) != IPP_TAG_PRINTER)
++ attr = ippNextAttribute (response);
+
+ if (attr == NULL)
+ break;
+@@ -1027,22 +1058,22 @@ DBus method \"GetBestDrivers\". Using fallback solution for now.");
+ ppd_name = NULL;
+ ppd_product = NULL;
+
+- while (attr != NULL && attr->group_tag == IPP_TAG_PRINTER)
++ while (attr != NULL && ippGetGroupTag (attr) == IPP_TAG_PRINTER)
+ {
+- if (g_strcmp0 (attr->name, "ppd-device-id") == 0 &&
+- attr->value_tag == IPP_TAG_TEXT)
+- ppd_device_id = attr->values[0].string.text;
+- else if (g_strcmp0 (attr->name, "ppd-make-and-model") == 0 &&
+- attr->value_tag == IPP_TAG_TEXT)
+- ppd_make_and_model = attr->values[0].string.text;
+- else if (g_strcmp0 (attr->name, "ppd-name") == 0 &&
+- attr->value_tag == IPP_TAG_NAME)
+- ppd_name = attr->values[0].string.text;
+- else if (g_strcmp0 (attr->name, "ppd-product") == 0 &&
+- attr->value_tag == IPP_TAG_TEXT)
+- ppd_product = attr->values[0].string.text;
+-
+- attr = attr->next;
++ if (g_strcmp0 (ippGetName (attr), "ppd-device-id") == 0 &&
++ ippGetValueTag (attr) == IPP_TAG_TEXT)
++ ppd_device_id = ippGetString (attr, 0, NULL);
++ else if (g_strcmp0 (ippGetName (attr), "ppd-make-and-model") == 0 &&
++ ippGetValueTag (attr) == IPP_TAG_TEXT)
++ ppd_make_and_model = ippGetString (attr, 0, NULL);
++ else if (g_strcmp0 (ippGetName (attr), "ppd-name") == 0 &&
++ ippGetValueTag (attr) == IPP_TAG_NAME)
++ ppd_name = ippGetString (attr, 0, NULL);
++ else if (g_strcmp0 (ippGetName (attr), "ppd-product") == 0 &&
++ ippGetValueTag (attr) == IPP_TAG_TEXT)
++ ppd_product = ippGetString (attr, 0, NULL);
++
++ attr = ippNextAttribute (response);
+ }
+
+ if (ppd_device_id && ppd_name)
+@@ -1352,23 +1383,23 @@ ccGetAllowedUsers (gchar ***allowed_users, const char *printer_name)
+ ipp_attribute_t *attr = NULL;
+ ipp_attribute_t *allowed = NULL;
+
+- for (attr = response->attrs; attr != NULL; attr = attr->next)
++ for (attr = ippFirstAttribute (response); attr != NULL; attr = ippNextAttribute (response))
+ {
+- if (attr->group_tag == IPP_TAG_PRINTER &&
+- attr->value_tag == IPP_TAG_NAME &&
+- !g_strcmp0 (attr->name, "requesting-user-name-allowed"))
++ if (ippGetGroupTag (attr) == IPP_TAG_PRINTER &&
++ ippGetValueTag (attr) == IPP_TAG_NAME &&
++ !g_strcmp0 (ippGetName (attr), "requesting-user-name-allowed"))
+ allowed = attr;
+ }
+
+- if (allowed && allowed->num_values > 0)
++ if (allowed && ippGetCount (allowed) > 0)
+ {
+ int i;
+
+- num_allowed_users = allowed->num_values;
++ num_allowed_users = ippGetCount (allowed);
+ users = g_new (gchar*, num_allowed_users);
+
+ for (i = 0; i < num_allowed_users; i ++)
+- users[i] = g_strdup (allowed->values[i].string.text);
++ users[i] = g_strdup (ippGetString (allowed, i, NULL));
+ }
+ ippDelete(response);
+ }
+@@ -1454,12 +1485,12 @@ renew_cups_subscription (gint id,
+ "notify-lease-duration", lease_duration);
+ response = cupsDoRequest (http, request, "/");
+ if (response != NULL &&
+- response->request.status.status_code <= IPP_OK_CONFLICT) {
++ ippGetStatusCode (response) <= IPP_OK_CONFLICT) {
+ if ((attr = ippFindAttribute (response, "notify-lease-duration",
+ IPP_TAG_INTEGER)) == NULL)
+ g_debug ("No notify-lease-duration in response!\n");
+ else
+- if (attr->values[0].integer == lease_duration)
++ if (ippGetInteger (attr, 0) == lease_duration)
+ result = id;
+ }
+ }
+@@ -1481,12 +1512,12 @@ renew_cups_subscription (gint id,
+ response = cupsDoRequest (http, request, "/");
+
+ if (response != NULL &&
+- response->request.status.status_code <= IPP_OK_CONFLICT) {
++ ippGetStatusCode (response) <= IPP_OK_CONFLICT) {
+ if ((attr = ippFindAttribute (response, "notify-subscription-id",
+ IPP_TAG_INTEGER)) == NULL)
+ g_debug ("No notify-subscription-id in response!\n");
+ else
+- result = attr->values[0].integer;
++ result = ippGetInteger (attr, 0);
+ }
+ }
+
+@@ -1655,38 +1686,38 @@ printer_rename (const gchar *old_name,
+
+ if (response)
+ {
+- if (response->request.status.status_code <= IPP_OK_CONFLICT)
++ if (ippGetStatusCode (response) <= IPP_OK_CONFLICT)
+ {
+ attr = ippFindAttribute (response, "printer-error-policy", IPP_TAG_NAME);
+ if (attr)
+- error_policy = g_strdup (attr->values[0].string.text);
++ error_policy = g_strdup (ippGetString (attr, 0, NULL));
+
+ attr = ippFindAttribute (response, "printer-op-policy", IPP_TAG_NAME);
+ if (attr)
+- op_policy = g_strdup (attr->values[0].string.text);
++ op_policy = g_strdup (ippGetString (attr, 0, NULL));
+
+ attr = ippFindAttribute (response, "requesting-user-name-allowed", IPP_TAG_NAME);
+- if (attr && attr->num_values > 0)
++ if (attr && ippGetCount (attr) > 0)
+ {
+- users_allowed = g_new0 (gchar *, attr->num_values + 1);
+- for (i = 0; i < attr->num_values; i++)
+- users_allowed[i] = g_strdup (attr->values[i].string.text);
++ users_allowed = g_new0 (gchar *, ippGetCount (attr) + 1);
++ for (i = 0; i < ippGetCount (attr); i++)
++ users_allowed[i] = g_strdup (ippGetString (attr, i, NULL));
+ }
+
+ attr = ippFindAttribute (response, "requesting-user-name-denied", IPP_TAG_NAME);
+- if (attr && attr->num_values > 0)
++ if (attr && ippGetCount (attr) > 0)
+ {
+- users_denied = g_new0 (gchar *, attr->num_values + 1);
+- for (i = 0; i < attr->num_values; i++)
+- users_denied[i] = g_strdup (attr->values[i].string.text);
++ users_denied = g_new0 (gchar *, ippGetCount (attr) + 1);
++ for (i = 0; i < ippGetCount (attr); i++)
++ users_denied[i] = g_strdup (ippGetString (attr, i, NULL));
+ }
+
+ attr = ippFindAttribute (response, "member-names", IPP_TAG_NAME);
+- if (attr && attr->num_values > 0)
++ if (attr && ippGetCount (attr) > 0)
+ {
+- member_names = g_new0 (gchar *, attr->num_values + 1);
+- for (i = 0; i < attr->num_values; i++)
+- member_names[i] = g_strdup (attr->values[i].string.text);
++ member_names = g_new0 (gchar *, ippGetCount (attr) + 1);
++ for (i = 0; i < ippGetCount (attr); i++)
++ member_names[i] = g_strdup (ippGetString (attr, i, NULL));
+ }
+ }
+ ippDelete (response);
+--
+1.7.10.4
+
diff --git a/gnome-base/gnome-control-center/gnome-control-center-3.2.2.ebuild b/gnome-base/gnome-control-center/gnome-control-center-3.2.2.ebuild
deleted file mode 100644
index bd9c922be438..000000000000
--- a/gnome-base/gnome-control-center/gnome-control-center-3.2.2.ebuild
+++ /dev/null
@@ -1,114 +0,0 @@
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/gnome-base/gnome-control-center/gnome-control-center-3.2.2.ebuild,v 1.7 2012/05/21 18:51:38 tetromino Exp $
-
-EAPI="4"
-GCONF_DEBUG="yes"
-GNOME2_LA_PUNT="yes" # gmodule is used, which uses dlopen
-
-inherit autotools eutils gnome2
-
-DESCRIPTION="GNOME Desktop Configuration Tool"
-HOMEPAGE="http://www.gnome.org/"
-
-LICENSE="GPL-2"
-SLOT="2"
-IUSE="+cheese +colord +cups +networkmanager +socialweb"
-KEYWORDS="~amd64 ~x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~x86-solaris"
-
-# XXX: gnome-desktop-2.91.5 is needed for upstream commit c67f7efb
-# XXX: NetworkManager-0.9 support is automagic, make hard-dep once it's released
-#
-# gnome-session-2.91.6-r1 is needed so that 10-user-dirs-update is run at login
-# Latest gsettings-desktop-schemas is neededfor commit 73f9bffb
-# gnome-settings-daemon-3.1.4 is needed for power panel (commit 4f08a325)
-# g-s-d[policykit] needed for bug #403527
-COMMON_DEPEND="
- >=dev-libs/glib-2.29.14:2
- >=x11-libs/gdk-pixbuf-2.23.0:2
- >=x11-libs/gtk+-3.1.19:3
- >=gnome-base/gsettings-desktop-schemas-3.0.2
- >=gnome-base/gconf-2.0:2
- >=dev-libs/dbus-glib-0.73
- >=gnome-base/gnome-desktop-3.1.0:3
- >=gnome-base/gnome-settings-daemon-3.1.4[colord(+)?,policykit]
- >=gnome-base/libgnomekbd-2.91.91
-
- app-text/iso-codes
- dev-libs/libxml2:2
- gnome-base/gnome-menus:3
- gnome-base/libgtop:2
- media-libs/fontconfig
- net-libs/gnome-online-accounts
-
- >=media-libs/libcanberra-0.13[gtk3]
- >=media-sound/pulseaudio-0.9.16[glib]
- >=sys-auth/polkit-0.97
- >=sys-power/upower-0.9.1
- >=x11-libs/libnotify-0.7.3
-
- x11-apps/xmodmap
- x11-libs/libX11
- x11-libs/libXxf86misc
- >=x11-libs/libxklavier-5.1
- >=x11-libs/libXi-1.2
-
- cheese? (
- media-libs/gstreamer:0.10
- >=media-video/cheese-2.91.91.1 )
- colord? ( >=x11-misc/colord-0.1.8 )
- cups? ( >=net-print/cups-1.4[dbus] )
- networkmanager? (
- >=gnome-extra/nm-applet-0.9.1.90
- >=net-misc/networkmanager-0.8.997 )
- socialweb? ( net-libs/libsocialweb )"
-# <gnome-color-manager-3.1.2 has file collisions with g-c-c-3.1.x
-RDEPEND="${COMMON_DEPEND}
- app-admin/apg
- sys-apps/accountsservice
- x11-themes/gnome-icon-theme-symbolic
- cups? ( net-print/cups-pk-helper )
-
- !<gnome-base/gdm-2.91.94
- !<gnome-extra/gnome-color-manager-3.1.2
- !gnome-extra/gnome-media[pulseaudio]
- !<gnome-extra/gnome-media-2.32.0-r300"
-# PDEPEND to avoid circular dependency
-PDEPEND=">=gnome-base/gnome-session-2.91.6-r1"
-DEPEND="${COMMON_DEPEND}
- x11-proto/xproto
- x11-proto/xf86miscproto
- x11-proto/kbproto
-
- >=sys-devel/gettext-0.17
- >=dev-util/intltool-0.40.1
- virtual/pkgconfig
-
- app-text/scrollkeeper
- >=app-text/gnome-doc-utils-0.10.1
-
- cups? ( sys-apps/sed )"
-# Needed for autoreconf
-# gnome-base/gnome-common
-
-pkg_setup() {
- G2CONF="${G2CONF}
- --disable-update-mimedb
- --disable-static
- $(use_with cheese)
- $(use_enable colord color)
- $(use_enable cups)
- $(use_with socialweb libsocialweb)"
- DOCS="AUTHORS ChangeLog NEWS README TODO"
-}
-
-src_prepare() {
- # Upstream patch to not crash on missing metacity; will be in next release
- epatch "${FILESDIR}/${P}-metacity-gconf.patch"
-
- # Make colord plugin optional; requires eautoreconf
- epatch "${FILESDIR}/${PN}-3.2.1-optional-colord.patch"
- eautoreconf
-
- gnome2_src_prepare
-}
diff --git a/gnome-base/gnome-control-center/gnome-control-center-3.2.3.ebuild b/gnome-base/gnome-control-center/gnome-control-center-3.2.3.ebuild
index 38e903aed2e7..8039c44c3dbb 100644
--- a/gnome-base/gnome-control-center/gnome-control-center-3.2.3.ebuild
+++ b/gnome-base/gnome-control-center/gnome-control-center-3.2.3.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/gnome-base/gnome-control-center/gnome-control-center-3.2.3.ebuild,v 1.2 2012/05/27 23:14:36 mattst88 Exp $
+# $Header: /var/cvsroot/gentoo-x86/gnome-base/gnome-control-center/gnome-control-center-3.2.3.ebuild,v 1.3 2012/08/07 10:18:15 tetromino Exp $
EAPI="4"
GCONF_DEBUG="yes"
@@ -111,6 +111,10 @@ src_prepare() {
# Make some panels optional; requires eautoreconf
epatch "${FILESDIR}/${PN}-3.2.3-optional-colord-goa.patch"
+
+ # https://bugzilla.gnome.org/show_bug.cgi?id=679759
+ epatch "${FILESDIR}/${PN}-3.2.3-cups-1.6.patch"
+
eautoreconf
gnome2_src_prepare
diff --git a/gnome-base/gnome-control-center/gnome-control-center-3.4.2-r1.ebuild b/gnome-base/gnome-control-center/gnome-control-center-3.4.2-r1.ebuild
index a61fd5dfdb11..dbdec6b9b848 100644
--- a/gnome-base/gnome-control-center/gnome-control-center-3.4.2-r1.ebuild
+++ b/gnome-base/gnome-control-center/gnome-control-center-3.4.2-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/gnome-base/gnome-control-center/gnome-control-center-3.4.2-r1.ebuild,v 1.1 2012/07/19 02:46:04 tetromino Exp $
+# $Header: /var/cvsroot/gentoo-x86/gnome-base/gnome-control-center/gnome-control-center-3.4.2-r1.ebuild,v 1.2 2012/08/07 10:18:15 tetromino Exp $
EAPI="4"
GCONF_DEBUG="yes"
@@ -121,6 +121,8 @@ src_prepare() {
epatch "${FILESDIR}/${PN}-3.4.2-optional-bt-colord-goa-wacom.patch"
# Fix some absolute paths to be appropriate for Gentoo
epatch "${FILESDIR}/${PN}-3.4.2-gentoo-paths.patch"
+ # https://bugzilla.gnome.org/show_bug.cgi?id=679759
+ epatch "${FILESDIR}/${PN}-3.4.2-cups-1.6.patch"
eautoreconf
gnome2_src_prepare