diff options
author | Parabola <dev@list.parabolagnulinux.org> | 2011-04-05 14:26:38 +0000 |
---|---|---|
committer | Parabola <dev@list.parabolagnulinux.org> | 2011-04-05 14:26:38 +0000 |
commit | 415856bdd4f48ab4f2732996f0bae58595092bbe (patch) | |
tree | ede2018b591f6dfb477fe9341ba17b9bc000fab9 /community/sensors-applet |
Tue Apr 5 14:26:38 UTC 2011
Diffstat (limited to 'community/sensors-applet')
-rw-r--r-- | community/sensors-applet/FS9379.patch | 54 | ||||
-rw-r--r-- | community/sensors-applet/PKGBUILD | 35 | ||||
-rw-r--r-- | community/sensors-applet/sensors-applet-2.2.7-libnotify-0.7.patch | 57 | ||||
-rw-r--r-- | community/sensors-applet/sensors-applet.install | 11 |
4 files changed, 157 insertions, 0 deletions
diff --git a/community/sensors-applet/FS9379.patch b/community/sensors-applet/FS9379.patch new file mode 100644 index 000000000..5fee4e20f --- /dev/null +++ b/community/sensors-applet/FS9379.patch @@ -0,0 +1,54 @@ +--- sensors-applet-2.2.1.orig/plugins/nvidia/nvidia-plugin.c ++++ sensors-applet-2.2.1/plugins/nvidia/nvidia-plugin.c +@@ -81,7 +81,7 @@ + /* create the connection to the X server */ + if (!(nvidia_sensors_dpy = XOpenDisplay(NULL))) { + /* no connection to the X server avaible */ +- return; ++ return sensors; + } + + /* check if the NV-CONTROL extension is available on this X +only in patch2: +unchanged: +--- sensors-applet-2.2.1.orig/plugins/libsensors/libsensors-plugin.c ++++ sensors-applet-2.2.1/plugins/libsensors/libsensors-plugin.c +@@ -258,7 +258,8 @@ + * file - if neither succeed, exit */ + if ((file = fopen (LIBSENSORS_CONFIG_FILE, "r")) == NULL) { + if ((file = fopen (LIBSENSORS_ALTERNATIVE_CONFIG_FILE, "r")) == NULL) { +- return; ++ g_debug("%s: error opening libsensors config file... ", __FUNCTION__); ++ return sensors; + } + } + +@@ -266,7 +267,8 @@ + * valid, close file and return */ + if (sensors_init(file) != 0) { + fclose(file); +- return; ++ g_debug("%s: error initing libsensors from config file...", __FUNCTION__); ++ return sensors; + } + fclose(file); + +@@ -293,7 +295,8 @@ + + int nr = 0; + if (sensors_init(NULL) != 0) { +- return; ++ g_debug("%s: error initing libsensors", __FUNCTION__); ++ return sensors; + } + i = 0; + while ((chip_name = sensors_get_detected_chips(NULL, &nr))) +@@ -502,7 +505,7 @@ + if (regcomp(&uri_re, "^sensor://([a-z0-9-]+)/([0-9]+)$", + REG_EXTENDED | REG_ICASE) != 0) { + g_debug("Error compiling regexp...not initing libsensors sensors interface"); +- return; ++ return NULL; + } + + return libsensors_plugin_get_sensors(); diff --git a/community/sensors-applet/PKGBUILD b/community/sensors-applet/PKGBUILD new file mode 100644 index 000000000..2fd81dea0 --- /dev/null +++ b/community/sensors-applet/PKGBUILD @@ -0,0 +1,35 @@ +# $Id: PKGBUILD 41542 2011-03-07 16:09:06Z ibiru $ +# Maintainer: Ionut Biru <ibiru@archlinux.org> +# Contributor: Roman Kyrylych <roman@archlinux.org> +# Contributor: Michael Barker + +pkgname=sensors-applet +pkgver=2.2.7 +pkgrel=3 +pkgdesc="An applet for the GNOME Panel to display readings from hardware sensors, including CPU temperature, fan speeds and voltage readings." +arch=('i686' 'x86_64') +url="http://sensors-applet.sourceforge.net/" +license=('GPL') +depends=('gnome-panel-bonobo' 'lm_sensors' 'hicolor-icon-theme') +makedepends=('intltool' 'gnome-doc-utils>=0.18.1' 'libxnvctrl' 'libgnomeui') +optdepends=('hddtemp: for HDD support' + 'libxnvctrl: for Nvidia GPU support') +install=sensors-applet.install +source=(http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz + sensors-applet-2.2.7-libnotify-0.7.patch) +options=('!libtool') +md5sums=('f342fab98be4f1b9a25af0689af20130' + '96a4393d9e75e5eb88a6e906a5a7e464') + +build() { + cd $srcdir/$pkgname-$pkgver + patch -Np1 -i $srcdir/sensors-applet-2.2.7-libnotify-0.7.patch + ./configure --prefix=/usr \ + --libexecdir=/usr/lib/sensors-applet \ + --localstatedir=/var \ + --disable-scrollkeeper \ + --with-nvidia \ + --enable-libnotify + make + make DESTDIR=$pkgdir install +} diff --git a/community/sensors-applet/sensors-applet-2.2.7-libnotify-0.7.patch b/community/sensors-applet/sensors-applet-2.2.7-libnotify-0.7.patch new file mode 100644 index 000000000..ea2f7803a --- /dev/null +++ b/community/sensors-applet/sensors-applet-2.2.7-libnotify-0.7.patch @@ -0,0 +1,57 @@ +diff --git a/sensors-applet/active-sensor-libnotify.c b/sensors-applet/active-sensor-libnotify.c +index e69b005..f7a7eb8 100644 +--- a/sensors-applet/active-sensor-libnotify.c ++++ b/sensors-applet/active-sensor-libnotify.c +@@ -84,10 +84,23 @@ void active_sensor_libnotify_notify(ActiveSensor *active_sensor, + + /* now create a new one */ + g_debug("Creating new notification"); ++ #ifdef NOTIFY_CHECK_VERSION ++ #if NOTIFY_CHECK_VERSION (0, 7, 1) ++ active_sensor->notification[notif_type] = notify_notification_new(summary, ++ message, ++ icon_filename); ++ #else ++ active_sensor->notification[notif_type] = notify_notification_new(summary, ++ message, ++ icon_filename, ++ attach); ++ #endif ++ #else + active_sensor->notification[notif_type] = notify_notification_new(summary, + message, + icon_filename, + attach); ++ #endif + g_signal_connect(active_sensor->notification[notif_type], "closed", + G_CALLBACK(notif_closed_cb), + active_sensor); +diff --git a/sensors-applet/sensors-applet.c b/sensors-applet/sensors-applet.c +index 9486173..81675b8 100644 +--- a/sensors-applet/sensors-applet.c ++++ b/sensors-applet/sensors-applet.c +@@ -303,11 +303,23 @@ void sensors_applet_notify(SensorsApplet *sensors_applet, + message = g_strdup_printf(_("An error occurred while trying to save the current sensor configuration. ")); + break; + } +- ++ #ifdef NOTIFY_CHECK_VERSION ++ #if NOTIFY_CHECK_VERSION (0, 7, 1) ++ sensors_applet->notification = notify_notification_new(summary, ++ message, ++ GTK_STOCK_DIALOG_WARNING); ++ #else ++ sensors_applet->notification = notify_notification_new(summary, ++ message, ++ GTK_STOCK_DIALOG_WARNING, ++ GTK_WIDGET(sensors_applet->applet)); ++ #endif ++ #else + sensors_applet->notification = notify_notification_new(summary, + message, + GTK_STOCK_DIALOG_WARNING, + GTK_WIDGET(sensors_applet->applet)); ++ #endif + g_free(summary); + g_free(message); + diff --git a/community/sensors-applet/sensors-applet.install b/community/sensors-applet/sensors-applet.install new file mode 100644 index 000000000..43ed0a554 --- /dev/null +++ b/community/sensors-applet/sensors-applet.install @@ -0,0 +1,11 @@ +post_install() { + gtk-update-icon-cache -q -t -f usr/share/icons/hicolor +} + +post_upgrade() { + gtk-update-icon-cache -q -t -f usr/share/icons/hicolor +} + +post_remove() { + gtk-update-icon-cache -q -t -f usr/share/icons/hicolor +} |