From 406904c59651f134fa122efa84d3ea838af0c542 Mon Sep 17 00:00:00 2001 From: Robert Piasek Date: Wed, 18 Aug 2010 09:18:52 +0000 Subject: Fixes compilation with DGSEAL_ENABLE gentoo bug #330363 (Portage version: 2.1.8.3/cvs/Linux x86_64) --- gnome-extra/nm-applet/ChangeLog | 9 +- ...-0.8.1-fix-compilation-with-DGSEAL_ENABLE.patch | 96 ++++++++++++++++++++++ gnome-extra/nm-applet/nm-applet-0.8.1-r1.ebuild | 58 +++++++++++++ gnome-extra/nm-applet/nm-applet-0.8.1.ebuild | 53 ------------ 4 files changed, 162 insertions(+), 54 deletions(-) create mode 100644 gnome-extra/nm-applet/files/nm-applet-0.8.1-fix-compilation-with-DGSEAL_ENABLE.patch create mode 100644 gnome-extra/nm-applet/nm-applet-0.8.1-r1.ebuild delete mode 100644 gnome-extra/nm-applet/nm-applet-0.8.1.ebuild (limited to 'gnome-extra') diff --git a/gnome-extra/nm-applet/ChangeLog b/gnome-extra/nm-applet/ChangeLog index f302ff70e056..d812293b18db 100644 --- a/gnome-extra/nm-applet/ChangeLog +++ b/gnome-extra/nm-applet/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for gnome-extra/nm-applet # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/gnome-extra/nm-applet/ChangeLog,v 1.46 2010/08/13 07:16:39 fauli Exp $ +# $Header: /var/cvsroot/gentoo-x86/gnome-extra/nm-applet/ChangeLog,v 1.47 2010/08/18 09:18:52 dagger Exp $ + +*nm-applet-0.8.1-r1 (18 Aug 2010) + + 18 Aug 2010; Robert Piasek -nm-applet-0.8.1.ebuild, + +nm-applet-0.8.1-r1.ebuild, + +files/nm-applet-0.8.1-fix-compilation-with-DGSEAL_ENABLE.patch: + Fixes compilation with DGSEAL_ENABLE gentoo bug #330363 13 Aug 2010; Christian Faulhammer nm-applet-0.8.ebuild: stable x86, bug 321593 diff --git a/gnome-extra/nm-applet/files/nm-applet-0.8.1-fix-compilation-with-DGSEAL_ENABLE.patch b/gnome-extra/nm-applet/files/nm-applet-0.8.1-fix-compilation-with-DGSEAL_ENABLE.patch new file mode 100644 index 000000000000..d4317d6f186e --- /dev/null +++ b/gnome-extra/nm-applet/files/nm-applet-0.8.1-fix-compilation-with-DGSEAL_ENABLE.patch @@ -0,0 +1,96 @@ +From 0e85376c5e7512225023918461881cb13aea22f3 Mon Sep 17 00:00:00 2001 +From: Mirsal Ennaime +Date: Mon, 02 Aug 2010 22:19:35 +0000 +Subject: applet: fix compilation with -DGSEAL_ENABLE (bgo #615653) + +This patch substitutes all direct access to Gtk+ object fields +with accessor functions in order to fulfill the UseGseal goal +as described at http://live.gnome.org/GnomeGoals/UseGseal + +It also requires to bump the required Gtk+ version to 2.18 +--- +diff --git a/configure.ac b/configure.ac +index 5871561..e11aa21 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -72,7 +72,7 @@ PKG_CHECK_MODULES(NMA, + libnm-glib >= 0.8.1 + libnm-util >= 0.8.1 + libnm-glib-vpn >= 0.8.1 +- gtk+-2.0 >= 2.14 ++ gtk+-2.0 >= 2.18 + libglade-2.0 + gmodule-export-2.0 + gconf-2.0 +diff --git a/src/applet.c b/src/applet.c +index 2734045..d7ab47f 100644 +--- a/src/applet.c ++++ b/src/applet.c +@@ -482,6 +482,7 @@ applet_new_menu_item_helper (NMConnection *connection, + static gboolean + menu_title_item_expose (GtkWidget *widget, GdkEventExpose *event) + { ++ GtkAllocation allocation; + GtkStyle *style; + GtkWidget *label; + PangoFontDescription *desc; +@@ -509,7 +510,8 @@ menu_title_item_expose (GtkWidget *widget, GdkEventExpose *event) + /* We also need to reposition the cairo context so that (0, 0) is the + * top-left of where we're supposed to start drawing. + */ +- cairo_translate (cr, widget->allocation.x, widget->allocation.y); ++ gtk_widget_get_allocation (widget, &allocation); ++ cairo_translate (cr, allocation.x, allocation.y); + + text = gtk_label_get_text (GTK_LABEL (label)); + +diff --git a/src/utils/nma-bling-spinner.c b/src/utils/nma-bling-spinner.c +index 5522046..ceecaf8 100644 +--- a/src/utils/nma-bling-spinner.c ++++ b/src/utils/nma-bling-spinner.c +@@ -71,26 +71,23 @@ draw (GtkWidget *widget, cairo_t *cr) + double radius; + double half; + int i; +- int width, height; + ++ GtkAllocation allocation; + NmaBlingSpinnerPrivate *priv; + + priv = NMA_BLING_SPINNER_GET_PRIVATE (widget); + + cairo_set_operator (cr, CAIRO_OPERATOR_OVER); + +- width = widget->allocation.width; +- height = widget->allocation.height; +- +- if ( (width < 12) || (height <12) ) ++ gtk_widget_get_allocation (widget, &allocation); ++ if ((allocation.width < 12) || (allocation.height < 12)) + gtk_widget_set_size_request(widget, 12, 12); + +- //x = widget->allocation.x + widget->allocation.width / 2; +- //y = widget->allocation.y + widget->allocation.height / 2; +- x = widget->allocation.width / 2; +- y = widget->allocation.height / 2; +- radius = MIN (widget->allocation.width / 2, +- widget->allocation.height / 2); ++ //x = allocation.x + allocation.width / 2; ++ //y = allocation.y + allocation.height / 2; ++ x = allocation.width / 2; ++ y = allocation.height / 2; ++ radius = MIN (allocation.width / 2, allocation.height / 2); + half = priv->lines / 2; + + /*FIXME: render in B&W for non transparency */ +@@ -154,7 +151,7 @@ nma_bling_spinner_init (NmaBlingSpinner *spinner) + priv->current = 0; + priv->timeout = 0; + +- GTK_WIDGET_SET_FLAGS (GTK_WIDGET (spinner), GTK_NO_WINDOW); ++ gtk_widget_set_has_window (GTK_WIDGET (spinner), FALSE); + } + + static gboolean +-- +cgit v0.8.3.1 diff --git a/gnome-extra/nm-applet/nm-applet-0.8.1-r1.ebuild b/gnome-extra/nm-applet/nm-applet-0.8.1-r1.ebuild new file mode 100644 index 000000000000..b9d8ccba96f0 --- /dev/null +++ b/gnome-extra/nm-applet/nm-applet-0.8.1-r1.ebuild @@ -0,0 +1,58 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/gnome-extra/nm-applet/nm-applet-0.8.1-r1.ebuild,v 1.1 2010/08/18 09:18:52 dagger Exp $ + +EAPI="2" + +inherit gnome2 eutils + +MY_PN="${PN/nm-applet/network-manager-applet}" + +DESCRIPTION="Gnome applet for NetworkManager." +HOMEPAGE="http://projects.gnome.org/NetworkManager/" +SRC_URI="${SRC_URI//${PN}/${MY_PN}}" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="bluetooth" + +# FIXME: bluetooth is automagic +# XXX: depend on dbus-1.2.6 when it goes stable +RDEPEND=">=dev-libs/glib-2.16 + >=dev-libs/dbus-glib-0.74 + >=sys-apps/dbus-1.2 + >=x11-libs/gtk+-2.18 + >=gnome-base/gconf-2.20 + >=gnome-extra/polkit-gnome-0.92 + >=x11-libs/libnotify-0.4.3 + >=gnome-base/libglade-2 + >=gnome-base/gnome-keyring-2.20 + + >=dev-libs/libnl-1.1 + >=net-misc/networkmanager-${PV} + >=net-wireless/wireless-tools-28_pre9 + >=net-wireless/wpa_supplicant-0.5.7 + || ( >=gnome-base/gnome-panel-2 xfce-base/xfce4-panel x11-misc/trayer ) + net-misc/mobile-broadband-provider-info + bluetooth? ( >=net-wireless/gnome-bluetooth-2.27.6 )" + +DEPEND="${RDEPEND} + dev-util/pkgconfig + >=dev-util/intltool-0.35" + +DOCS="AUTHORS ChangeLog NEWS README" +# USE_DESTDIR="1" + +src_prepare() { + # Fix compilation with DGSEAL_ENABLE gentoo bug #330363 + epatch "${FILESDIR}/${P}-fix-compilation-with-DGSEAL_ENABLE.patch" +} + +S="${WORKDIR}/${MY_PN}-${PV}" + +pkg_setup () { + G2CONF="${G2CONF} + --disable-more-warnings + --localstatedir=/var" +} diff --git a/gnome-extra/nm-applet/nm-applet-0.8.1.ebuild b/gnome-extra/nm-applet/nm-applet-0.8.1.ebuild deleted file mode 100644 index ecc914a22544..000000000000 --- a/gnome-extra/nm-applet/nm-applet-0.8.1.ebuild +++ /dev/null @@ -1,53 +0,0 @@ -# Copyright 1999-2010 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/gnome-extra/nm-applet/nm-applet-0.8.1.ebuild,v 1.1 2010/07/28 09:49:58 dagger Exp $ - -EAPI="2" - -inherit gnome2 eutils - -MY_PN="${PN/nm-applet/network-manager-applet}" - -DESCRIPTION="Gnome applet for NetworkManager." -HOMEPAGE="http://projects.gnome.org/NetworkManager/" -SRC_URI="${SRC_URI//${PN}/${MY_PN}}" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~ppc ~x86" -IUSE="bluetooth" - -# FIXME: bluetooth is automagic -# XXX: depend on dbus-1.2.6 when it goes stable -RDEPEND=">=dev-libs/glib-2.16 - >=dev-libs/dbus-glib-0.74 - >=sys-apps/dbus-1.2 - >=x11-libs/gtk+-2.14 - >=gnome-base/gconf-2.20 - >=gnome-extra/polkit-gnome-0.92 - >=x11-libs/libnotify-0.4.3 - >=gnome-base/libglade-2 - >=gnome-base/gnome-keyring-2.20 - - >=dev-libs/libnl-1.1 - >=net-misc/networkmanager-${PV} - >=net-wireless/wireless-tools-28_pre9 - >=net-wireless/wpa_supplicant-0.5.7 - || ( >=gnome-base/gnome-panel-2 xfce-base/xfce4-panel x11-misc/trayer ) - net-misc/mobile-broadband-provider-info - bluetooth? ( >=net-wireless/gnome-bluetooth-2.27.6 )" - -DEPEND="${RDEPEND} - dev-util/pkgconfig - >=dev-util/intltool-0.35" - -DOCS="AUTHORS ChangeLog NEWS README" -# USE_DESTDIR="1" - -S="${WORKDIR}/${MY_PN}-${PV}" - -pkg_setup () { - G2CONF="${G2CONF} - --disable-more-warnings - --localstatedir=/var" -} -- cgit v1.2.3-65-gdbad