diff options
author | Sergey Popov <pinkbyte@gentoo.org> | 2012-11-19 10:57:20 +0000 |
---|---|---|
committer | Sergey Popov <pinkbyte@gentoo.org> | 2012-11-19 10:57:20 +0000 |
commit | 769c744c96db8c4f8e7b6ada1b80625d38aa8a1c (patch) | |
tree | 6dba26905a3b66042212d523679e13d4ff2bf889 /sys-power | |
parent | version bump (diff) | |
download | gentoo-2-769c744c96db8c4f8e7b6ada1b80625d38aa8a1c.tar.gz gentoo-2-769c744c96db8c4f8e7b6ada1b80625d38aa8a1c.tar.bz2 gentoo-2-769c744c96db8c4f8e7b6ada1b80625d38aa8a1c.zip |
Revision bump: EAPI 4, QA cleanups, support for user patches, fix for bug #389749
(Portage version: 2.2.0_alpha142/cvs/Linux x86_64, unsigned Manifest commit)
Diffstat (limited to 'sys-power')
-rw-r--r-- | sys-power/cpufreqd/ChangeLog | 9 | ||||
-rw-r--r-- | sys-power/cpufreqd/cpufreqd-2.4.2-r2.ebuild | 77 | ||||
-rw-r--r-- | sys-power/cpufreqd/files/cpufreqd-battery-attr-name.patch | 36 |
3 files changed, 121 insertions, 1 deletions
diff --git a/sys-power/cpufreqd/ChangeLog b/sys-power/cpufreqd/ChangeLog index 6873275d89ce..72a9e3afa463 100644 --- a/sys-power/cpufreqd/ChangeLog +++ b/sys-power/cpufreqd/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for sys-power/cpufreqd # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-power/cpufreqd/ChangeLog,v 1.65 2012/11/18 11:41:19 pacho Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-power/cpufreqd/ChangeLog,v 1.66 2012/11/19 10:57:20 pinkbyte Exp $ + +*cpufreqd-2.4.2-r2 (19 Nov 2012) + + 19 Nov 2012; Sergey Popov <pinkbyte@gentoo.org> +cpufreqd-2.4.2-r2.ebuild, + +files/cpufreqd-battery-attr-name.patch: + Revision bump: EAPI 4, QA cleanups, support for user patches, fix for bug + #389749 18 Nov 2012; Pacho Ramos <pacho@gentoo.org> metadata.xml: Drop mobile herd as talked in gentoo-dev ML diff --git a/sys-power/cpufreqd/cpufreqd-2.4.2-r2.ebuild b/sys-power/cpufreqd/cpufreqd-2.4.2-r2.ebuild new file mode 100644 index 000000000000..af872ac7cf2c --- /dev/null +++ b/sys-power/cpufreqd/cpufreqd-2.4.2-r2.ebuild @@ -0,0 +1,77 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-power/cpufreqd/cpufreqd-2.4.2-r2.ebuild,v 1.1 2012/11/19 10:57:20 pinkbyte Exp $ + +EAPI="4" + +inherit eutils + +NVCLOCK_VERSION="0.8b" + +DESCRIPTION="CPU Frequency Daemon" +HOMEPAGE="http://www.linux.it/~malattia/wiki/index.php/Cpufreqd" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2 + nvidia? ( http://www.linuxhardware.org/nvclock/nvclock${NVCLOCK_VERSION}.tar.gz )" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86" + +IUSE="acpi apm lm_sensors nforce2 nvidia pmu" +RDEPEND=">=sys-power/cpufrequtils-002 + sys-fs/sysfsutils + lm_sensors? ( >sys-apps/lm_sensors-3 )" +DEPEND="sys-apps/sed + ${RDEPEND}" + +DOCS=( AUTHORS ChangeLog NEWS README TODO ) + +src_prepare() { + epatch "${FILESDIR}"/${PN}-conf.d.patch + epatch "${FILESDIR}"/${P}-PATH_MAX.patch #318287 + epatch "${FILESDIR}"/${PN}-battery-attr-name.patch #389749 + + if use nvidia; then + cd "${WORKDIR}/nvclock${NVCLOCK_VERSION}" + epatch "${FILESDIR}/nvclock${NVCLOCK_VERSION}-fpic.patch" + fi + + epatch_user +} + +src_configure() { + local config + + if use nvidia; then + cd "${WORKDIR}/nvclock${NVCLOCK_VERSION}" || die 'cd to nvclock dir failed' + econf \ + --disable-gtk \ + --disable-qt \ + --disable-nvcontrol + emake -j1 + config="--enable-nvclock=${WORKDIR}/nvclock${NVCLOCK_VERSION}" + fi + + cd "${S}" || die 'cd to source dir failed' + econf \ + $(use_enable acpi) \ + $(use_enable apm) \ + $(use_enable lm_sensors sensors) \ + $(use_enable nforce2) \ + $(use_enable pmu) \ + ${config} +} + +src_install() { + default + prune_libtool_files --all + newinitd "${FILESDIR}"/${PN}-init.d ${PN} +} + +pkg_postinst() { + if [ -f "${ROOT}"/etc/conf.d/cpufreqd ] ; then + ewarn "An old \"/etc/conf.d/cpufreqd\" file was found. It breaks" + ewarn "the new init script! Please remove it." + ewarn "# rm /etc/conf.d/cpufreqd" + fi +} diff --git a/sys-power/cpufreqd/files/cpufreqd-battery-attr-name.patch b/sys-power/cpufreqd/files/cpufreqd-battery-attr-name.patch new file mode 100644 index 000000000000..e35cac15cfbd --- /dev/null +++ b/sys-power/cpufreqd/files/cpufreqd-battery-attr-name.patch @@ -0,0 +1,36 @@ +--- src/cpufreqd_acpi_battery.c.orig 2010-04-18 15:57:41.000000000 +0200 ++++ src/cpufreqd_acpi_battery.c 2012-04-07 14:26:54.409641936 +0200 +@@ -36,6 +36,7 @@ + #define PRESENT "present" + #define STATUS "status" + #define CURRENT_NOW "current_now" ++#define POWER_NOW "power_now" + + struct battery_info { + int capacity; +@@ -146,8 +147,12 @@ + if (!binfo->status) + return -1; + binfo->current_now = get_class_device_attribute(binfo->cdev, CURRENT_NOW); +- if (!binfo->current_now) +- return -1; ++ if (!binfo->current_now) { ++ /* try the "power_now" name */ ++ binfo->current_now = get_class_device_attribute(binfo->cdev, POWER_NOW); ++ if (!binfo->current_now) ++ return -1; ++ } + + /* read the last full capacity, this is not going to change + * very often, so no need to poke it later */ +@@ -311,6 +316,10 @@ + + /* Read battery informations */ + for (i = 0; i < bat_dir_num; i++) { ++ if (!info[i].open) { ++ clog(LOG_INFO, "Skipping %s (closed)\n", info[i].cdev->name); ++ continue; ++ } + + if (read_int(info[i].present, &info[i].is_present) != 0) { + clog(LOG_INFO, "Skipping %s\n", info[i].cdev->name); |