changeset 191:6f48ae6f62bf

bump cpufrequtils to latest v6
author holger
date Wed, 25 Nov 2009 14:35:19 +0100
parents 11adf80154c3
children 38e70d03a68c
files sys-power/cpufrequtils/Manifest sys-power/cpufrequtils/cpufrequtils-006.ebuild sys-power/cpufrequtils/files/cpufrequtils-006-build.patch sys-power/cpufrequtils/files/cpufrequtils-006-nls.patch sys-power/cpufrequtils/files/cpufrequtils-conf.d-006 sys-power/cpufrequtils/files/cpufrequtils-init.d-006
diffstat 6 files changed, 174 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sys-power/cpufrequtils/Manifest	Wed Nov 25 14:35:19 2009 +0100
@@ -0,0 +1,6 @@
+AUX cpufrequtils-006-build.patch 844 RMD160 494f3e1c6681ac01e922bf4a527a8b89f878ea4b SHA1 1266a39a756ee9a2972a47d7b5b5833168146428 SHA256 5b33a052abab8cf33913ffbf649707a238ec4c13320985933552c1a8b0761f9a
+AUX cpufrequtils-006-nls.patch 1503 RMD160 e9508f2e11e52a8a90cd19dcb46ec8d8caf4d1b4 SHA1 54af00be7991ac4bbd8777254048639b6ab0f398 SHA256 74f01a677e50f0166054f025b595bf4ef82a8eb006713cc5e881b4cf763bb2f4
+AUX cpufrequtils-conf.d-006 277 RMD160 09bdd1c1b218f9aa9ce448b01eb0c9f0dc0613c2 SHA1 2befd01f2d527916eee5429920a083ea9543daa1 SHA256 602b65f6e9927bfb37a26a34c1b44bd4a87cdb2977b5547398e17432afe55727
+AUX cpufrequtils-init.d-006 531 RMD160 4bca2bc3868c3ef73bf53f3bbd83bd4c4a7164f4 SHA1 67d0fc02e59060358f5a82ea314830df19625524 SHA256 af83b2354bd8876efecd85762a61a40a4b498633e186cb85db7a22389936a2e6
+DIST cpufrequtils-006.tar.bz2 52315 RMD160 b60c1c897ca932c6251b1445a170c79da1e259ce SHA1 f6c824e446fd72d69c16867c6c1808d1baf5415e SHA256 b8e77854a1400b0cc73295f3ee5d0a0c3650438e677526a199e08f6680c15aa1
+EBUILD cpufrequtils-006.ebuild 1256 RMD160 f2fb61dda330c2245092d9b316b7861e754b398d SHA1 e8668ce2245795654c4ffc3f317fa0dc4c052180 SHA256 6e45cbc4f63286abc3bfb3e808bcac6a7e13bfd6b303a345cdf470f43186b658
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sys-power/cpufrequtils/cpufrequtils-006.ebuild	Wed Nov 25 14:35:19 2009 +0100
@@ -0,0 +1,48 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-power/cpufrequtils/cpufrequtils-005-r1.ebuild,v 1.5 2009/07/11 23:37:21 josejx 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 arm ppc ppc64 sparc x86"
+IUSE="debug nls"
+
+DEPEND="sys-fs/sysfsutils"
+
+src_unpack() {
+	unpack ${A}
+	cd "${S}"
+	epatch "${FILESDIR}"/${P}-build.patch
+	epatch "${FILESDIR}"/${P}-nls.patch #205576
+}
+
+ft() { use $1 && echo true || echo false ; }
+
+src_compile() {
+	emake \
+		OPTIMIZATION= V=true \
+		DEBUG=$(ft debug) \
+		NLS=$(ft nls) \
+		CC=$(tc-getCC) LD=$(tc-getCC) AR=$(tc-getAR) STRIP=echo RANLIB=$(tc-getRANLIB) \
+		|| die "emake failed"
+}
+
+src_install() {
+	emake \
+		DESTDIR="${D}" \
+		NLS=$(ft nls) \
+		mandir=/usr/share/man \
+		libdir=/usr/$(get_libdir) \
+		install || die "make install failed"
+
+	newconfd "${FILESDIR}"/${PN}-conf.d-006 ${PN}
+	newinitd "${FILESDIR}"/${PN}-init.d-006 ${PN}
+
+	dodoc AUTHORS README
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sys-power/cpufrequtils/files/cpufrequtils-006-build.patch	Wed Nov 25 14:35:19 2009 +0100
@@ -0,0 +1,24 @@
+--- Makefile
++++ Makefile
+@@ -158,10 +158,10 @@ endif
+ 
+ # if DEBUG is enabled, then we do not strip or optimize
+ ifeq ($(strip $(DEBUG)),true)
+-	CFLAGDEF  += -O1 -g -DDEBUG
++	CFLAGDEF  += -DDEBUG
+ 	STRIPCMD = /bin/true -Since_we_are_debugging
+ else
+-	CFLAGDEF  += $(OPTIMIZATION) -fomit-frame-pointer
++	CFLAGDEF  += $(OPTIMIZATION)
+ 	STRIPCMD = $(STRIP) -s --remove-section=.note --remove-section=.comment
+ endif
+ 
+@@ -191,7 +191,7 @@ libcpufreq: libcpufreq.la
+ 
+ cpufreq-%: libcpufreq.la $(UTIL_OBJS)
+ 	$(QUIET) $(CC) $(CFLAGDEF) $(CFLAGS) -g -I. -I./lib/ -c -o utils/$@.o utils/$*.c
+-	$(QUIET) $(CC) $(CFLAGDEF) $(CFLAGS) -g -I./lib/ -L. -L./.libs/ -lcpufreq -o $@ utils/$@.o
++	$(QUIET) $(CC) $(CFLAGDEF) $(CFLAGS) -g $(LDFLAGS) -I./lib/ -L. -L./.libs/ -o $@ utils/$@.o -lcpufreq
+ 	$(QUIET) $(STRIPCMD) $@
+ 
+ utils: cpufreq-info cpufreq-set
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sys-power/cpufrequtils/files/cpufrequtils-006-nls.patch	Wed Nov 25 14:35:19 2009 +0100
@@ -0,0 +1,67 @@
+--- cpufrequtils-006/Makefile
++++ cpufrequtils-006/Makefile
+@@ -147,6 +147,7 @@
+ ifeq ($(strip $(NLS)),true)
+ 	INSTALL_NLS += install-gmo
+ 	COMPILE_NLS += update-gmo
++	CFLAGDEF += -DNLS
+ endif
+ 
+ ifeq ($(strip $(CPUFRQ_BENCH)),true)
+--- cpufrequtils-006/utils/info.c
++++ cpufrequtils-006/utils/info.c
+@@ -10,7 +10,6 @@
+ #include <errno.h>
+ #include <stdlib.h>
+ #include <string.h>
+-#include <libintl.h>
+ #include <locale.h>
+ 
+ #include <getopt.h>
+@@ -18,9 +17,18 @@
+ #include "cpufreq.h"
+ 
+ 
++#ifdef NLS
++#include <libintl.h>
+ #define _(String) gettext (String)
+ #define gettext_noop(String) String
+ #define N_(String) gettext_noop (String)
++#else
++#define gettext_noop(String) String
++#define _(String) gettext_noop (String)
++#define gettext(String) gettext_noop (String)
++#define N_(String) gettext_noop (String)
++#define textdomain(String)
++#endif
+ 
+ #define LINE_LEN 10
+ 
+--- cpufrequtils-006/utils/set.c
++++ cpufrequtils-006/utils/set.c
+@@ -12,16 +12,24 @@
+ #include <limits.h>
+ #include <string.h>
+ #include <ctype.h>
+-#include <libintl.h>
+ #include <locale.h>
+ 
+ #include <getopt.h>
+ 
+ #include "cpufreq.h"
+ 
++#ifdef NLS
++#include <libintl.h>
+ #define _(String) gettext(String)
+ #define gettext_noop(String) String
+ #define N_(String) gettext_noop(String)
++#else
++#define gettext_noop(String) String
++#define _(String) gettext_noop (String)
++#define gettext(String) gettext_noop (String)
++#define N_(String) gettext_noop (String)
++#define textdomain(String)
++#endif
+ 
+ #define NORM_FREQ_LEN 32
+ 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sys-power/cpufrequtils/files/cpufrequtils-conf.d-006	Wed Nov 25 14:35:19 2009 +0100
@@ -0,0 +1,7 @@
+# /etc/conf.d/cpufrequtils: config file for /etc/init.d/cpufrequtils
+
+# Options when starting cpufreq (given to the `cpufreq-set` program)
+START_OPTS="--governor ondemand"
+
+# Options when stopping cpufreq (given to the `cpufreq-set` program)
+STOP_OPTS="--governor performance"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sys-power/cpufrequtils/files/cpufrequtils-init.d-006	Wed Nov 25 14:35:19 2009 +0100
@@ -0,0 +1,22 @@
+#!/sbin/runscript
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-power/cpufrequtils/files/cpufrequtils-init.d-005,v 1.2 2008/10/21 21:20:59 vapier Exp $
+
+affect_change() {
+	local c ret=0
+	ebegin "Running cpufreq-set $*"
+	for c in $(cpufreq-info -o | awk '$1 == "CPU" { print $2 }') ; do
+		cpufreq-set -c ${c} $*
+		: $((ret+=$?))
+	done
+	eend ${ret}
+}
+
+start() {
+	affect_change ${START_OPTS}
+}
+
+stop() {
+	affect_change ${STOP_OPTS}
+}