From 7ed4fc4343758840dd49b8c05352eae1a0a688e4 Mon Sep 17 00:00:00 2001 From: Samuli Suominen Date: Sat, 5 Feb 2011 12:20:11 +0000 Subject: Fix building with x11-libs/libnotify >= 0.7. (Portage version: 2.2.0_alpha19/cvs/Linux x86_64) --- gnome-extra/nm-applet/ChangeLog | 6 +++- .../files/nm-applet-0.8.2-libnotify-0.7.patch | 36 ++++++++++++++++++++++ gnome-extra/nm-applet/nm-applet-0.8.2.ebuild | 19 +++++++----- 3 files changed, 52 insertions(+), 9 deletions(-) create mode 100644 gnome-extra/nm-applet/files/nm-applet-0.8.2-libnotify-0.7.patch diff --git a/gnome-extra/nm-applet/ChangeLog b/gnome-extra/nm-applet/ChangeLog index b4dac250cc2f..bdbdb2d32714 100644 --- a/gnome-extra/nm-applet/ChangeLog +++ b/gnome-extra/nm-applet/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for gnome-extra/nm-applet # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/gnome-extra/nm-applet/ChangeLog,v 1.57 2011/01/26 15:50:10 ssuominen Exp $ +# $Header: /var/cvsroot/gentoo-x86/gnome-extra/nm-applet/ChangeLog,v 1.58 2011/02/05 12:20:10 ssuominen Exp $ + + 05 Feb 2011; Samuli Suominen nm-applet-0.8.2.ebuild, + +files/nm-applet-0.8.2-libnotify-0.7.patch: + Fix building with x11-libs/libnotify >= 0.7. 26 Jan 2011; Samuli Suominen nm-applet-0.8.2.ebuild: Remove too strict notification area and policykit authentication agent diff --git a/gnome-extra/nm-applet/files/nm-applet-0.8.2-libnotify-0.7.patch b/gnome-extra/nm-applet/files/nm-applet-0.8.2-libnotify-0.7.patch new file mode 100644 index 000000000000..54aa473af98a --- /dev/null +++ b/gnome-extra/nm-applet/files/nm-applet-0.8.2-libnotify-0.7.patch @@ -0,0 +1,36 @@ +--- src/applet.c ++++ src/applet.c +@@ -58,6 +58,10 @@ + #include + #include + ++#ifndef NOTIFY_CHECK_VERSION ++#define NOTIFY_CHECK_VERSION(x,y,z) 0 ++#endif ++ + #include "applet.h" + #include "applet-device-wired.h" + #include "applet-device-wifi.h" +@@ -626,12 +630,20 @@ + escaped = utils_escape_notify_message (message); + notify = notify_notification_new (summary, + escaped, +- icon ? icon : GTK_STOCK_NETWORK, +- NULL); ++ icon ? icon : GTK_STOCK_NETWORK ++#if NOTIFY_CHECK_VERSION (0, 7, 0) ++ ); ++#else ++ , NULL); ++#endif + g_free (escaped); + applet->notification = notify; + ++#if NOTIFY_CHECK_VERSION (0, 7, 0) ++ /* notify_notification_attach_to_status_icon was removed */ ++#else + notify_notification_attach_to_status_icon (notify, applet->status_icon); ++#endif + notify_notification_set_urgency (notify, urgency); + notify_notification_set_timeout (notify, NOTIFY_EXPIRES_DEFAULT); + diff --git a/gnome-extra/nm-applet/nm-applet-0.8.2.ebuild b/gnome-extra/nm-applet/nm-applet-0.8.2.ebuild index 1093935619d4..7c9bfb06b2e4 100644 --- a/gnome-extra/nm-applet/nm-applet-0.8.2.ebuild +++ b/gnome-extra/nm-applet/nm-applet-0.8.2.ebuild @@ -1,10 +1,9 @@ # Copyright 1999-2011 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.2.ebuild,v 1.3 2011/01/26 15:41:42 ssuominen Exp $ +# $Header: /var/cvsroot/gentoo-x86/gnome-extra/nm-applet/nm-applet-0.8.2.ebuild,v 1.4 2011/02/05 12:20:10 ssuominen Exp $ -EAPI="2" - -inherit gnome2 eutils +EAPI=2 +inherit eutils gnome2 MY_PN="${PN/nm-applet/network-manager-applet}" @@ -39,13 +38,17 @@ DEPEND="${RDEPEND} dev-util/pkgconfig >=dev-util/intltool-0.35" -DOCS="AUTHORS ChangeLog NEWS README" -# USE_DESTDIR="1" - -S="${WORKDIR}/${MY_PN}-${PV}" +S=${WORKDIR}/${MY_PN}-${PV} pkg_setup () { G2CONF="${G2CONF} --disable-more-warnings --localstatedir=/var" + + DOCS="AUTHORS ChangeLog NEWS README" +} + +src_prepare() { + epatch "${FILESDIR}"/${P}-libnotify-0.7.patch + gnome2_src_prepare } -- cgit v1.2.3-65-gdbad