summaryrefslogtreecommitdiff
path: root/sys-power/phctool/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /sys-power/phctool/files
reinit the tree, so we can have metadata
Diffstat (limited to 'sys-power/phctool/files')
-rw-r--r--sys-power/phctool/files/phctool-0.5.2.2_all_paths_tool_no_sudo.patch17
-rw-r--r--sys-power/phctool/files/phctool-0.5.2.2_all_paths_tool_sudo.patch18
-rw-r--r--sys-power/phctool/files/phctool-0.5.2.2_all_paths_tray.patch32
-rw-r--r--sys-power/phctool/files/phctool-0.5.2.2_gui_kernel_2.6.38.patch21
-rw-r--r--sys-power/phctool/files/phctool-0.5.2.2_kernel_2.6.36.patch79
5 files changed, 167 insertions, 0 deletions
diff --git a/sys-power/phctool/files/phctool-0.5.2.2_all_paths_tool_no_sudo.patch b/sys-power/phctool/files/phctool-0.5.2.2_all_paths_tool_no_sudo.patch
new file mode 100644
index 000000000000..316e538abe0d
--- /dev/null
+++ b/sys-power/phctool/files/phctool-0.5.2.2_all_paths_tool_no_sudo.patch
@@ -0,0 +1,17 @@
+--- a/phctool.sh 2007-10-27 22:32:35.000000000 +0200
++++ b/phctool.sh 2009-09-05 23:20:18.000000000 +0200
+@@ -1,10 +1,7 @@
+ #!/bin/sh
+-#this shellscript is just a wrapper to subphctool.sh
+-#but necessary to run phctool with sudo even from the tray icon
+-PROGPATH=`dirname "$0"`
+-cd $PROGPATH
+-if test -e /usr/bin/gksu
+- then gksu ./subphctool.sh $1
+- else sudo ./subphctool.sh $1
+-fi
++#this shellscript is just a wrapper to phctool.py
++#but necessary to run phctool from another directory
++
++cd /usr/share/phctool
++./phctool.py $1
diff --git a/sys-power/phctool/files/phctool-0.5.2.2_all_paths_tool_sudo.patch b/sys-power/phctool/files/phctool-0.5.2.2_all_paths_tool_sudo.patch
new file mode 100644
index 000000000000..11b64c3bab07
--- /dev/null
+++ b/sys-power/phctool/files/phctool-0.5.2.2_all_paths_tool_sudo.patch
@@ -0,0 +1,18 @@
+--- a/phctool.sh 2007-10-27 22:32:35.000000000 +0200
++++ b/phctool.sh 2009-09-05 23:20:18.000000000 +0200
+@@ -1,10 +1,7 @@
+ #!/bin/sh
+-#this shellscript is just a wrapper to subphctool.sh
+-#but necessary to run phctool with sudo even from the tray icon
+-PROGPATH=`dirname "$0"`
+-cd $PROGPATH
+-if test -e /usr/bin/gksu
+- then gksu ./subphctool.sh $1
+- else sudo ./subphctool.sh $1
+-fi
++#this shellscript is just a wrapper to subphctool.py
++#but necessary to run phctool from another directory
++
++cd /usr/share/phctool
++sudo ./subphctool.sh $1
+
diff --git a/sys-power/phctool/files/phctool-0.5.2.2_all_paths_tray.patch b/sys-power/phctool/files/phctool-0.5.2.2_all_paths_tray.patch
new file mode 100644
index 000000000000..1d2053a9c4b7
--- /dev/null
+++ b/sys-power/phctool/files/phctool-0.5.2.2_all_paths_tray.patch
@@ -0,0 +1,32 @@
+--- a/phctray.sh 2007-09-08 08:29:31.000000000 +0200
++++ b/phctray.sh 2009-09-05 23:16:54.000000000 +0200
+@@ -2,6 +2,5 @@
+ #this shellscript is just a wrapper to phctray.py
+ #but necessary to run phctray from another directory
+
+-PROGPATH=`dirname "$0"`
+-cd $PROGPATH
++cd /usr/share/phctool
+ ./phctray.py
+--- a/phctray.py 2009-09-08 12:17:11.000000000 +0200
++++ b/phctray.py 2009-09-08 12:17:33.000000000 +0200
+@@ -61,7 +61,7 @@
+ t.show_all()
+
+ ##call phctool without GUI to set stored values
+-cmd=[sys.path[0]+"/phctool.sh","background"] ##command
++cmd=["/usr/bin/phctool","background"] ##command
+ subprocess.Popen(cmd, shell=False) ##call the affinated programm
+
+ gtk.main()
+--- a/phctray.py 2009-09-08 12:22:28.000000000 +0200
++++ b/phctray.py 2009-09-08 12:23:44.000000000 +0200
+@@ -11,7 +11,7 @@
+ return;
+
+ def run_phctool( *args ):
+- cmd=[sys.path[0]+"/phctool.sh"] ##command
++ cmd=["/usr/bin/phctool"] ##command
+ subprocess.Popen(cmd, shell=False) ##call the affinated programm
+
+ def applet_face_click( window, event, *data ):
diff --git a/sys-power/phctool/files/phctool-0.5.2.2_gui_kernel_2.6.38.patch b/sys-power/phctool/files/phctool-0.5.2.2_gui_kernel_2.6.38.patch
new file mode 100644
index 000000000000..db33396e3d17
--- /dev/null
+++ b/sys-power/phctool/files/phctool-0.5.2.2_gui_kernel_2.6.38.patch
@@ -0,0 +1,21 @@
+--- phctool/inc/libs/cpuinfo.py
++++ phctool/inc/libs/cpuinfo.py
+@@ -1,6 +1,7 @@
+ #cpuinfo.py
+ #This is a function library to get
+ #informations about CPUs and its PHC data
++#Modified by Fabio Veronese fveronese85*at*gmail.com 22 Mar 2011
+
+
+ import os, string
+@@ -30,6 +31,10 @@
+ if os.path.exists('/proc/acpi/processor/CPU'+cpunr):
+ ##remember ACPI Pathname
+ self.data[cpunr]['acpi']['acpiname']='/proc/acpi/processor/CPU'+cpunr
++ elif os.path.exists('/sys/devices/system/cpu/cpu'+cpunr+'/thermal_throttle'):
++ ##here some throttling infos for 2.6.38 and maybe laters
++ #self.data[cpunr]['acpi']['acpiname']='/sys/devices/system/cpu/cpu'+cpunr+'/thermal_throttle'
++ self.data[cpunr]['acpi']['acpiname']=''
+ else:
+ self.data[cpunr]['acpi']['exist']=False
+ # For some reason we have to fallback on the old function...
diff --git a/sys-power/phctool/files/phctool-0.5.2.2_kernel_2.6.36.patch b/sys-power/phctool/files/phctool-0.5.2.2_kernel_2.6.36.patch
new file mode 100644
index 000000000000..c3a2432aea2d
--- /dev/null
+++ b/sys-power/phctool/files/phctool-0.5.2.2_kernel_2.6.36.patch
@@ -0,0 +1,79 @@
+--- phctool/inc/libs/cpuinfo.py
++++ phctool/inc/libs/cpuinfo.py
+@@ -14,33 +14,49 @@
+
+
+ def _get_acpi_cpus(self):
+- ##count number of CPUs on this system using acpi proc interface
+- ##since we need acpi this i a good way to count CPUs
+- ##we also will remember the Directory-Name because on single CPU
+- ##systems the Dir may be named CPU while on Multicores they are indexed (CPU0, CPU1) ..
+- directory="/proc/acpi/processor/"
+- for f in os.listdir(directory): ##iterate the directory
+- pathname = os.path.join(directory, f) ##
+- if os.path.isdir(pathname): ##is the object we found really a (sub-)directory?
+- ##We open the info-file to get the ID to this CPU,
+- ##i don't know if this really could happen but the ID may differ from
+- ##from the Path iterator (maybe one CPU is supported and another isn't)
+- if os.path.exists(pathname+'/info'):
+- file = open(pathname+'/info', 'r');
+- for line in file:
+- if string.find(line,":"):
+- content = line.split(":");
+- if len(content)>1:
+- info_ident=content[0].strip();
+- info_value=content[1].strip();
+- if info_ident == "processor id":
+- cpunr=info_value
+- self.data[cpunr]={}
+- self.data[cpunr]['acpi']={}
+- self.data[cpunr]['acpi']['exist']=True
+- self.data[cpunr]['acpi']['acpiname']=f ##remember ACPI Pathname
+- else:
+- self.data[cpunr]['acpi']['exist']=False
++ # We need to ignore /proc/acpi/processor as it's becoming deprecated
++ # A good solution might be a look in online cpus, but it doesn't mean they are surely ACPI-supported
++ if os.path.exists('/sys/devices/system/cpu/online'):
++ file = open('/sys/devices/system/cpu/online', 'r');
++ for line in file:
++ if string.find(line,"-"):
++ content = line.split("-");
++ for val in content:
++ cpunr=val.strip();
++ self.data[cpunr]={}
++ self.data[cpunr]['acpi']={}
++ self.data[cpunr]['acpi']['exist']=True
++ # This sounds useful just for throttling, which is managed better by other stuff... I'll keep just for compatibility
++ if os.path.exists('/proc/acpi/processor/CPU'+cpunr):
++ ##remember ACPI Pathname
++ self.data[cpunr]['acpi']['acpiname']='/proc/acpi/processor/CPU'+cpunr
++ else:
++ self.data[cpunr]['acpi']['exist']=False
++ # For some reason we have to fallback on the old function...
++ else:
++ directory="/proc/acpi/processor/"
++ for f in os.listdir(directory): ##iterate the directory
++ pathname = os.path.join(directory, f) ##
++ if os.path.isdir(pathname): ##is the object we found really a (sub-)directory?
++ ##We open the info-file to get the ID to this CPU,
++ ##i don't know if this really could happen but the ID may differ from
++ ##from the Path iterator (maybe one CPU is supported and another isn't)
++ if os.path.exists(pathname+'/info'):
++ file = open(pathname+'/info', 'r');
++ for line in file:
++ if string.find(line,":"):
++ content = line.split(":");
++ if len(content)>1:
++ info_ident=content[0].strip();
++ info_value=content[1].strip();
++ if info_ident == "processor id":
++ cpunr=info_value
++ self.data[cpunr]={}
++ self.data[cpunr]['acpi']={}
++ self.data[cpunr]['acpi']['exist']=True
++ self.data[cpunr]['acpi']['acpiname']=f ##remember ACPI Pathname
++ else:
++ self.data[cpunr]['acpi']['exist']=False
+
+
+ def _get_cpuinfos(self):