summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkos Chandras <hwoarang@gentoo.org>2012-02-04 10:30:35 +0000
committerMarkos Chandras <hwoarang@gentoo.org>2012-02-04 10:30:35 +0000
commit1ef76fd7e45fd6d94f87c7e2919021d9f27c3590 (patch)
treef93081e63d6326c077ee4da04c93c8297a32489f /lxde-base
parentVersion bump, remove old. (diff)
downloadhistorical-1ef76fd7e45fd6d94f87c7e2919021d9f27c3590.tar.gz
historical-1ef76fd7e45fd6d94f87c7e2919021d9f27c3590.tar.bz2
historical-1ef76fd7e45fd6d94f87c7e2919021d9f27c3590.zip
Support sysfs and proc interfaces in lxpanel. Bug #400855
Package-Manager: portage-2.2.0_alpha84/cvs/Linux x86_64
Diffstat (limited to 'lxde-base')
-rw-r--r--lxde-base/lxpanel/ChangeLog8
-rw-r--r--lxde-base/lxpanel/Manifest24
-rw-r--r--lxde-base/lxpanel/files/lxpanel-0.5.8-thermal-plugin.patch202
-rw-r--r--lxde-base/lxpanel/lxpanel-0.5.8-r2.ebuild57
4 files changed, 289 insertions, 2 deletions
diff --git a/lxde-base/lxpanel/ChangeLog b/lxde-base/lxpanel/ChangeLog
index 76694dd3a761..8554a74240ad 100644
--- a/lxde-base/lxpanel/ChangeLog
+++ b/lxde-base/lxpanel/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for lxde-base/lxpanel
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/lxde-base/lxpanel/ChangeLog,v 1.36 2012/01/01 13:39:25 vostorga Exp $
+# $Header: /var/cvsroot/gentoo-x86/lxde-base/lxpanel/ChangeLog,v 1.37 2012/02/04 10:30:35 hwoarang Exp $
+
+*lxpanel-0.5.8-r2 (04 Feb 2012)
+
+ 04 Feb 2012; Markos Chandras <hwoarang@gentoo.org>
+ +files/lxpanel-0.5.8-thermal-plugin.patch, +lxpanel-0.5.8-r2.ebuild:
+ Support sysfs and proc interfaces in lxpanel. Bug #400855
*lxpanel-0.5.8-r1 (01 Jan 2012)
diff --git a/lxde-base/lxpanel/Manifest b/lxde-base/lxpanel/Manifest
index 0161c2eb333b..fae56f53a269 100644
--- a/lxde-base/lxpanel/Manifest
+++ b/lxde-base/lxpanel/Manifest
@@ -1,15 +1,37 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA512
+
AUX lxpanel-0.5.1-sandbox.patch 833 RMD160 83957b8e65104c12c2220027faf24d846fe4b3b9 SHA1 24f5f2c737e56f5bc457fa49426c5115e9d15498 SHA256 1df1574a0faf8d02465f7673f7967b14b2d0bd33f8ac9c5769888ef6c4272489
AUX lxpanel-0.5.6-broken-apps.patch 567 RMD160 628f01083f7c06476394447aacdc6fa542359bab SHA1 23ae82f23458596e1bb356cf897e5310cb05c080 SHA256 0b914f680f2dbaafb3a4966a9795e3d154839cb910eca9f58bdf18d41901eb25
AUX lxpanel-0.5.6-symbol-alarm.patch 1461 RMD160 5ed09d071a349b7554400ea73d16f6aacdc4ad8d SHA1 6b111b32eb1ae9ee869df8ff0ac4c23b8ccbfbb8 SHA256 afafb59ea3e537147ff4d81feb5ec2a3a18eaa628f992c5a44321fa29b85e6af
AUX lxpanel-0.5.7-requisition.patch 1003 RMD160 88d9b762099ed3cbebdf6ce9277720a70ea96ab2 SHA1 4ec1715f8fa00bcae92157ba2fb500f3852cb3e6 SHA256 cc25d00f4d9efc6be1ddb2adfb8f13dff37547632db5563528e68a78e3c2d36f
AUX lxpanel-0.5.7-tooltip-netstatus.patch 1084 RMD160 323191b9177b50ff44ab61b91d0704afd0e798bb SHA1 511e3291cb60970864af10da87f65df12abf2174 SHA256 df6bbcdac99fa9a79b7329ec51b07ca3cccb05cf128d4d98ed8f65f57541a93f
AUX lxpanel-0.5.8-battery-meter.patch 939 RMD160 eaf55c514a433b8a62f27837b6d68f4523c3b9cd SHA1 34cc4fd3ee4ac867c463d97d3b703493224ba14d SHA256 c65b77e37b682b32a713904ff03b66e074c4d5ae701449e68310e075c3e2d4c3
+AUX lxpanel-0.5.8-thermal-plugin.patch 5610 RMD160 6414113ed28ef26a280693c75f37503820e63324 SHA1 97e92465a3e29f2daec50b826f68241e11ca0265 SHA256 fc21ed5afaec365f323e4dfc20f47b15b277e8eca9be8545fabbdfc8f86b8ccc
DIST lxpanel-0.5.6.tar.gz 1074786 RMD160 5e5ebdd185d06fe0d1965ec2ed12ffecf0984b7e SHA1 fc5483e6016ac52c38b38274cca7661f2aa828ab SHA256 9c04839e2d23feec8b107a1d76899aca645416862b4b6ca01f8db743944348e1
DIST lxpanel-0.5.7.tar.gz 1166355 RMD160 489dc9515ab0f6bac5136a0c4c93fbcb26f48e97 SHA1 276168fb4560899e83a6a340448c961d63333717 SHA256 89d1b55b207e61b7b7433cb51302bdbee644fb78b5b57892d67cb19072f548a1
DIST lxpanel-0.5.8.tar.gz 1166241 RMD160 34e3cc6fb9de1c0590f6ec281750061c1098dc1a SHA1 a9d6bd9d15a3588fb959aa32880ad888c58359f7 SHA256 6a3579d6f384c03a33a03e4d32016428c84eb0f2bc421704f724fe2cc015cddd
EBUILD lxpanel-0.5.6.ebuild 1552 RMD160 cf840c62da5defd98dc1351c4b64b155671de0de SHA1 9b9e3f01b902e84dfbcbb1d347b693fbad4858e7 SHA256 ca22d268d0bc7a9acfdd0a1302f2e54cd6000d5b08baa9ad825318251e478fec
EBUILD lxpanel-0.5.7-r1.ebuild 1565 RMD160 a334922b4f3b0da28da4cf0ca1127e21e43792f5 SHA1 d17a2b45bce97069347a49160d5334e322f3bfcb SHA256 1e33c7068ac25935404a0fc5a1ad06af050e5fbcb5320ea2e327b102ce625c86
EBUILD lxpanel-0.5.8-r1.ebuild 1516 RMD160 899de1dd99b816515236b60a068046955d0f47a8 SHA1 e64812158381764be93f4e0dd744b0e455b02fd5 SHA256 da73a1a75c95e7b5efc7c3873852d6d576cc7013c33dee4b4394f026a1e308d0
+EBUILD lxpanel-0.5.8-r2.ebuild 1564 RMD160 d647384c7da8943996068d932cc5e624291b3010 SHA1 ffd4f2d30ad59d1c3cda9ef7a4d95b03de50b56e SHA256 6d8bea97a5d507e610da639b4984b7506df9a47d28223ca7bb5f9bb3a4693837
EBUILD lxpanel-0.5.8.ebuild 1461 RMD160 9a6811b82f420ed2057732be0695aa49159050aa SHA1 4cd3216215cfa13be19195ca127059c982bdf720 SHA256 15aeab352b8fc3ebea29d7302d0fc5deb2ab11ab3412fbc4253c9e81b1e7a0e7
-MISC ChangeLog 5204 RMD160 9e06b99574f9eb964ffc4ae7c97050aee50a260c SHA1 e79f04aa75c670121d72fb887c6effee57d6db13 SHA256 06b48b8858ed0afac022aa0a6b650fd462e20d52ca2f3cb306e1f32d1984c39d
+MISC ChangeLog 5422 RMD160 8c654b06e8c8321b553135f365ec1236cf0d5537 SHA1 57c4337a1d0a95ef2533f21bf68de6761f05b7fb SHA256 cf93715d8515f44f1cad3127e63ca9f9b41555f01b6ffdf7595a37c56043aeef
MISC metadata.xml 159 RMD160 35036c133a5c9c7edccc3cdfed5789092f884048 SHA1 bdf1b7cc6ffbdd223b6f05aa072e857dfc981c4f SHA256 09574ccad15f69d5367ecbb1a491cd636fb88582f69987d2ec217109dfe8befb
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.18 (GNU/Linux)
+
+iQIcBAEBCgAGBQJPLQjKAAoJEPqDWhW0r/LCs50P/RMGKEkNUDlS7JH80JZ2OMfk
+Y3dNOOiGoeFSjuqM1iRRwmx4EpHaSoMpFU1GAups6sJiOZX3L+T6C2iTaZ1jGGN6
+wYIiR39i7EXlLAGrS6IEFNHgqVcISi5GymfnXrBJDbEnaBe/aB+7BeSXtbt/3eEz
+rtOIhP9+8+UlhG3+qXF71p32fZs7GFz/OZ2hBVx2lGPw3fv05kpIa4znTwsGp3R9
+ZQe0EYm75TICc2shlnzkP9rH4WryWpRSsobOypvCR1nTTzIP8dO+PRLOhLkmFpqq
+JMI3lnxwNd8gWjIJ5pVYizgSFbMpq1XdJKijFDFzK5Ogh3JdAf+4mH+tbeazfnPn
+ezLL2xa8b8a9TO79H2STd0yMK3IButuAlVty+p1Nt51aEzrbsPWy6XPmOuR4eZqs
+JOYRCWJqU9dkbV1UEbW0Z/3kdpTeI1LMWz4IN5RP0vHzXQJ/QJzAGYRVqQmZ4CqF
+W5o9QVM83OD72QkKoxFHZRVb/MWDjn7N/k4YGjF/Ib9esfNpqyCRy3YMyXP0u0mU
+ZvdGlcPd8Q/1ygNDiDj/BOeliPqw3xJmjetCKWAzM6OPGOwq+R2S62ud0SepCiUP
+nr0tAlIsOGbn893Kt4Kb8Ey1o1W+/SSLoh3U0fXQuyElECaygbd0P1B/jcC+o81t
+psQ+bbWLSyjJPwAYidhc
+=MjWm
+-----END PGP SIGNATURE-----
diff --git a/lxde-base/lxpanel/files/lxpanel-0.5.8-thermal-plugin.patch b/lxde-base/lxpanel/files/lxpanel-0.5.8-thermal-plugin.patch
new file mode 100644
index 000000000000..0db90b7a19e3
--- /dev/null
+++ b/lxde-base/lxpanel/files/lxpanel-0.5.8-thermal-plugin.patch
@@ -0,0 +1,202 @@
+From 266c072d1e954266157989891eec069006772e97 Mon Sep 17 00:00:00 2001
+From: Henry Gebhardt <hsggebhardt@googlemail.com>
+Date: Fri, 23 Dec 2011 21:02:53 +0100
+Subject: [PATCH] plugins/thermal: support both /proc and sysfs interfaces
+
+---
+ src/plugins/thermal/thermal.c | 108 +++++++++++++++++++++++++++++++++++------
+ 1 files changed, 93 insertions(+), 15 deletions(-)
+
+diff --git a/src/plugins/thermal/thermal.c b/src/plugins/thermal/thermal.c
+index afe5e89..616c4a0 100644
+--- a/src/plugins/thermal/thermal.c
++++ b/src/plugins/thermal/thermal.c
+@@ -32,12 +32,17 @@
+
+ #include "dbg.h"
+
+-#define THERMAL_DIRECTORY "/proc/acpi/thermal_zone/" /* must be slash-terminated */
+-#define THERMAL_TEMPF "temperature"
+-#define THERMAL_TRIP "trip_points"
+-#define TRIP_CRITICAL "critical (S5):"
++#define PROC_THERMAL_DIRECTORY "/proc/acpi/thermal_zone/" /* must be slash-terminated */
++#define PROC_THERMAL_TEMPF "temperature"
++#define PROC_THERMAL_TRIP "trip_points"
++#define PROC_TRIP_CRITICAL "critical (S5):"
+
+-typedef struct {
++#define SYSFS_THERMAL_DIRECTORY "/sys/class/thermal/thermal_zone0/" /* must be slash-terminated */
++#define SYSFS_THERMAL_TEMPF "temp"
++#define SYSFS_THERMAL_TRIP "trip_point_0_temp"
++
++
++typedef struct thermal {
+ Plugin * plugin;
+ GtkWidget *main;
+ GtkWidget *namew;
+@@ -54,17 +59,20 @@ typedef struct {
+ GdkColor cl_normal,
+ cl_warning1,
+ cl_warning2;
++ gint (*get_temperature)(struct thermal *th);
++ gint (*get_critical)(struct thermal *th);
+ } thermal;
+
++
+ static gint
+-get_critical(thermal *th){
++proc_get_critical(thermal *th){
+ FILE *state;
+ char buf[ 256 ], sstmp [ 100 ];
+ char* pstr;
+
+ if(th->sensor == NULL) return -1;
+
+- sprintf(sstmp,"%s%s",th->sensor,THERMAL_TRIP);
++ sprintf(sstmp,"%s%s",th->sensor,PROC_THERMAL_TRIP);
+
+ if (!(state = fopen( sstmp, "r"))) {
+ //printf("cannot open %s\n",sstmp);
+@@ -72,10 +80,10 @@ get_critical(thermal *th){
+ }
+
+ while( fgets(buf, 256, state) &&
+- ! ( pstr = strstr(buf, TRIP_CRITICAL) ) );
++ ! ( pstr = strstr(buf, PROC_TRIP_CRITICAL) ) );
+ if( pstr )
+ {
+- pstr += strlen(TRIP_CRITICAL);
++ pstr += strlen(PROC_TRIP_CRITICAL);
+ while( *pstr && *pstr == ' ' )
+ ++pstr;
+
+@@ -90,14 +98,14 @@ get_critical(thermal *th){
+ }
+
+ static gint
+-get_temperature(thermal *th){
++proc_get_temperature(thermal *th){
+ FILE *state;
+ char buf[ 256 ], sstmp [ 100 ];
+ char* pstr;
+
+ if(th->sensor == NULL) return -1;
+
+- sprintf(sstmp,"%s%s",th->sensor,THERMAL_TEMPF);
++ sprintf(sstmp,"%s%s",th->sensor,PROC_THERMAL_TEMPF);
+
+ if (!(state = fopen( sstmp, "r"))) {
+ //printf("cannot open %s\n",sstmp);
+@@ -122,11 +130,79 @@ get_temperature(thermal *th){
+ }
+
+ static gint
++sysfs_get_critical(thermal *th){
++ FILE *state;
++ char buf[ 256 ], sstmp [ 100 ];
++ char* pstr;
++
++ if(th->sensor == NULL) return -1;
++
++ sprintf(sstmp,"%s%s",th->sensor,SYSFS_THERMAL_TRIP);
++
++ if (!(state = fopen( sstmp, "r"))) {
++ //printf("cannot open %s\n",sstmp);
++ return -1;
++ }
++
++ while( fgets(buf, 256, state) &&
++ ! ( pstr = buf ) );
++ if( pstr )
++ {
++ printf("Critical: [%s]\n",pstr);
++ fclose(state);
++ return atoi(pstr)/1000;
++ }
++
++ fclose(state);
++ return -1;
++}
++
++static gint
++sysfs_get_temperature(thermal *th){
++ FILE *state;
++ char buf[ 256 ], sstmp [ 100 ];
++ char* pstr;
++
++ if(th->sensor == NULL) return -1;
++
++ sprintf(sstmp,"%s%s",th->sensor,SYSFS_THERMAL_TEMPF);
++
++ if (!(state = fopen( sstmp, "r"))) {
++ //printf("cannot open %s\n",sstmp);
++ return -1;
++ }
++
++ while (fgets(buf, 256, state) &&
++ ! ( pstr = buf ) );
++ if( pstr )
++ {
++ fclose(state);
++ return atoi(pstr)/1000;
++ }
++
++ fclose(state);
++ return -1;
++}
++
++
++static void
++set_get_functions(thermal *th)
++{
++ if (strncmp(th->sensor, "/sys/", 5) == 0){
++ th->get_temperature = sysfs_get_temperature;
++ th->get_critical = sysfs_get_critical;
++ } else {
++ th->get_temperature = proc_get_temperature;
++ th->get_critical = proc_get_critical;
++ }
++}
++
++static gint
+ update_display(thermal *th)
+ {
+ char buffer [60];
+ int n;
+- int temp = get_temperature(th);
++ int temp = th->get_temperature(th);
+ GdkColor color;
+
+ if(temp >= th->warning2)
+@@ -155,7 +231,7 @@ check_sensors( thermal* th )
+ const char *sensor_name;
+ char sensor_path[100];
+
+- if (! (sensorsDirectory = g_dir_open(THERMAL_DIRECTORY, 0, NULL)))
++ if (! (sensorsDirectory = g_dir_open(PROC_THERMAL_DIRECTORY, 0, NULL)))
+ {
+ th->sensor = NULL;
+ return;
+@@ -164,7 +240,7 @@ check_sensors( thermal* th )
+ /* Scan the thermal_zone directory for available sensors */
+ while ((sensor_name = g_dir_read_name(sensorsDirectory))) {
+ if (sensor_name[0] != '.') {
+- sprintf(sensor_path,"%s%s/",THERMAL_DIRECTORY, sensor_name);
++ sprintf(sensor_path,"%s%s/",PROC_THERMAL_DIRECTORY, sensor_name);
+ if(th->sensor) {
+ g_free(th->sensor);
+ th->sensor = NULL;
+@@ -254,7 +330,9 @@ thermal_constructor(Plugin *p, char** fp)
+ if(th->sensor == NULL) th->auto_sensor = TRUE;
+ if(th->auto_sensor) check_sensors(th);
+
+- th->critical = get_critical(th);
++ set_get_functions(th);
++
++ th->critical = th->get_critical(th);
+
+ if(!th->custom_levels){
+ th->warning1 = th->critical - 10;
+--
+1.7.4.1
+
diff --git a/lxde-base/lxpanel/lxpanel-0.5.8-r2.ebuild b/lxde-base/lxpanel/lxpanel-0.5.8-r2.ebuild
new file mode 100644
index 000000000000..404e858f8ddb
--- /dev/null
+++ b/lxde-base/lxpanel/lxpanel-0.5.8-r2.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/lxde-base/lxpanel/lxpanel-0.5.8-r2.ebuild,v 1.1 2012/02/04 10:30:35 hwoarang Exp $
+
+EAPI="4"
+
+inherit autotools eutils
+
+DESCRIPTION="Lightweight X11 desktop panel for LXDE"
+HOMEPAGE="http://lxde.org/"
+SRC_URI="mirror://sourceforge/lxde/${P}.tar.gz"
+
+LICENSE="GPL-2"
+KEYWORDS="~alpha ~amd64 ~arm ~ppc ~x86 ~x86-interix ~amd64-linux ~x86-linux"
+SLOT="0"
+IUSE="+alsa"
+RESTRICT="test" # bug 249598
+
+RDEPEND="x11-libs/gtk+:2
+ x11-libs/libXmu
+ x11-libs/libXpm
+ lxde-base/lxmenu-data
+ lxde-base/menu-cache
+ alsa? ( media-libs/alsa-lib )"
+DEPEND="${RDEPEND}
+ dev-util/pkgconfig
+ sys-devel/gettext"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.5.1-sandbox.patch
+ epatch "${FILESDIR}"/${PN}-0.5.6-broken-apps.patch
+ epatch "${FILESDIR}"/${P}-battery-meter.patch
+ epatch "${FILESDIR}"/${P}-thermal-plugin.patch
+ eautoreconf
+}
+
+src_configure() {
+ local plugins=all
+ [[ ${CHOST} == *-interix* ]] && plugins=deskno,kbled,xkb
+
+ econf $(use_enable alsa) --with-x --with-plugins=${plugins}
+ # the gtk+ dep already pulls in libX11, so we might as well hardcode with-x
+}
+
+src_install () {
+ emake DESTDIR="${D}" install
+ dodoc AUTHORS ChangeLog README
+
+ # Get rid of the .la files.
+ find "${D}" -name '*.la' -delete
+}
+
+pkg_postinst() {
+ elog "If you have problems with broken icons shown in the main panel,"
+ elog "you will have to configure panel settings via its menu."
+ elog "This will not be an issue with first time installations."
+}