diff options
author | Daniel Drake <dsd@gentoo.org> | 2007-06-29 22:24:08 +0000 |
---|---|---|
committer | Daniel Drake <dsd@gentoo.org> | 2007-06-29 22:24:08 +0000 |
commit | cac17b4a88ecbc2812b7d1d18819b391cec6124b (patch) | |
tree | 5e3dc04df5ea0d56279ac15331b5fb8d7e062d99 /gnome-base/gnome-applets | |
parent | Version bump for epilicious localization fixes and translation updates (diff) | |
download | gentoo-2-cac17b4a88ecbc2812b7d1d18819b391cec6124b.tar.gz gentoo-2-cac17b4a88ecbc2812b7d1d18819b391cec6124b.tar.bz2 gentoo-2-cac17b4a88ecbc2812b7d1d18819b391cec6124b.zip |
Proper fix for 2.6.21 compatibility with CONFIG_ACPI_PROCFS=n (bug #176757)
(Portage version: 2.1.3_rc6)
Diffstat (limited to 'gnome-base/gnome-applets')
-rw-r--r-- | gnome-base/gnome-applets/ChangeLog | 12 | ||||
-rw-r--r-- | gnome-base/gnome-applets/files/digest-gnome-applets-2.16.2-r1 | 3 | ||||
-rw-r--r-- | gnome-base/gnome-applets/files/digest-gnome-applets-2.18.0-r2 (renamed from gnome-base/gnome-applets/files/digest-gnome-applets-2.18.0-r1) | 0 | ||||
-rw-r--r-- | gnome-base/gnome-applets/files/gnome-applets-2.18.0-acpi-procfs.patch | 137 | ||||
-rw-r--r-- | gnome-base/gnome-applets/files/gnome-applets-2.18.0-deprecated-acpi-info.patch | 38 | ||||
-rw-r--r-- | gnome-base/gnome-applets/gnome-applets-2.16.2-r1.ebuild | 102 | ||||
-rw-r--r-- | gnome-base/gnome-applets/gnome-applets-2.18.0-r2.ebuild (renamed from gnome-base/gnome-applets/gnome-applets-2.18.0-r1.ebuild) | 4 |
7 files changed, 255 insertions, 41 deletions
diff --git a/gnome-base/gnome-applets/ChangeLog b/gnome-base/gnome-applets/ChangeLog index 054684215bca..3a198d0a4ae1 100644 --- a/gnome-base/gnome-applets/ChangeLog +++ b/gnome-base/gnome-applets/ChangeLog @@ -1,6 +1,16 @@ # ChangeLog for gnome-base/gnome-applets # Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/gnome-base/gnome-applets/ChangeLog,v 1.214 2007/05/02 04:46:04 compnerd Exp $ +# $Header: /var/cvsroot/gentoo-x86/gnome-base/gnome-applets/ChangeLog,v 1.215 2007/06/29 22:24:08 dsd Exp $ + +*gnome-applets-2.18.0-r2 (29 Jun 2007) +*gnome-applets-2.16.2-r1 (29 Jun 2007) + + 29 Jun 2007; Daniel Drake <dsd@gentoo.org> + +files/gnome-applets-2.18.0-acpi-procfs.patch, + -files/gnome-applets-2.18.0-deprecated-acpi-info.patch, + +gnome-applets-2.16.2-r1.ebuild, -gnome-applets-2.18.0-r1.ebuild, + +gnome-applets-2.18.0-r2.ebuild: + Proper fix for 2.6.21 compatibility with CONFIG_ACPI_PROCFS=n (bug #176757) *gnome-applets-2.18.0-r1 (02 May 2007) diff --git a/gnome-base/gnome-applets/files/digest-gnome-applets-2.16.2-r1 b/gnome-base/gnome-applets/files/digest-gnome-applets-2.16.2-r1 new file mode 100644 index 000000000000..e21c4584808a --- /dev/null +++ b/gnome-base/gnome-applets/files/digest-gnome-applets-2.16.2-r1 @@ -0,0 +1,3 @@ +MD5 1a46b8557ff05ca75e7db6adb4dd6707 gnome-applets-2.16.2.tar.bz2 7127753 +RMD160 b8706c57b37702b0bfc64cb549fc594b05da5e5b gnome-applets-2.16.2.tar.bz2 7127753 +SHA256 de3c9d92c5da1597dbcdc5d4a7554235006d0bf6432f97ab7b0a6a5a47dbb67b gnome-applets-2.16.2.tar.bz2 7127753 diff --git a/gnome-base/gnome-applets/files/digest-gnome-applets-2.18.0-r1 b/gnome-base/gnome-applets/files/digest-gnome-applets-2.18.0-r2 index b08b91a64e0c..b08b91a64e0c 100644 --- a/gnome-base/gnome-applets/files/digest-gnome-applets-2.18.0-r1 +++ b/gnome-base/gnome-applets/files/digest-gnome-applets-2.18.0-r2 diff --git a/gnome-base/gnome-applets/files/gnome-applets-2.18.0-acpi-procfs.patch b/gnome-base/gnome-applets/files/gnome-applets-2.18.0-acpi-procfs.patch new file mode 100644 index 000000000000..3b02e15ce817 --- /dev/null +++ b/gnome-base/gnome-applets/files/gnome-applets-2.18.0-acpi-procfs.patch @@ -0,0 +1,137 @@ + +From: Daniel Drake <dsd@gentoo.org> + +2.6.21 compatibility fix (based on patch by Alan Swanson). Also improved error +passing/handling. (#427562) + +http://bugzilla.gnome.org/show_bug.cgi?id=427562 +https://bugs.gentoo.org/show_bug.cgi?id=176757 + +Index: battstat/acpi-linux.c +=================================================================== +--- battstat/acpi-linux.c (revision 10278) ++++ battstat/acpi-linux.c (revision 10280) +@@ -191,7 +191,6 @@ + static gboolean update_battery_info(struct acpi_info * acpiinfo) + { + char batt_info[60]; +- gulong acpi_ver; + GHashTable *hash; + DIR * procdir; + struct dirent * procdirentry; +@@ -201,23 +200,6 @@ + acpiinfo->low_capacity = 0; + acpiinfo->critical_capacity = 0; + +- hash = read_file ("/proc/acpi/info", buf, sizeof (buf)); +- if (!hash) +- return FALSE; +- +- acpi_ver = read_ulong (hash, "version"); +- g_hash_table_destroy (hash); +- +- if (acpi_ver < (gulong)20020208) { +- acpiinfo->ac_state_state = "status"; +- acpiinfo->batt_state_state = "status"; +- acpiinfo->charging_state = "state"; +- } else { +- acpiinfo->ac_state_state = "state"; +- acpiinfo->batt_state_state = "state"; +- acpiinfo->charging_state = "charging state"; +- } +- + procdir=opendir("/proc/acpi/battery/"); + if (!procdir) + return FALSE; +@@ -252,16 +234,40 @@ + * initializes the stored battery and AC adapter information. */ + gboolean acpi_linux_init(struct acpi_info * acpiinfo) + { ++ GHashTable *hash; ++ char buf[BUFSIZ]; ++ gchar *pbuf; ++ gulong acpi_ver; + int fd; + + g_assert(acpiinfo); ++ ++ if (g_file_get_contents ("/sys/module/acpi/parameters/acpica_version", &pbuf, NULL, NULL)) { ++ acpi_ver = strtoul (pbuf, NULL, 10); ++ g_free (pbuf); ++ } else if (hash = read_file ("/proc/acpi/info", buf, sizeof (buf))) { ++ acpi_ver = read_ulong (hash, "version"); ++ g_hash_table_destroy (hash); ++ } else ++ return FALSE; ++ ++ if (acpi_ver < (gulong)20020208) { ++ acpiinfo->ac_state_state = "status"; ++ acpiinfo->batt_state_state = "status"; ++ acpiinfo->charging_state = "state"; ++ } else { ++ acpiinfo->ac_state_state = "state"; ++ acpiinfo->batt_state_state = "state"; ++ acpiinfo->charging_state = "charging state"; ++ } ++ ++ if (!update_battery_info(acpiinfo) || !update_ac_info(acpiinfo)) ++ return FALSE; + + fd = open("/proc/acpi/event", 0); + if (fd >= 0) { + acpiinfo->event_fd = fd; + acpiinfo->channel = g_io_channel_unix_new(fd); +- update_battery_info(acpiinfo); +- update_ac_info(acpiinfo); + return TRUE; + } + +@@ -273,8 +279,6 @@ + if (connect(fd, (struct sockaddr *) &addr, sizeof(addr)) == 0) { + acpiinfo->event_fd = fd; + acpiinfo->channel = g_io_channel_unix_new(fd); +- update_battery_info(acpiinfo); +- update_ac_info(acpiinfo); + return TRUE; + } + } +@@ -323,7 +327,6 @@ + { + gsize i; + int evt; +- gboolean result = FALSE; + GString *buffer; + GError *gerror=NULL; + buffer=g_string_new(NULL); +@@ -333,21 +336,18 @@ + evt = parse_acpi_event(buffer); + switch (evt) { + case ACPI_EVENT_AC: +- update_ac_info(acpiinfo); +- result = TRUE; +- break; ++ return update_ac_info(acpiinfo); + case ACPI_EVENT_BATTERY_INFO: +- update_battery_info(acpiinfo); +- /* Update AC info on battery info updates. This works around +- * a bug in ACPI (as per bug #163013). +- */ +- update_ac_info(acpiinfo); +- result = TRUE; +- break; ++ if (update_battery_info(acpiinfo)) { ++ /* Update AC info on battery info updates. This works around ++ * a bug in ACPI (as per bug #163013). ++ */ ++ return update_ac_info(acpiinfo); ++ } ++ /* fall-through */ ++ default: ++ return FALSE; + } +- +- +- return result; + } + + /* diff --git a/gnome-base/gnome-applets/files/gnome-applets-2.18.0-deprecated-acpi-info.patch b/gnome-base/gnome-applets/files/gnome-applets-2.18.0-deprecated-acpi-info.patch deleted file mode 100644 index 33104d7b54cf..000000000000 --- a/gnome-base/gnome-applets/files/gnome-applets-2.18.0-deprecated-acpi-info.patch +++ /dev/null @@ -1,38 +0,0 @@ ---- gnome-applets-2.16.2-orig/battstat/acpi-linux.c 2007-05-01 21:44:17.000000000 -0500 -+++ gnome-applets-2.16.2/battstat/acpi-linux.c 2007-05-01 21:45:50.000000000 -0500 -@@ -200,22 +200,21 @@ - acpiinfo->max_capacity = 0; - acpiinfo->low_capacity = 0; - acpiinfo->critical_capacity = 0; -+ acpiinfo->ac_state_state = "state"; -+ acpiinfo->batt_state_state = "state"; -+ acpiinfo->charging_state = "charging state"; - - hash = read_file ("/proc/acpi/info", buf, sizeof (buf)); -- if (!hash) -- return FALSE; -- -- acpi_ver = read_ulong (hash, "version"); -- g_hash_table_destroy (hash); -- -- if (acpi_ver < (gulong)20020208) { -- acpiinfo->ac_state_state = "status"; -- acpiinfo->batt_state_state = "status"; -- acpiinfo->charging_state = "state"; -- } else { -- acpiinfo->ac_state_state = "state"; -- acpiinfo->batt_state_state = "state"; -- acpiinfo->charging_state = "charging state"; -+ if (hash) -+ { -+ acpi_ver = read_ulong (hash, "version"); -+ g_hash_table_destroy (hash); -+ -+ if (acpi_ver < (gulong)20020208) { -+ acpiinfo->ac_state_state = "status"; -+ acpiinfo->batt_state_state = "status"; -+ acpiinfo->charging_state = "state"; -+ } - } - - procdir=opendir("/proc/acpi/battery/"); diff --git a/gnome-base/gnome-applets/gnome-applets-2.16.2-r1.ebuild b/gnome-base/gnome-applets/gnome-applets-2.16.2-r1.ebuild new file mode 100644 index 000000000000..f980e26cacfb --- /dev/null +++ b/gnome-base/gnome-applets/gnome-applets-2.16.2-r1.ebuild @@ -0,0 +1,102 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/gnome-base/gnome-applets/gnome-applets-2.16.2-r1.ebuild,v 1.1 2007/06/29 22:24:08 dsd Exp $ + +inherit eutils gnome2 autotools + +DESCRIPTION="Applets for the GNOME Desktop and Panel" +HOMEPAGE="http://www.gnome.org/" + +LICENSE="GPL-2 FDL-1.1 LGPL-2" +SLOT="2" +KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd" +IUSE="acpi apm gstreamer hal ipv6" + +RDEPEND=">=x11-libs/gtk+-2.6 + >=dev-libs/glib-2.6 + >=gnome-base/libgnome-2.8 + >=gnome-base/libgnomeui-2.8 + >=gnome-base/gnome-vfs-2.15.4 + >=gnome-base/gconf-2.8 + >=gnome-base/gnome-panel-2.13.4 + >=gnome-base/libgtop-2.11.92 + >=gnome-base/libglade-2.4 + >=gnome-base/gail-1.1 + >=x11-libs/libxklavier-2.91 + >=x11-libs/libwnck-2.9.3 + >=app-admin/system-tools-backends-1.1.3 + >=gnome-base/gnome-desktop-2.11.1 + >=x11-libs/libnotify-0.3.2 + hal? ( >=sys-apps/hal-0.5.3 ) + || ( >=dev-libs/dbus-glib-0.71 + ( <sys-apps/dbus-0.90 >=sys-apps/dbus-0.34 ) ) + >=dev-python/pygtk-2.6 + >=dev-python/gnome-python-2.10 + >=x11-themes/gnome-icon-theme-2.15.91 + >=dev-libs/libxml2-2.5.0 + >=virtual/python-2.4 + kernel_linux? ( + apm? ( sys-apps/apmd ) + acpi? ( sys-power/acpid ) + ) + x11-apps/xrdb x11-libs/libX11 + >=gnome-extra/gucharmap-1.4 + gstreamer? ( + >=media-libs/gstreamer-0.10.2 + >=media-libs/gst-plugins-base-0.10.2 + )" + +DEPEND="${RDEPEND} + >=app-text/scrollkeeper-0.1.4 + >=dev-util/pkgconfig-0.19 + >=dev-util/intltool-0.35 + dev-libs/libxslt + app-text/docbook-sgml-utils + >=app-text/gnome-doc-utils-0.3.2 + ~app-text/docbook-xml-dtd-4.3" + +DOCS="AUTHORS ChangeLog NEWS README" + +MAKEOPTS="${MAKEOPTS} -j1" + +src_unpack() { + gnome2_src_unpack + + epatch "${FILESDIR}/${PN}-2.16.1-dbus-version.patch" + epatch ${FILESDIR}/${PN}-2.18.0-acpi-procfs.patch + use x86-fbsd && epatch "${FILESDIR}"/${P}-malloc.patch +} + +pkg_setup() { + G2CONF="--disable-scrollkeeper --enable-flags \ + $(use_enable ipv6) + $(use_with hal)" + + if use gstreamer; then + G2CONF="${G2CONF} --with-gstreamer=0.10" + fi + + if ! use ppc && ! use apm && ! use acpi; then + G2CONF="${G2CONF} --disable-battstat" + fi + + if use ppc && ! use apm; then + G2CONF="${G2CONF} --disable-battstat" + fi +} + +src_install() { + gnome2_src_install + + APPLETS="accessx-status battstat charpick cpufreq drivemount geyes \ + gkb-new gswitchit gweather invest-applet mini-commander \ + mixer modemlights multiload null_applet stickynotes trashapplet" + + for applet in ${APPLETS} ; do + docinto ${applet} + + for d in AUTHORS ChangeLog NEWS README README.themes TODO ; do + [ -s ${applet}/${d} ] && dodoc ${applet}/${d} + done + done +} diff --git a/gnome-base/gnome-applets/gnome-applets-2.18.0-r1.ebuild b/gnome-base/gnome-applets/gnome-applets-2.18.0-r2.ebuild index 0e0c608009ed..3ed09e7ef42b 100644 --- a/gnome-base/gnome-applets/gnome-applets-2.18.0-r1.ebuild +++ b/gnome-base/gnome-applets/gnome-applets-2.18.0-r2.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/gnome-base/gnome-applets/gnome-applets-2.18.0-r1.ebuild,v 1.1 2007/05/02 04:46:04 compnerd Exp $ +# $Header: /var/cvsroot/gentoo-x86/gnome-base/gnome-applets/gnome-applets-2.18.0-r2.ebuild,v 1.1 2007/06/29 22:24:08 dsd Exp $ inherit eutils gnome2 autotools @@ -87,7 +87,7 @@ pkg_setup() { src_unpack() { gnome2_src_unpack - epatch ${FILESDIR}/${PN}-2.18.0-deprecated-acpi-info.patch + epatch ${FILESDIR}/${P}-acpi-procfs.patch } src_install() { |