summaryrefslogtreecommitdiff
path: root/community/lxpanel
diff options
context:
space:
mode:
authorMichał Masłowski <mtjm@mtjm.eu>2011-12-26 17:57:29 +0100
committerMichał Masłowski <mtjm@mtjm.eu>2011-12-26 17:57:29 +0100
commit025f5565da8ee014457f56851fca55c36619787c (patch)
tree1705231f784a4ec514287e99d3967b3495dacc23 /community/lxpanel
parentd4891d626bd0699dafdcfa776ad0ee48df04f2d4 (diff)
parente39d5f838c08b5b57eae4c1aec4ae00acd18b239 (diff)
Merge branch 'master' of ssh://parabolagnulinux.org:1863/home/parabola/abslibre-pre-mips64el
Conflicts: community-testing/percona-server/PKGBUILD community/libdnet/PKGBUILD extra/libxfce4ui/PKGBUILD extra/libxi/PKGBUILD extra/live-media/PKGBUILD extra/python-urwid/PKGBUILD extra/qtwebkit/PKGBUILD extra/rhythmbox/PKGBUILD extra/xfconf/PKGBUILD kde-unstable/kactivities/PKGBUILD kde-unstable/kdeaccessibility-jovie/PKGBUILD kde-unstable/kdeaccessibility-kaccessible/PKGBUILD kde-unstable/kdeaccessibility-kmag/PKGBUILD kde-unstable/kdeaccessibility-kmousetool/PKGBUILD kde-unstable/kdeaccessibility-kmouth/PKGBUILD kde-unstable/kdeadmin/PKGBUILD kde-unstable/kdeartwork/PKGBUILD kde-unstable/kdebase-konsole/PKGBUILD kde-unstable/kdebase-runtime/PKGBUILD kde-unstable/kdebase-workspace/PKGBUILD kde-unstable/kdebase/PKGBUILD kde-unstable/kdebindings-kimono/PKGBUILD kde-unstable/kdebindings-kross/PKGBUILD kde-unstable/kdebindings-perlkde/PKGBUILD kde-unstable/kdebindings-perlqt/PKGBUILD kde-unstable/kdebindings-python/PKGBUILD kde-unstable/kdebindings-qtruby/PKGBUILD kde-unstable/kdebindings-qyoto/PKGBUILD kde-unstable/kdebindings-smokegen/PKGBUILD kde-unstable/kdebindings-smokekde/PKGBUILD kde-unstable/kdebindings-smokeqt/PKGBUILD kde-unstable/kdeedu-analitza/PKGBUILD kde-unstable/kdeedu-blinken/PKGBUILD kde-unstable/kdeedu-cantor/PKGBUILD kde-unstable/kdeedu-kalgebra/PKGBUILD kde-unstable/kdeedu-kalzium/PKGBUILD kde-unstable/kdeedu-kanagram/PKGBUILD kde-unstable/kdeedu-kbruch/PKGBUILD kde-unstable/kdeedu-kgeography/PKGBUILD kde-unstable/kdeedu-khangman/PKGBUILD kde-unstable/kdeedu-kig/PKGBUILD kde-unstable/kdeedu-kiten/PKGBUILD kde-unstable/kdeedu-klettres/PKGBUILD kde-unstable/kdeedu-kmplot/PKGBUILD kde-unstable/kdeedu-kstars/PKGBUILD kde-unstable/kdeedu-ktouch/PKGBUILD kde-unstable/kdeedu-kturtle/PKGBUILD kde-unstable/kdeedu-kwordquiz/PKGBUILD kde-unstable/kdeedu-marble/PKGBUILD kde-unstable/kdeedu-parley/PKGBUILD kde-unstable/kdeedu-rocs/PKGBUILD kde-unstable/kdeedu-step/PKGBUILD kde-unstable/kdegames/PKGBUILD kde-unstable/kdegraphics-gwenview/PKGBUILD kde-unstable/kdegraphics-kamera/PKGBUILD kde-unstable/kdegraphics-kcolorchooser/PKGBUILD kde-unstable/kdegraphics-kgamma/PKGBUILD kde-unstable/kdegraphics-kolourpaint/PKGBUILD kde-unstable/kdegraphics-kruler/PKGBUILD kde-unstable/kdegraphics-ksaneplugin/PKGBUILD kde-unstable/kdegraphics-ksnapshot/PKGBUILD kde-unstable/kdegraphics-mobipocket/PKGBUILD kde-unstable/kdegraphics-okular/PKGBUILD kde-unstable/kdegraphics-strigi-analyzer/PKGBUILD kde-unstable/kdegraphics-svgpart/PKGBUILD kde-unstable/kdegraphics-thumbnailers/PKGBUILD kde-unstable/kdelibs/PKGBUILD kde-unstable/kdemultimedia/PKGBUILD kde-unstable/kdenetwork/PKGBUILD kde-unstable/kdepim-runtime/PKGBUILD kde-unstable/kdepim/PKGBUILD kde-unstable/kdepimlibs/PKGBUILD kde-unstable/kdeplasma-addons/PKGBUILD kde-unstable/kdesdk-kate/PKGBUILD kde-unstable/kdesdk-kate/kdesdk-kate.install kde-unstable/kdesdk/PKGBUILD kde-unstable/kdetoys/PKGBUILD kde-unstable/kdeutils-filelight/PKGBUILD kde-unstable/kdeutils-kcalc/PKGBUILD kde-unstable/kdeutils-kcharselect/PKGBUILD kde-unstable/kdeutils-kdf/PKGBUILD kde-unstable/kdeutils-kfloppy/PKGBUILD kde-unstable/kdeutils-kgpg/PKGBUILD kde-unstable/kdeutils-kremotecontrol/PKGBUILD kde-unstable/kdeutils-ktimer/PKGBUILD kde-unstable/kdeutils-kwallet/PKGBUILD kde-unstable/kdeutils-printer-applet/PKGBUILD kde-unstable/kdeutils-superkaramba/PKGBUILD kde-unstable/kdeutils-sweeper/PKGBUILD kde-unstable/kdewebdev/PKGBUILD kde-unstable/libkdcraw/PKGBUILD kde-unstable/libkdeedu/PKGBUILD kde-unstable/libkexiv2/PKGBUILD kde-unstable/libkipi/PKGBUILD kde-unstable/libksane/PKGBUILD multilib/lib32-attr/PKGBUILD multilib/lib32-libldap/PKGBUILD multilib/lib32-libxi/PKGBUILD ~lukeshu/android-udev/51-android.rules ~lukeshu/android-udev/PKGBUILD
Diffstat (limited to 'community/lxpanel')
-rw-r--r--community/lxpanel/PKGBUILD20
-rw-r--r--community/lxpanel/battery.patch72
2 files changed, 86 insertions, 6 deletions
diff --git a/community/lxpanel/PKGBUILD b/community/lxpanel/PKGBUILD
index 2d4d83d47..e890567e6 100644
--- a/community/lxpanel/PKGBUILD
+++ b/community/lxpanel/PKGBUILD
@@ -1,22 +1,26 @@
-# $Id: PKGBUILD 53158 2011-07-31 08:25:21Z angvp $
-# Maintainer: Angel Velasquez <angvp@archlinux.org>
-# Maintainer: Juergen Hoetzel <juergen@archlinux.org>
+# $Id: PKGBUILD 61193 2011-12-24 11:33:27Z bpiotrowski $
+# Maintainer: Bartłomiej Piotrowski <barthalion@gmail.com>
+# Contributor: Angel Velasquez <angvp@archlinux.org>
+# Contributor: Juergen Hoetzel <juergen@archlinux.org>
pkgname=lxpanel
pkgver=0.5.8
-pkgrel=1
+pkgrel=2
pkgdesc="Panel of the LXDE Desktop"
arch=('i686' 'x86_64' 'mips64el')
license=('GPL2')
url="http://lxde.org/"
groups=('lxde')
depends=('gtk2' 'alsa-lib' 'menu-cache' 'lxmenu-data')
-source=(http://downloads.sourceforge.net/lxde/${pkgname}-${pkgver}.tar.gz)
+source=(http://downloads.sourceforge.net/lxde/${pkgname}-${pkgver}.tar.gz
+ battery.patch)
optdepends=(pcmanfm)
-md5sums=('129fae75d1cd3983fd94542c573a70a1')
build() {
cd "$srcdir/$pkgname-$pkgver"
+
+ patch -Np1 -i "$srcdir/battery.patch"
+
./configure --sysconfdir=/etc --prefix=/usr
make
}
@@ -25,3 +29,7 @@ package() {
cd "$srcdir/$pkgname-$pkgver"
make DESTDIR="$pkgdir" install
}
+md5sums=('129fae75d1cd3983fd94542c573a70a1'
+ '5fadb4d5aca09c81138677e91f995d98')
+md5sums=('129fae75d1cd3983fd94542c573a70a1'
+ '5fadb4d5aca09c81138677e91f995d98')
diff --git a/community/lxpanel/battery.patch b/community/lxpanel/battery.patch
new file mode 100644
index 000000000..5d701ea6d
--- /dev/null
+++ b/community/lxpanel/battery.patch
@@ -0,0 +1,72 @@
+diff --git plugins/batt/batt_sys.c plugins/batt/batt_sys.c
+index 54ff678..1eebab5 100644
+--- a/src/plugins/batt/batt_sys.c
++++ b/src/plugins/batt/batt_sys.c
+@@ -35,15 +35,6 @@
+ #include <stdlib.h>
+ #include <string.h>
+
+-battery* battery_new() {
+- static int battery_num = 1;
+- battery * b = g_new0 ( battery, 1 );
+- battery_reset(b);
+- b->battery_num = battery_num;
+- battery_num++;
+- return b;
+-}
+-
+ void battery_reset( battery * b) {
+ b->type_battery = TRUE;
+ b->capacity_unit = "mAh";
+@@ -58,6 +49,15 @@ void battery_reset( battery * b) {
+ b->state = NULL;
+ }
+
++battery* battery_new() {
++ static int battery_num = 1;
++ battery * b = g_new0 ( battery, 1 );
++ battery_reset(b);
++ b->battery_num = battery_num;
++ battery_num++;
++ return b;
++}
++
+ static gchar* parse_info_file(char *filename)
+ {
+ char *buf = NULL;
+@@ -194,7 +194,7 @@ void battery_update( battery *b ) {
+
+ /* convert energy values (in mWh) to charge values (in mAh) if needed and possible */
+ if (b->last_capacity_unit != -1 && b->last_capacity == -1) {
+- if (b->voltage != -1) {
++ if (b->voltage > 0) {
+ b->last_capacity = b->last_capacity_unit * 1000 / b->voltage;
+ } else {
+ b->last_capacity = b->last_capacity_unit;
+@@ -202,7 +202,7 @@ void battery_update( battery *b ) {
+ }
+ }
+ if (b->design_capacity_unit != -1 && b->design_capacity == -1) {
+- if (b->voltage != -1) {
++ if (b->voltage > 0) {
+ b->design_capacity = b->design_capacity_unit * 1000 / b->voltage;
+ } else {
+ b->design_capacity = b->design_capacity_unit;
+@@ -210,7 +210,7 @@ void battery_update( battery *b ) {
+ }
+ }
+ if (b->remaining_energy != -1 && b->remaining_capacity == -1) {
+- if (b->voltage != -1) {
++ if (b->voltage > 0) {
+ b->remaining_capacity = b->remaining_energy * 1000 / b->voltage;
+ b->present_rate = b->present_rate * 1000 / b->voltage;
+ } else {
+@@ -220,7 +220,7 @@ void battery_update( battery *b ) {
+ if (b->last_capacity < MIN_CAPACITY)
+ b->percentage = 0;
+ else
+- b->percentage = ((float) b->remaining_energy * 100.0) / (float) b->last_capacity_unit;
++ b->percentage = (float) b->remaining_capacity * 100 / b->last_capacity;
+
+ if (b->percentage > 100)
+ b->percentage = 100;