summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWulf Krueger <philantrop@gentoo.org>2007-04-15 02:03:53 +0000
committerWulf Krueger <philantrop@gentoo.org>2007-04-15 02:03:53 +0000
commit5f04bf148b8b2ce3f9be84894c048ecf70e920d9 (patch)
tree6ccaecef37440cd35febabe92943f17e64ea2f50 /kde-misc
parentMask media-gfx/qiv for removal in 30 days. Using imlibs gtk-1.2 functions, de... (diff)
downloadgentoo-2-5f04bf148b8b2ce3f9be84894c048ecf70e920d9.tar.gz
gentoo-2-5f04bf148b8b2ce3f9be84894c048ecf70e920d9.tar.bz2
gentoo-2-5f04bf148b8b2ce3f9be84894c048ecf70e920d9.zip
Added several patches because upstream is dead. Fixes bugs 120350, 171208, 173821, 116661.
(Portage version: 2.1.2.3)
Diffstat (limited to 'kde-misc')
-rw-r--r--kde-misc/ksensors/ChangeLog13
-rw-r--r--kde-misc/ksensors/files/digest-ksensors-0.7.3-r16
-rw-r--r--kde-misc/ksensors/files/ksensors-0.7.3-hddtemp-path.patch29
-rw-r--r--kde-misc/ksensors/files/ksensors-0.7.3-ibm-acpi.patch222
-rw-r--r--kde-misc/ksensors/files/ksensors.desktop15
-rw-r--r--kde-misc/ksensors/ksensors-0.7.3-r1.ebuild64
6 files changed, 347 insertions, 2 deletions
diff --git a/kde-misc/ksensors/ChangeLog b/kde-misc/ksensors/ChangeLog
index 3545051ea623..fae347c53017 100644
--- a/kde-misc/ksensors/ChangeLog
+++ b/kde-misc/ksensors/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for kde-misc/ksensors
-# Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/kde-misc/ksensors/ChangeLog,v 1.10 2006/09/29 13:39:22 deathwing00 Exp $
+# Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/kde-misc/ksensors/ChangeLog,v 1.11 2007/04/15 02:03:53 philantrop Exp $
+
+*ksensors-0.7.3-r1 (15 Apr 2007)
+
+ 15 Apr 2007; philantrop@gentoo.org
+ +files/ksensors-0.7.3-hddtemp-path.patch,
+ +files/ksensors-0.7.3-ibm-acpi.patch, +files/ksensors.desktop,
+ +ksensors-0.7.3-r1.ebuild:
+ Added several patches because upstream is dead. Fixes bugs 120350, 171208,
+ 173821, 116661.
29 Sep 2006; Ioannis Aslanidis <deathwing00@gentoo.org>
ksensors-0.7.3.ebuild:
diff --git a/kde-misc/ksensors/files/digest-ksensors-0.7.3-r1 b/kde-misc/ksensors/files/digest-ksensors-0.7.3-r1
new file mode 100644
index 000000000000..7e3189109679
--- /dev/null
+++ b/kde-misc/ksensors/files/digest-ksensors-0.7.3-r1
@@ -0,0 +1,6 @@
+MD5 4f6c5d7dea5e637e772d17f1e547d6f1 ksensors-0.7.3.tar.gz 864466
+RMD160 e4f35ca5b17d326eaee0b718ce683118c4c71b11 ksensors-0.7.3.tar.gz 864466
+SHA256 ca1f91cae6303a661fb7b08549cb4813ad43880aaba26297cab7f08904e96660 ksensors-0.7.3.tar.gz 864466
+MD5 6568816bdd50ab9bf10c4184250bf232 ksensors_0.7.3-13.diff.gz 18201
+RMD160 bb7e3463ca0d9a834b5eb06afc95100de7c4263c ksensors_0.7.3-13.diff.gz 18201
+SHA256 063819ac7e3f11afee022a3994684f942e35af2ee7e3f0c917d10093de09454b ksensors_0.7.3-13.diff.gz 18201
diff --git a/kde-misc/ksensors/files/ksensors-0.7.3-hddtemp-path.patch b/kde-misc/ksensors/files/ksensors-0.7.3-hddtemp-path.patch
new file mode 100644
index 000000000000..2eb32ad80b58
--- /dev/null
+++ b/kde-misc/ksensors/files/ksensors-0.7.3-hddtemp-path.patch
@@ -0,0 +1,29 @@
+--- ksensors-0.7.3.orig/src/hdsensorslist.cpp 2007-04-15 02:15:32.000000000 +0200
++++ ksensors-0.7.3/src/hdsensorslist.cpp 2007-04-15 02:18:27.000000000 +0200
+@@ -46,7 +46,7 @@
+
+ for(QStringList::Iterator it = disks.begin(); it != disks.end(); ++it ) {
+ ProcessExec proc;
+- proc << "hddtemp" << "-q";
++ proc << "/usr/sbin/hddtemp" << "-q";
+ proc << *it;
+ if(proc.runAndWait()) {
+ double value;
+@@ -87,7 +87,7 @@
+
+ if(params.count()>0) {
+ process= new ProcessExec;
+- *process << "hddtemp" << "-q" << params;
++ *process << "/usr/sbin/hddtemp" << "-q" << params;
+ connect( process, SIGNAL(processExited(KProcess *)), this, SLOT(slotProcessExited(KProcess *)) );
+ process->run();
+ }
+@@ -139,7 +139,7 @@
+ {
+ ProcessExec proc;
+
+- proc << "hddtemp" << "-v" ;
++ proc << "/usr/sbin/hddtemp" << "-v" ;
+ if(proc.runAndWait()) {
+ if(proc.getStdoutData().contains("ERROR")==0) return true;
+ qWarning("HddTemp Error:\n%s", proc.getStdoutData().ascii());
diff --git a/kde-misc/ksensors/files/ksensors-0.7.3-ibm-acpi.patch b/kde-misc/ksensors/files/ksensors-0.7.3-ibm-acpi.patch
new file mode 100644
index 000000000000..79e2f16767eb
--- /dev/null
+++ b/kde-misc/ksensors/files/ksensors-0.7.3-ibm-acpi.patch
@@ -0,0 +1,222 @@
+--- ksensors-0.7.3.orig/src/i8ksensorslist.cpp 2003-10-27 06:44:40.000000000 +0800
++++ ksensors-0.7.3/src/i8ksensorslist.cpp 2005-12-25 11:48:51.000000000 +0800
+@@ -65,7 +65,70 @@
+ rightFan->readConfig();
+ }
+
+- if ( (acpiAvail=(AcpiAvailable()==0)) )
++ if (ibmAcpiAvail=(IbmAcpiAvailable()==0))
++ {
++ cpuTempAcpiIbm= new Sensor(this);
++ cpuTempAcpiIbm->setType(Sensor::lmTemp);
++ cpuTempAcpiIbm->setName("cputemp");
++ cpuTempAcpiIbm->setDescription("CPU Temp");
++ cpuTempAcpiIbm->setValueMax (80 , Sensor::dgCelsius);
++ cpuTempAcpiIbm->setValueMin ( 0 , Sensor::dgCelsius);
++ cpuTempAcpiIbm->setValueIdeal(30 , Sensor::dgCelsius);
++ cpuTempAcpiIbm->setValue ( 0 , Sensor::dgCelsius);
++ cpuTempAcpiIbm->readConfig();
++
++ pciTempAcpiIbm= new Sensor(this);
++ pciTempAcpiIbm->setType(Sensor::lmTemp);
++ pciTempAcpiIbm->setName("pictmp");
++ pciTempAcpiIbm->setDescription("Mini PCI Temp");
++ pciTempAcpiIbm->setValueMax (55 , Sensor::dgCelsius);
++ pciTempAcpiIbm->setValueMin ( 0 , Sensor::dgCelsius);
++ pciTempAcpiIbm->setValueIdeal(25 , Sensor::dgCelsius);
++ pciTempAcpiIbm->setValue ( 0 , Sensor::dgCelsius);
++ pciTempAcpiIbm->readConfig();
++
++ hddTempAcpiIbm= new Sensor(this);
++ hddTempAcpiIbm->setType(Sensor::lmTemp);
++ hddTempAcpiIbm->setName("hddtmp");
++ hddTempAcpiIbm->setDescription("HDD Temp");
++ hddTempAcpiIbm->setValueMax (40 , Sensor::dgCelsius);
++ hddTempAcpiIbm->setValueMin ( 0 , Sensor::dgCelsius);
++ hddTempAcpiIbm->setValueIdeal(20 , Sensor::dgCelsius);
++ hddTempAcpiIbm->setValue ( 0 , Sensor::dgCelsius);
++ hddTempAcpiIbm->readConfig();
++
++ gpuTempAcpiIbm= new Sensor(this);
++ gpuTempAcpiIbm->setType(Sensor::lmTemp);
++ gpuTempAcpiIbm->setName("gputmp");
++ gpuTempAcpiIbm->setDescription("GPU Temp");
++ gpuTempAcpiIbm->setValueMax (60 , Sensor::dgCelsius);
++ gpuTempAcpiIbm->setValueMin ( 0 , Sensor::dgCelsius);
++ gpuTempAcpiIbm->setValueIdeal(25 , Sensor::dgCelsius);
++ gpuTempAcpiIbm->setValue ( 0 , Sensor::dgCelsius);
++ gpuTempAcpiIbm->readConfig();
++
++ bat0TempAcpiIbm= new Sensor(this);
++ bat0TempAcpiIbm->setType(Sensor::lmTemp);
++ bat0TempAcpiIbm->setName("bat0tmp");
++ bat0TempAcpiIbm->setDescription("BAT0 Temp");
++ bat0TempAcpiIbm->setValueMax (40 , Sensor::dgCelsius);
++ bat0TempAcpiIbm->setValueMin ( 0 , Sensor::dgCelsius);
++ bat0TempAcpiIbm->setValueIdeal(30 , Sensor::dgCelsius);
++ bat0TempAcpiIbm->setValue ( 0 , Sensor::dgCelsius);
++ bat0TempAcpiIbm->readConfig();
++
++ bat1TempAcpiIbm= new Sensor(this);
++ bat1TempAcpiIbm->setType(Sensor::lmTemp);
++ bat1TempAcpiIbm->setName("bat1tmp");
++ bat1TempAcpiIbm->setDescription("BAT1 Temp");
++ bat1TempAcpiIbm->setValueMax (40 , Sensor::dgCelsius);
++ bat1TempAcpiIbm->setValueMin ( 0 , Sensor::dgCelsius);
++ bat1TempAcpiIbm->setValueIdeal(30 , Sensor::dgCelsius);
++ bat1TempAcpiIbm->setValue ( 0 , Sensor::dgCelsius);
++ bat1TempAcpiIbm->readConfig();
++ }
++
++ if ( (!ibmAcpiAvail) && (acpiAvail=(AcpiAvailable()==0)) )
+ {
+ cpuTempAcpi= new Sensor(this);
+ cpuTempAcpi->setType(Sensor::lmTemp);
+@@ -77,35 +140,51 @@
+ cpuTempAcpi->setValue (30 , Sensor::dgCelsius);
+ cpuTempAcpi->readConfig();
+ }
+-
+ updateSensors();
+ }
+
+ I8KSensorsList::~I8KSensorsList(){
+ }
+
+-
+ void I8KSensorsList::updateSensors()
+ {
+-double t,f1,f2;
++double t,f1,f2, ct,pt,ht,gt,bt0,na0,bt1,na1;
+
+ if(i8kAvail && !getI8KInfo(&t,&f1,&f2)) {
+ cpuTemp->setValue(t,Sensor::dgCelsius);
+ leftFan->setValue(f1);
+ rightFan->setValue(f2);
+ }
+- if(acpiAvail && !getAcpiTemperature(&t)) {
++
++ if(ibmAcpiAvail && !getIbmAcpiTemperature(&ct,&pt,&ht,&gt,&bt0,&na0,&bt1,&na1)) {
++ cpuTempAcpiIbm->setValue(ct,Sensor::dgCelsius);
++ pciTempAcpiIbm->setValue(pt,Sensor::dgCelsius);
++ hddTempAcpiIbm->setValue(ht,Sensor::dgCelsius);
++ gpuTempAcpiIbm->setValue(gt,Sensor::dgCelsius);
++ bat0TempAcpiIbm->setValue(bt0,Sensor::dgCelsius);
++ bat1TempAcpiIbm->setValue(bt1,Sensor::dgCelsius);
++ }
++
++ if(!ibmAcpiAvail && acpiAvail && !getAcpiTemperature(&t)) {
+ cpuTempAcpi->setValue(t,Sensor::dgCelsius);
+ }
+-}
+
++}
+
+ int I8KSensorsList::AcpiAvailable()
+ {
+ double t;
++
+ return getAcpiTemperature(&t);
+ }
+
++int I8KSensorsList::IbmAcpiAvailable()
++{
++ double t0,t1,t2,t3,t4,t5,t6,t7;
++
++ return getIbmAcpiTemperature(&t0,&t1,&t2,&t3,&t4,&t5,&t6,&t7);
++}
++
+ int I8KSensorsList::I8KOnlyAvailable()
+ {
+ double d1,d2,d3;
+@@ -122,7 +201,7 @@
+ case -3: qWarning("I18K Warning: Only format version 1.0 is supported. Inform the author."); break;
+ }
+
+- return (result==0 || AcpiAvailable()==0);
++ return (result==0 || AcpiAvailable()==0 || IbmAcpiAvailable()==0);
+ }
+
+
+--- ksensors-0.7.3.orig/src/i8ksensorslist.h 2003-10-27 06:29:33.000000000 +0800
++++ ksensors-0.7.3/src/i8ksensorslist.h 2005-12-25 10:30:14.000000000 +0800
+@@ -42,13 +42,25 @@
+
+ bool i8kAvail;
+ bool acpiAvail;
++ bool ibmAcpiAvail;
+
+ Sensor *cpuTempAcpi;
++
++ Sensor *cpuTempAcpiIbm;
++ Sensor *pciTempAcpiIbm;
++ Sensor *hddTempAcpiIbm;
++ Sensor *gpuTempAcpiIbm;
++ Sensor *bat0TempAcpiIbm;
++ Sensor *na0TempAcpiIbm;
++ Sensor *bat1TempAcpiIbm;
++ Sensor *na1TempAcpiIbm;
++
+ Sensor *cpuTemp;
+ Sensor *leftFan;
+ Sensor *rightFan;
+
+ static int AcpiAvailable();
++ static int IbmAcpiAvailable();
+ static int I8KOnlyAvailable();
+ };
+
+--- ksensors-0.7.3.orig/src/procinfo.cpp 2003-10-27 06:45:41.000000000 +0800
++++ ksensors-0.7.3/src/procinfo.cpp 2005-12-25 12:31:12.000000000 +0800
+@@ -84,7 +84,8 @@
+ {
+ char buf[128];
+
+- if(read_file("/proc/acpi/thermal_zone/THRM/temperature", buf, sizeof(buf))<= 0) return -1;
++ if((read_file("/proc/acpi/thermal_zone/THRM/temperature", buf, sizeof(buf))<= 0) &&
++ (read_file("/proc/acpi/thermal_zone/THM0/temperature", buf, sizeof(buf))<= 0)) return -1;
+
+ sscanf(buf, "temperature: %lf C", cpuTemp);
+
+@@ -92,6 +93,23 @@
+ }
+
+
++// ********* IBM Acpi *************************************
++// cat /proc/acpi/ibm/thermal (ibm_acpi module) if available
++// temperatures: 46 45 34 48 32 -128 29 -128
++
++int getIbmAcpiTemperature(double *cpuTemp, double *pciTemp, double *hddTemp, double *gpuTemp,
++ double *bat0Temp, double *na0Temp, double *bat1Temp, double *na1Temp)
++{
++char buf[128];
++
++ if(read_file("/proc/acpi/ibm/thermal", buf, sizeof(buf))<= 0) return -1;
++
++ sscanf(buf, "temperatures: %lf %lf %lf %lf %lf %lf %lf %lf", cpuTemp, pciTemp, hddTemp, gpuTemp,
++ bat0Temp, na0Temp, bat1Temp, na1Temp);
++
++ return 0;
++}
++
+ int getMemInfo(int *RamTotal,int *RamUsed,int *SwapTotal, int *SwapUsed)
+ {
+ char buf[4096];
+@@ -138,7 +156,7 @@
+
+ if(read_file("/proc/stat", buf, sizeof(buf)) <= 0) return false;
+
+- sscanf(buf, "cpu %u %u %u %u",user,nice,system,idle);
++ sscanf(buf, "cpu %d %d %d %d",user,nice,system,idle);
+
+ return true;
+ }
+
+--- ksensors-0.7.3.orig/src/procinfo.h 2003-10-27 06:28:46.000000000 +0800
++++ ksensors-0.7.3/src/procinfo.h 2005-12-25 10:24:11.000000000 +0800
+@@ -21,3 +21,5 @@
+ int getUpTime();
+ int getI8KInfo(double *cpuTemp, double *leftFan, double *rightFan);
+ int getAcpiTemperature(double *cpuTemp);
++int getIbmAcpiTemperature(double *cpuTemp, double *pciTemp, double *hddTemp, double *gpuTemp,
++ double *bat0Temp, double *na0Temp, double *bat1Temp, double *na1Temp);
diff --git a/kde-misc/ksensors/files/ksensors.desktop b/kde-misc/ksensors/files/ksensors.desktop
new file mode 100644
index 000000000000..c028abef0998
--- /dev/null
+++ b/kde-misc/ksensors/files/ksensors.desktop
@@ -0,0 +1,15 @@
+[Desktop Entry]
+Encoding=UTF-8
+Name=ksensors
+Exec=ksensors
+Icon=ksensors
+Type=Application
+Comment=KSensors - A nice lmsensors frontend for KDE
+Comment[cs]=KSensors - Pěkné rozhraní pro lmsemsors v KDE
+Comment[de]=KSensors - Ein benutzerfreundliches lmsensors Frontend für KDE
+Comment[es]=KSensors - Un agradable lmsensors frontend para KDE
+Comment[fr]=KSensors - Un frontend sympatique pour lm-sensors et KDE
+Comment[nb]=KSensors - Ett behagelig lmsensors-grensesnitt for KDE
+Comment[nl]=KSensors - Een gebruiksvriendelijke interface voor KDE
+Comment[pl]=KSensors - Ładny frondend lmsensors dla KDE
+Comment[sv]=KSensors - Ett trevligt grnssnitt mot lmsensors fr KDE
diff --git a/kde-misc/ksensors/ksensors-0.7.3-r1.ebuild b/kde-misc/ksensors/ksensors-0.7.3-r1.ebuild
new file mode 100644
index 000000000000..1ab0b5e66865
--- /dev/null
+++ b/kde-misc/ksensors/ksensors-0.7.3-r1.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/kde-misc/ksensors/ksensors-0.7.3-r1.ebuild,v 1.1 2007/04/15 02:03:53 philantrop Exp $
+
+inherit kde
+
+DESCRIPTION="KSensors - a nice lm_sensors frontend for KDE"
+SRC_URI="mirror://sourceforge/ksensors/${P}.tar.gz
+ mirror://debian/pool/main/k/ksensors/${PN}_${PV}-13.diff.gz"
+HOMEPAGE="http://ksensors.sourceforge.net/"
+LICENSE="GPL-2"
+
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="hddtemp ibmacpi"
+
+DEPEND=">=sys-apps/lm_sensors-2.6.3"
+
+RDEPEND="${DEPEND}
+ hddtemp? ( >=app-admin/hddtemp-0.3_beta15-r1 )"
+
+need-kde 3
+
+src_unpack() {
+ kde_src_unpack
+
+ cd ${WORKDIR}
+
+ # Debian patchset, fixes bugs 120350, 171208, 173821
+ epatch ${PN}_${PV}-13.diff
+
+ # On Gentoo hddtemp resides in /usr/sbin which is not in the user's
+ # path. Thus, call hddtemp with full path.
+ use hddtemp && epatch ${FILESDIR}/${P}-hddtemp-path.patch
+
+ # User-contributed patch, fixes bug 116661
+ use ibmacpi && epatch ${FILESDIR}/${P}-ibm-acpi.patch
+}
+
+src_install() {
+ kde_src_install
+
+ dodoc README AUTHORS TODO ChangeLog FAQ INSTALL NEWS
+ dodoc LEEME LIESMICH LISEZMOI
+
+ docinto debian
+ dodoc debian/{changelog,copyright}
+ doman debian/ksensors.1
+
+ # Remove obsolete menu entry
+ rm -fR ${D}/usr/share/applnk/
+
+ insinto /usr/share/applications/kde
+ doins ${FILESDIR}/ksensors.desktop
+}
+
+pkg_postinst() {
+ kde_pkg_postinst
+
+ if use hddtemp; then
+ [[ -u "${ROOT}"/usr/sbin/hddtemp ]] || \
+ elog "You need to run \"chmod u+s /usr/sbin/hddtemp\" to show disk temperatures."
+ fi
+}