diff options
author | Christian Heim <phreak@gentoo.org> | 2006-07-16 09:43:37 +0000 |
---|---|---|
committer | Christian Heim <phreak@gentoo.org> | 2006-07-16 09:43:37 +0000 |
commit | f77e9f8c5607cd589b0c457ece36b56d2f3ac671 (patch) | |
tree | df4c8cc7769ff8399ff753ceeb65966077f6dfbb /sys-power | |
parent | ppc stable, bug #139053 (diff) | |
download | historical-f77e9f8c5607cd589b0c457ece36b56d2f3ac671.tar.gz historical-f77e9f8c5607cd589b0c457ece36b56d2f3ac671.tar.bz2 historical-f77e9f8c5607cd589b0c457ece36b56d2f3ac671.zip |
Adding a patch to restore the default state (#140505 thanks to Brian Harring <ferringb at gmail.com>)
Package-Manager: portage-2.1.1_pre3
Diffstat (limited to 'sys-power')
-rw-r--r-- | sys-power/cpufrequtils/ChangeLog | 10 | ||||
-rw-r--r-- | sys-power/cpufrequtils/cpufrequtils-002-r1.ebuild | 48 | ||||
-rw-r--r-- | sys-power/cpufrequtils/files/cpufrequtils-002-init.d | 31 | ||||
-rw-r--r-- | sys-power/cpufrequtils/files/digest-cpufrequtils-002-r1 | 3 |
4 files changed, 84 insertions, 8 deletions
diff --git a/sys-power/cpufrequtils/ChangeLog b/sys-power/cpufrequtils/ChangeLog index 7702c47599d2..f660c34fba31 100644 --- a/sys-power/cpufrequtils/ChangeLog +++ b/sys-power/cpufrequtils/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for sys-power/cpufrequtils # Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-power/cpufrequtils/ChangeLog,v 1.27 2006/07/13 19:03:02 phreak Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-power/cpufrequtils/ChangeLog,v 1.28 2006/07/16 09:43:37 phreak Exp $ + +*cpufrequtils-002-r1 (16 Jul 2006) + + 16 Jul 2006; Christian Heim <phreak@gentoo.org> + files/cpufrequtils-002-init.d, -cpufrequtils-002.ebuild, + +cpufrequtils-002-r1.ebuild: + Adding a patch to restore the default state (#140505 thanks to Brian Harring + <ferringb at gmail.com>) 13 Jul 2006; Christian Heim <phreak@gentoo.org> metadata.xml, cpufrequtils-001.ebuild, cpufrequtils-002.ebuild: diff --git a/sys-power/cpufrequtils/cpufrequtils-002-r1.ebuild b/sys-power/cpufrequtils/cpufrequtils-002-r1.ebuild new file mode 100644 index 000000000000..9ba938efa8f5 --- /dev/null +++ b/sys-power/cpufrequtils/cpufrequtils-002-r1.ebuild @@ -0,0 +1,48 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-power/cpufrequtils/cpufrequtils-002-r1.ebuild,v 1.1 2006/07/16 09:43:37 phreak Exp $ + +inherit eutils toolchain-funcs multilib + +DESCRIPTION="Userspace utilities for the Linux kernel cpufreq subsystem" +HOMEPAGE="http://www.kernel.org/pub/linux/utils/kernel/cpufreq/cpufrequtils.html" +SRC_URI="mirror://kernel/linux/utils/kernel/cpufreq/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~sparc ~x86" + +IUSE="debug nls" +DEPEND="sys-fs/sysfsutils" + +src_unpack() { + unpack ${A} + + cd "${S}" + epatch "${FILESDIR}"/${P}-parallel-make.patch +} + +src_compile() { + local debug=false nls=false + + use debug && debug=true + use nls && nls=true + + emake V=true DEBUG=${debug} NLS=${nls} \ + CC=$(tc-getCC) LD=$(tc-getCC) AR=$(tc-getAR) STRIP=echo RANLIB=$(tc-getRANLIB) \ + || die "emake failed" +} + +src_install() { + local nls=false + + use nls && nls=true + + make DESTDIR="${D}" NLS=${nls} mandir=/usr/share/man libdir=/usr/$(get_libdir) \ + install || die "make install failed" + + newconfd "${FILESDIR}"/${P}-conf.d ${PN} + newinitd "${FILESDIR}"/${P}-init.d ${PN} + + dodoc AUTHORS README +} diff --git a/sys-power/cpufrequtils/files/cpufrequtils-002-init.d b/sys-power/cpufrequtils/files/cpufrequtils-002-init.d index c9eb034f876a..4948cf77f9f1 100644 --- a/sys-power/cpufrequtils/files/cpufrequtils-002-init.d +++ b/sys-power/cpufrequtils/files/cpufrequtils-002-init.d @@ -1,26 +1,43 @@ #!/sbin/runscript # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-power/cpufrequtils/files/cpufrequtils-002-init.d,v 1.1 2006/06/01 12:02:01 brix Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-power/cpufrequtils/files/cpufrequtils-002-init.d,v 1.2 2006/07/16 09:43:37 phreak Exp $ checkconfig() { if [ -z "${GOVERNOR}" ]; then eerror "No governor set in /etc/conf.d/cpufrequtils" return 1 fi + if [ -z "${RESTORED_GOVERNOR}" ]; then + RESTORED_GOVERNOR=performance + fi } -start() { - local cpu n - checkconfig || return 1 +affect_change() { + if [ "$#" != "2" ]; then + eerror "affect_change called in correctly, need two args, action, and governor" + return 1 + fi + local cpu n for cpu in /sys/devices/system/cpu/*; do - n=$(basename ${cpu}) + n=${cpu##*/} n=${n/cpu/} - ebegin "Enabling ${GOVERNOR} cpufreq governor on CPU${n}" - cpufreq-set -c ${n} -g ${GOVERNOR} + ebegin "${1} ${2} cpufreq governor on CPU${n}" + cpufreq-set -c ${n} -g "${2}" eend ${?} done } + + +start() { + checkconfig || return 1 + affect_change "Enabling" "${GOVERNOR}" +} + +stop() { + checkconfig || return 1 + affect_change "Disabling" "${RESTORED_GOVERNOR}" +} diff --git a/sys-power/cpufrequtils/files/digest-cpufrequtils-002-r1 b/sys-power/cpufrequtils/files/digest-cpufrequtils-002-r1 new file mode 100644 index 000000000000..f92e5a3c3901 --- /dev/null +++ b/sys-power/cpufrequtils/files/digest-cpufrequtils-002-r1 @@ -0,0 +1,3 @@ +MD5 93291a0d705ee2e19a6d7491b223c9f2 cpufrequtils-002.tar.bz2 35313 +RMD160 da4477af89116d78cbe92e55247cee3f1d1b9f73 cpufrequtils-002.tar.bz2 35313 +SHA256 98be6a75f06c535d0acc6948bb1b923c7c400c038c433acfa074c14c89edc39b cpufrequtils-002.tar.bz2 35313 |