diff options
author | Henrik Brix Andersen <brix@gentoo.org> | 2006-01-02 15:14:58 +0000 |
---|---|---|
committer | Henrik Brix Andersen <brix@gentoo.org> | 2006-01-02 15:14:58 +0000 |
commit | 5d9c77dc6761a0ca29173cd2f203bbfeccccf766 (patch) | |
tree | e3a9fe788a4d4c8b556885dc4ea578f2e5e22632 /app-laptop/laptop-mode-tools | |
parent | Stable on sparc (diff) | |
download | historical-5d9c77dc6761a0ca29173cd2f203bbfeccccf766.tar.gz historical-5d9c77dc6761a0ca29173cd2f203bbfeccccf766.tar.bz2 historical-5d9c77dc6761a0ca29173cd2f203bbfeccccf766.zip |
Fix setting CPU governor, bug #117385. Thanks to Alessandro Guido.
Package-Manager: portage-2.0.53
Diffstat (limited to 'app-laptop/laptop-mode-tools')
5 files changed, 125 insertions, 5 deletions
diff --git a/app-laptop/laptop-mode-tools/ChangeLog b/app-laptop/laptop-mode-tools/ChangeLog index 590bc4c23ed4..ed7cf3045702 100644 --- a/app-laptop/laptop-mode-tools/ChangeLog +++ b/app-laptop/laptop-mode-tools/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for app-laptop/laptop-mode-tools -# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-laptop/laptop-mode-tools/ChangeLog,v 1.21 2005/12/14 18:26:12 brix Exp $ +# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/app-laptop/laptop-mode-tools/ChangeLog,v 1.22 2006/01/02 15:14:58 brix Exp $ + +*laptop-mode-tools-1.11-r1 (02 Jan 2006) + + 02 Jan 2006; Henrik Brix Andersen <brix@gentoo.org> + +files/laptop-mode-tools-1.11-cpu-governor.patch, + +laptop-mode-tools-1.11-r1.ebuild: + Fix setting CPU governor, bug #117385. Thanks to Alessandro Guido. 14 Dec 2005; Henrik Brix Andersen <brix@gentoo.org> -files/laptop-mode-tools-1.10-init.d, -laptop-mode-tools-1.10.ebuild: diff --git a/app-laptop/laptop-mode-tools/Manifest b/app-laptop/laptop-mode-tools/Manifest index a8e0bf04e680..2d2d4028df9c 100644 --- a/app-laptop/laptop-mode-tools/Manifest +++ b/app-laptop/laptop-mode-tools/Manifest @@ -1,5 +1,8 @@ +MD5 78d489634f6368914f24ab2d5929be13 ChangeLog 4093 +MD5 91cda7e11a920244b5252a3446832fd2 files/digest-laptop-mode-tools-1.11 73 +MD5 91cda7e11a920244b5252a3446832fd2 files/digest-laptop-mode-tools-1.11-r1 73 +MD5 a5bc5e181df64b01a3b907307ea14a64 files/laptop-mode-tools-1.11-cpu-governor.patch 739 +MD5 1f575c5875aa362aefe64463e0940fef files/laptop-mode-tools-1.11-init.d 703 +MD5 4d74b7a195b756717888a8ae4880dafc laptop-mode-tools-1.11-r1.ebuild 2402 MD5 5a3c3c3e037345a309c0aa78ba5b1f7b laptop-mode-tools-1.11.ebuild 2338 -MD5 f41585ba973864d62099657de5bae3ad ChangeLog 3838 MD5 b280eebc74d70d85e664debf1adce2c3 metadata.xml 255 -MD5 1f575c5875aa362aefe64463e0940fef files/laptop-mode-tools-1.11-init.d 703 -MD5 91cda7e11a920244b5252a3446832fd2 files/digest-laptop-mode-tools-1.11 73 diff --git a/app-laptop/laptop-mode-tools/files/digest-laptop-mode-tools-1.11-r1 b/app-laptop/laptop-mode-tools/files/digest-laptop-mode-tools-1.11-r1 new file mode 100644 index 000000000000..db6c2bd3bc3e --- /dev/null +++ b/app-laptop/laptop-mode-tools/files/digest-laptop-mode-tools-1.11-r1 @@ -0,0 +1 @@ +MD5 f5c882e2ba1953b80abd1d7cd38c3a51 laptop-mode-tools_1.11.tar.gz 51501 diff --git a/app-laptop/laptop-mode-tools/files/laptop-mode-tools-1.11-cpu-governor.patch b/app-laptop/laptop-mode-tools/files/laptop-mode-tools-1.11-cpu-governor.patch new file mode 100644 index 000000000000..6b55b754f529 --- /dev/null +++ b/app-laptop/laptop-mode-tools/files/laptop-mode-tools-1.11-cpu-governor.patch @@ -0,0 +1,12 @@ +diff -urp laptop-mode-tools-1.11/usr/sbin/laptop_mode laptop-mode-tools-1.11-cpu-governor/usr/sbin/laptop_mode +--- laptop-mode-tools-1.11/usr/sbin/laptop_mode 2005-10-29 16:37:26.000000000 +0200 ++++ laptop-mode-tools-1.11-cpu-governor/usr/sbin/laptop_mode 2006-01-02 16:09:10.000000000 +0100 +@@ -603,7 +603,7 @@ if [ $CONTROL_CPU_FREQUENCY -eq 1 ] ; th + echo "Setting CPU minimum frequency for cpu $THISCPU to $THIS_CPU_MINFREQ." > $OUTPUT + echo $THIS_CPU_MINFREQ > $THISCPU/cpufreq/scaling_min_freq + echo "Setting CPU frequency governor for cpu $THISCPU to $THIS_CPU_GOVERNOR." > $OUTPUT +- echo $THIS_GOVERNOR > $THISCPU/cpufreq/scaling_governor ++ echo $THIS_CPU_GOVERNOR > $THISCPU/cpufreq/scaling_governor + fi + done + fi diff --git a/app-laptop/laptop-mode-tools/laptop-mode-tools-1.11-r1.ebuild b/app-laptop/laptop-mode-tools/laptop-mode-tools-1.11-r1.ebuild new file mode 100644 index 000000000000..b90e4b26a857 --- /dev/null +++ b/app-laptop/laptop-mode-tools/laptop-mode-tools-1.11-r1.ebuild @@ -0,0 +1,97 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-laptop/laptop-mode-tools/laptop-mode-tools-1.11-r1.ebuild,v 1.1 2006/01/02 15:14:58 brix Exp $ + +inherit eutils fixheadtails linux-info + +MY_P=${PN}_${PV} + +DESCRIPTION="Linux kernel laptop_mode user-space utilities" +HOMEPAGE="http://www.xs4all.nl/~bsamwel/laptop_mode/tools/" +SRC_URI="http://www.xs4all.nl/~bsamwel/laptop_mode/tools/downloads/${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc x86" + +IUSE="acpi apm" + +DEPEND="acpi? ( sys-power/acpid ) + apm? ( sys-apps/apmd )" + +pkg_setup() { + linux-info_pkg_setup + + if kernel_is 2 6 && kernel_is lt 2 6 6; then + eerror + eerror "${P} requires kernel version 2.6.6 or newer." + eerror + die "${P} requires kernel version 2.6.6 or newer" + elif kernel_is 2 4 && kernel_is lt 2 4 23; then + eerror + eerror "${P} requires kernel version 2.4.23 or newer." + eerror/eti + die "${P} requires kernel version 2.4.23 or newer" + fi +} + +src_unpack() { + unpack ${A} + + ht_fix_file ${S}/usr/sbin/lm-profiler + + cd ${S} + epatch ${FILESDIR}/${P}-cpu-governor.patch +} + +src_install() { + dosbin usr/sbin/laptop_mode + dosbin usr/sbin/lm-profiler + + insinto /etc/laptop-mode + doins etc/laptop-mode/laptop-mode.conf + doins etc/laptop-mode/lm-profiler.conf + + newinitd ${FILESDIR}/${P}-init.d laptop_mode + + keepdir /etc/laptop-mode/batt-start + keepdir /etc/laptop-mode/batt-stop + keepdir /etc/laptop-mode/lm-ac-start + keepdir /etc/laptop-mode/lm-ac-stop + keepdir /etc/laptop-mode/nolm-ac-start + keepdir /etc/laptop-mode/nolm-ac-stop + + # do not install lm-syslog-setup man page, bug #105022 + rm -f man/lm-syslog-setup.8 + doman man/* + + dodoc Documentation/laptop-mode.txt README + + if use acpi; then + insinto /etc/acpi/events/ + doins etc/acpi/events/* + + exeinto /etc/acpi/actions/ + doexe etc/acpi/actions/* + fi + + if use apm; then + exeinto /etc/apm/event.d/ + doexe etc/apm/event.d/* + fi +} + +pkg_postinst() { + if ! use acpi && ! use apm; then + ewarn + ewarn "Without USE=\"acpi\" or USE=\"apm\" ${PN} can not" + ewarn "automatically disable laptop_mode on low battery." + ewarn + ewarn "This means you can lose up to 10 minutes of work if running" + ewarn "out of battery while laptop_mode is enabled." + ewarn + ewarn "Please see /usr/share/doc/${PF}/laptop-mode.txt.gz for further" + ewarn "information." + ewarn + fi +} |