forked from ports/contrib
tint2: fixed battery power_now support (Thanks to Oleksii Tkachuk)
This commit is contained in:
parent
5bea5cab90
commit
56fe14c1df
@ -1 +1,2 @@
|
||||
6cfcad028f1bd2f69812167f5395f890 add-power-now-support.patch
|
||||
6fc5731e7425125fa84a2add5cef4bff tint2-0.11.tar.bz2
|
||||
|
@ -6,12 +6,15 @@
|
||||
|
||||
name=tint2
|
||||
version=0.11
|
||||
release=1
|
||||
source=(http://$name.googlecode.com/files/$name-$version.tar.bz2)
|
||||
release=2
|
||||
source=(http://$name.googlecode.com/files/$name-$version.tar.bz2 \
|
||||
add-power-now-support.patch)
|
||||
|
||||
build() {
|
||||
cd $name-$version
|
||||
|
||||
patch -p0 -i $SRC/add-power-now-support.patch
|
||||
|
||||
cmake \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DENABLE_BATTERY=ON \
|
||||
|
19
tint2/add-power-now-support.patch
Normal file
19
tint2/add-power-now-support.patch
Normal file
@ -0,0 +1,19 @@
|
||||
diff -rup ../tint2-0.11.orig/src/battery/battery.c ./src/battery/battery.c
|
||||
--- ../tint2-0.11.orig/src/battery/battery.c 2010-12-02 23:56:11.313403140 +0100
|
||||
+++ ./src/battery/battery.c 2010-12-02 23:57:22.266956142 +0100
|
||||
@@ -184,8 +184,14 @@ void init_battery()
|
||||
}
|
||||
g_free(path2);
|
||||
}
|
||||
- if (path_energy_now && path_energy_full) {
|
||||
+
|
||||
+ path_current_now = g_build_filename(battery_dir, "power_now", NULL);
|
||||
+ if (!g_file_test (path_current_now, G_FILE_TEST_EXISTS)) {
|
||||
+ g_free(path_current_now);
|
||||
path_current_now = g_build_filename(battery_dir, "current_now", NULL);
|
||||
+ }
|
||||
+
|
||||
+ if (path_energy_now && path_energy_full) {
|
||||
path_status = g_build_filename(battery_dir, "status", NULL);
|
||||
|
||||
// check file
|
Loading…
x
Reference in New Issue
Block a user