diff --git a/hardware/powermanagement/powertop/actions.py b/hardware/powermanagement/powertop/actions.py old mode 100644 new mode 100755 index 05ea7493f3..a3c3518bc9 --- a/hardware/powermanagement/powertop/actions.py +++ b/hardware/powermanagement/powertop/actions.py @@ -6,10 +6,18 @@ from pisi.actionsapi import autotools from pisi.actionsapi import pisitools +from pisi.actionsapi import shelltools +from pisi.actionsapi import libtools from pisi.actionsapi import get def setup(): + shelltools.system("sed -i 's:RUN-VERSION-SCRIPT-IN-GIT-REPOSITORY-ONLY:v2.9:' scripts/version") + shelltools.system("./autogen.sh") + autotools.configure() + + + pisitools.dosed("libtool", " -shared ", " -Wl,-O1,--as-needed -shared ") def build(): autotools.make() diff --git a/hardware/powermanagement/powertop/files/powertop-2.7-always-create-params.patch b/hardware/powermanagement/powertop/files/powertop-2.7-always-create-params.patch new file mode 100644 index 0000000000..87ddf7db61 --- /dev/null +++ b/hardware/powermanagement/powertop/files/powertop-2.7-always-create-params.patch @@ -0,0 +1,35 @@ +diff --git a/src/parameters/persistent.cpp b/src/parameters/persistent.cpp +index 9a5688a..6a232cd 100644 +--- a/src/parameters/persistent.cpp ++++ b/src/parameters/persistent.cpp +@@ -145,9 +145,6 @@ void save_parameters(const char *filename) + + // printf("result size is %i, #parameters is %i \n", (int)past_results.size(), (int)all_parameters.parameters.size()); + +- if (!global_power_valid()) +- return; +- + pathname = get_param_directory(filename); + + file.open(pathname, ios::out); +@@ -156,12 +153,15 @@ void save_parameters(const char *filename) + return; + } + +- map::iterator it; ++ if (global_power_valid()) ++ { ++ map::iterator it; + +- for (it = param_index.begin(); it != param_index.end(); it++) { +- int index; +- index = it->second; +- file << it->first << "\t" << setprecision(9) << all_parameters.parameters[index] << "\n"; ++ for (it = param_index.begin(); it != param_index.end(); it++) { ++ int index; ++ index = it->second; ++ file << it->first << "\t" << setprecision(9) << all_parameters.parameters[index] << "\n"; ++ } + } + file.close(); + } diff --git a/hardware/powermanagement/powertop/pspec.xml b/hardware/powermanagement/powertop/pspec.xml old mode 100644 new mode 100755 index f5a39b2312..b9d7ff54e1 --- a/hardware/powermanagement/powertop/pspec.xml +++ b/hardware/powermanagement/powertop/pspec.xml @@ -12,12 +12,15 @@ app:console Power consumption monitor PowerTOP is a Linux tool that finds the software component(s) that make your computer use more power than necessary while it is idle. - https://01.org/sites/default/files/downloads/powertop/powertop-2.8.tar.gz + https://github.com/fenrus75/powertop/archive/v2.9.tar.gz libnl-devel ncurses-devel pciutils-devel + + powertop-2.7-always-create-params.patch + @@ -39,6 +42,13 @@ + + 2018-02-25 + 2.9 + Version bump. + Pisi Linux Community + admin@pisilinux.org + 2017-04-05 2.8