diff options
author | Alexandre Rostovtsev <tetromino@gentoo.org> | 2012-08-07 08:59:55 +0000 |
---|---|---|
committer | Alexandre Rostovtsev <tetromino@gentoo.org> | 2012-08-07 08:59:55 +0000 |
commit | 54a44a52d75a7fbcf25c05529bf6815262af10d0 (patch) | |
tree | d8076f4cdc38804ebb630eeb5beee4ea43466315 /gnome-base | |
parent | Remove old. (diff) | |
download | gentoo-2-54a44a52d75a7fbcf25c05529bf6815262af10d0.tar.gz gentoo-2-54a44a52d75a7fbcf25c05529bf6815262af10d0.tar.bz2 gentoo-2-54a44a52d75a7fbcf25c05529bf6815262af10d0.zip |
Fix building with cups-1.6.x (bug #428816, thanks to Diego Elio Pettenò and Michel Wendrich). Drop old.
(Portage version: 2.2.0_alpha120/cvs/Linux x86_64)
Diffstat (limited to 'gnome-base')
5 files changed, 113 insertions, 125 deletions
diff --git a/gnome-base/gnome-settings-daemon/ChangeLog b/gnome-base/gnome-settings-daemon/ChangeLog index f790620d0b86..bba81128630d 100644 --- a/gnome-base/gnome-settings-daemon/ChangeLog +++ b/gnome-base/gnome-settings-daemon/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for gnome-base/gnome-settings-daemon # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/gnome-base/gnome-settings-daemon/ChangeLog,v 1.106 2012/05/27 17:56:06 mattst88 Exp $ +# $Header: /var/cvsroot/gentoo-x86/gnome-base/gnome-settings-daemon/ChangeLog,v 1.107 2012/08/07 08:59:55 tetromino Exp $ + + 07 Aug 2012; Alexandre Rostovtsev <tetromino@gentoo.org> + gnome-settings-daemon-3.2.3.ebuild, -gnome-settings-daemon-3.4.1.ebuild, + gnome-settings-daemon-3.4.2.ebuild, + +files/gnome-settings-daemon-3.4.2-cups-1.6.patch: + Fix building with cups-1.6.x (bug #428816, thanks to Diego Elio Pettenò and + Michel Wendrich). Drop old. 27 May 2012; Matt Turner <mattst88@gentoo.org> gnome-settings-daemon-3.2.3.ebuild: diff --git a/gnome-base/gnome-settings-daemon/files/gnome-settings-daemon-3.4.2-cups-1.6.patch b/gnome-base/gnome-settings-daemon/files/gnome-settings-daemon-3.4.2-cups-1.6.patch new file mode 100644 index 000000000000..b73fa08e0596 --- /dev/null +++ b/gnome-base/gnome-settings-daemon/files/gnome-settings-daemon-3.4.2-cups-1.6.patch @@ -0,0 +1,97 @@ +From 2cc8d6f3917b8480036a24db52f9717db5b31736 Mon Sep 17 00:00:00 2001 +From: Jiri Popelka <jpopelka@redhat.com> +Date: Wed, 11 Jul 2012 18:17:12 +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. +--- + .../gsd-print-notifications-manager.c | 18 ++++++++++++++---- + plugins/print-notifications/gsd-printer.c | 10 +++++++++- + 2 files changed, 23 insertions(+), 5 deletions(-) + +diff --git a/plugins/print-notifications/gsd-print-notifications-manager.c b/plugins/print-notifications/gsd-print-notifications-manager.c +index 0092865..482a528 100644 +--- a/plugins/print-notifications/gsd-print-notifications-manager.c ++++ b/plugins/print-notifications/gsd-print-notifications-manager.c +@@ -53,6 +53,16 @@ + #define REASON_TIMEOUT 15000 + #define CUPS_CONNECTION_TEST_INTERVAL 300 + ++#if (CUPS_VERSION_MAJOR > 1) || (CUPS_VERSION_MINOR > 5) ++#define HAVE_CUPS_1_6 1 ++#endif ++ ++#ifndef HAVE_CUPS_1_6 ++#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 ++#endif ++ + struct GsdPrintNotificationsManagerPrivate + { + GDBusConnection *cups_bus_connection; +@@ -398,10 +408,10 @@ on_cups_notification (GDBusConnection *connection, + response = cupsDoRequest (http, request, "/"); + + if (response) { +- if (response->request.status.status_code <= IPP_OK_CONFLICT && ++ if (ippGetStatusCode (response) <= IPP_OK_CONFLICT && + (attr = ippFindAttribute(response, "job-originating-user-name", + IPP_TAG_NAME))) { +- if (g_strcmp0 (attr->values[0].string.text, cupsUser ()) == 0) ++ if (g_strcmp0 (ippGetString (attr, 0, NULL), cupsUser ()) == 0) + my_job = TRUE; + } + ippDelete(response); +@@ -891,12 +901,12 @@ renew_subscription (gpointer data) + "notify-lease-duration", SUBSCRIPTION_DURATION); + response = cupsDoRequest (http, request, "/"); + +- if (response != NULL && response->request.status.status_code <= IPP_OK_CONFLICT) { ++ if (response != NULL && 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 +- manager->priv->subscription_id = attr->values[0].integer; ++ manager->priv->subscription_id = ippGetInteger (attr, 0); + } + + if (response) +diff --git a/plugins/print-notifications/gsd-printer.c b/plugins/print-notifications/gsd-printer.c +index 886f6ce..26dbb6d 100644 +--- a/plugins/print-notifications/gsd-printer.c ++++ b/plugins/print-notifications/gsd-printer.c +@@ -63,6 +63,14 @@ static GDBusNodeInfo *pdi_introspection_data = NULL; + #define GNOME_SESSION_PRESENCE_DBUS_PATH "/org/gnome/SessionManager/Presence" + #define GNOME_SESSION_PRESENCE_DBUS_IFACE "org.gnome.SessionManager.Presence" + ++#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 ++ + enum { + PRESENCE_STATUS_AVAILABLE = 0, + PRESENCE_STATUS_INVISIBLE, +@@ -725,7 +733,7 @@ printer_autoconfigure (gchar *printer_name) + "AutoConfigure", + ("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); + } +-- +1.7.10.4 + diff --git a/gnome-base/gnome-settings-daemon/gnome-settings-daemon-3.2.3.ebuild b/gnome-base/gnome-settings-daemon/gnome-settings-daemon-3.2.3.ebuild index c5414b1c081d..aca62323dd74 100644 --- a/gnome-base/gnome-settings-daemon/gnome-settings-daemon-3.2.3.ebuild +++ b/gnome-base/gnome-settings-daemon/gnome-settings-daemon-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-settings-daemon/gnome-settings-daemon-3.2.3.ebuild,v 1.3 2012/05/27 17:56:06 mattst88 Exp $ +# $Header: /var/cvsroot/gentoo-x86/gnome-base/gnome-settings-daemon/gnome-settings-daemon-3.2.3.ebuild,v 1.4 2012/08/07 08:59:55 tetromino Exp $ EAPI="4" GCONF_DEBUG="no" @@ -111,6 +111,9 @@ src_prepare() { # Make colord optional; requires eautoreconf epatch "${FILESDIR}/${PN}-3.2.1-optional-colord.patch" + # bug #428816, https://bugzilla.gnome.org/show_bug.cgi?id=679761 + epatch "${FILESDIR}/${PN}-3.4.2-cups-1.6.patch" + eautoreconf gnome2_src_prepare diff --git a/gnome-base/gnome-settings-daemon/gnome-settings-daemon-3.4.1.ebuild b/gnome-base/gnome-settings-daemon/gnome-settings-daemon-3.4.1.ebuild deleted file mode 100644 index 1371975b1b69..000000000000 --- a/gnome-base/gnome-settings-daemon/gnome-settings-daemon-3.4.1.ebuild +++ /dev/null @@ -1,122 +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-settings-daemon/gnome-settings-daemon-3.4.1.ebuild,v 1.2 2012/05/15 04:32:54 mr_bones_ Exp $ - -EAPI="4" -GCONF_DEBUG="no" -GNOME2_LA_PUNT="yes" - -inherit autotools eutils gnome2 virtualx - -DESCRIPTION="Gnome Settings Daemon" -HOMEPAGE="http://www.gnome.org" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~arm ~x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~x86-solaris" -IUSE="+colord +cups debug packagekit policykit +short-touchpad-timeout smartcard systemd +udev wacom" - -# colord-0.1.13 needed to avoid polkit errors in CreateProfile and CreateDevice -COMMON_DEPEND=" - >=dev-libs/glib-2.31.0:2 - >=x11-libs/gtk+-3.3.4:3 - >=gnome-base/libgnomekbd-2.91.1 - >=gnome-base/gnome-desktop-3.3.92:3 - >=gnome-base/gsettings-desktop-schemas-3.3.0 - media-fonts/cantarell - media-libs/fontconfig - >=media-libs/lcms-2.2:2 - media-libs/libcanberra[gtk3] - >=media-sound/pulseaudio-0.9.16 - >=sys-power/upower-0.9.11 - x11-libs/cairo - x11-libs/gdk-pixbuf:2 - >=x11-libs/libnotify-0.7.3 - x11-libs/libX11 - x11-libs/libXi - x11-libs/libXext - x11-libs/libXfixes - x11-libs/libXtst - x11-libs/libXxf86misc - >=x11-libs/libxklavier-5.0 - >=media-sound/pulseaudio-0.9.16 - - colord? ( >=x11-misc/colord-0.1.13 ) - cups? ( >=net-print/cups-1.4[dbus] ) - packagekit? ( - sys-fs/udev[gudev] - >=app-admin/packagekit-base-0.6.12 ) - smartcard? ( - sys-fs/udev[gudev] - >=dev-libs/nss-3.11.2 ) - systemd? ( >=sys-apps/systemd-31 ) - udev? ( sys-fs/udev[gudev] ) - wacom? ( >=dev-libs/libwacom-0.3 - x11-drivers/xf86-input-wacom )" -# Themes needed by g-s-d, gnome-shell, gtk+:3 apps to work properly -# <gnome-color-manager-3.1.1 has file collisions with g-s-d-3.1.x -# <gnome-power-manager-3.1.3 has file collisions with g-s-d-3.1.x -RDEPEND="${COMMON_DEPEND} - gnome-base/dconf - >=x11-themes/gnome-themes-standard-2.91 - >=x11-themes/gnome-icon-theme-2.91 - >=x11-themes/gnome-icon-theme-symbolic-2.91 - !<gnome-base/gnome-control-center-2.22 - !<gnome-extra/gnome-color-manager-3.1.1 - !<gnome-extra/gnome-power-manager-3.1.3 - - !systemd? ( sys-auth/consolekit )" -# xproto-7.0.15 needed for power plugin -DEPEND="${COMMON_DEPEND} - cups? ( sys-apps/sed ) - sys-devel/gettext - >=dev-util/intltool-0.40 - virtual/pkgconfig - x11-proto/inputproto - x11-proto/kbproto - x11-proto/xf86miscproto - >=x11-proto/xproto-7.0.15" - -pkg_setup() { - # README is empty - DOCS="AUTHORS NEWS ChangeLog MAINTAINERS" - G2CONF="${G2CONF} - --disable-static - --disable-schemas-compile - $(use_enable colord color) - $(use_enable cups) - $(use_enable debug) - $(use_enable debug more-warnings) - $(use_enable packagekit) - $(use_enable smartcard smartcard-support) - $(use_enable systemd) - $(use_enable udev gudev) - $(use_enable wacom)" -} - -src_prepare() { - # https://bugzilla.gnome.org/show_bug.cgi?id=621836 - # Apparently this change severely affects touchpad usability for some - # people, so revert it if USE=short-touchpad-timeout. - # Revisit if/when upstream adds a setting for customizing the timeout. - use short-touchpad-timeout && - epatch "${FILESDIR}/${PN}-3.0.2-short-touchpad-timeout.patch" - - # Make colord and wacom optional; requires eautoreconf - epatch "${FILESDIR}/${PN}-3.4.0-optional-color-wacom.patch" - - eautoreconf - - gnome2_src_prepare -} - -src_test() { - Xemake check -} - -src_install() { - gnome2_src_install - - echo 'GSETTINGS_BACKEND="dconf"' >> 51gsettings-dconf - doenvd 51gsettings-dconf -} diff --git a/gnome-base/gnome-settings-daemon/gnome-settings-daemon-3.4.2.ebuild b/gnome-base/gnome-settings-daemon/gnome-settings-daemon-3.4.2.ebuild index 760afcca7267..fc6d7553ed23 100644 --- a/gnome-base/gnome-settings-daemon/gnome-settings-daemon-3.4.2.ebuild +++ b/gnome-base/gnome-settings-daemon/gnome-settings-daemon-3.4.2.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-settings-daemon/gnome-settings-daemon-3.4.2.ebuild,v 1.1 2012/05/20 10:43:38 tetromino Exp $ +# $Header: /var/cvsroot/gentoo-x86/gnome-base/gnome-settings-daemon/gnome-settings-daemon-3.4.2.ebuild,v 1.2 2012/08/07 08:59:55 tetromino Exp $ EAPI="4" GCONF_DEBUG="no" @@ -109,6 +109,9 @@ src_prepare() { epatch "${FILESDIR}/${P}-double-unref.patch" epatch "${FILESDIR}/${P}-XI-2.2.patch" + # bug #428816, https://bugzilla.gnome.org/show_bug.cgi?id=679761 + epatch "${FILESDIR}/${PN}-3.4.2-cups-1.6.patch" + eautoreconf gnome2_src_prepare |