summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'x11-plugins')
-rw-r--r--x11-plugins/gkrellm-cpufreq/ChangeLog11
-rw-r--r--x11-plugins/gkrellm-cpufreq/Manifest1
-rw-r--r--x11-plugins/gkrellm-cpufreq/files/gkrellm-cpufreq-0.6.1-use-cpupower.patch50
-rw-r--r--x11-plugins/gkrellm-cpufreq/gkrellm-cpufreq-0.6.1.ebuild44
-rw-r--r--x11-plugins/gkrellm-cpufreq/metadata.xml8
5 files changed, 114 insertions, 0 deletions
diff --git a/x11-plugins/gkrellm-cpufreq/ChangeLog b/x11-plugins/gkrellm-cpufreq/ChangeLog
new file mode 100644
index 0000000..ec8e068
--- /dev/null
+++ b/x11-plugins/gkrellm-cpufreq/ChangeLog
@@ -0,0 +1,11 @@
+# ChangeLog for x11-plugins/gkrellm-cpufreq
+# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+*gkrellm-cpufreq-0.6.1 (07 Jan 2015)
+
+ 07 Jan 2015; Dustin Polke <DuPol@gmx.de> +gkrellm-cpufreq-0.6.1.ebuild,
+ +files/gkrellm-cpufreq-0.6.1-use-cpupower.patch, +metadata.xml:
+ Copy gkrellm-cpufreq-0.6.1.ebuild,v 1.4 from main tree and port it to
+ cpupower.
+
diff --git a/x11-plugins/gkrellm-cpufreq/Manifest b/x11-plugins/gkrellm-cpufreq/Manifest
new file mode 100644
index 0000000..eec59c1
--- /dev/null
+++ b/x11-plugins/gkrellm-cpufreq/Manifest
@@ -0,0 +1 @@
+DIST gkrellm2-cpufreq-0.6.1.tar.gz 13238 SHA256 ff0ce9f54f00979d1427da8660e9422696756f9d6290aa94d2689896e47049eb SHA512 29863f740acec09bc3ded30865d8049dba20430b4ba2a0f2386b12fd29a2befc0915dc96ab334b897c7670a5b9a2a1cdf8c3c5b27d04a1782bf06e8ab92d45cf WHIRLPOOL b116fc066676353f5bb29f94ea433930856ec54e6ca8665969597e6fca4e0806d0de36b30512f530777ec410d58bd99cab9575f341535b2deb721f43a43c1586
diff --git a/x11-plugins/gkrellm-cpufreq/files/gkrellm-cpufreq-0.6.1-use-cpupower.patch b/x11-plugins/gkrellm-cpufreq/files/gkrellm-cpufreq-0.6.1-use-cpupower.patch
new file mode 100644
index 0000000..5a6a2ce
--- /dev/null
+++ b/x11-plugins/gkrellm-cpufreq/files/gkrellm-cpufreq-0.6.1-use-cpupower.patch
@@ -0,0 +1,50 @@
+--- a/cpufreq.c
++++ b/cpufreq.c
+@@ -125,13 +125,13 @@ static void next_governor(unsigned int c
+
+ static void governor_userspace(unsigned int cpu) {
+ char cmd[length];
+- sprintf(cmd, "sudo cpufreq-set -c %u -g userspace", cpu);
++ sprintf(cmd, "sudo cpupower -c %u frequency-set -g userspace", cpu);
+ system(cmd);
+ }
+
+ static void set_frequency(unsigned int cpu, unsigned long freq) {
+ char cmd[length];
+- sprintf(cmd, "sudo cpufreq-set -c %u -f %lu", cpu, freq );
++ sprintf(cmd, "sudo cpupower -c %u frequency-set -f %lu", cpu, freq );
+ system(cmd);
+ }
+
+--- a/cpufreqnextgovernor
++++ b/cpufreqnextgovernor
+@@ -3,10 +3,10 @@
+ cpu="$1"
+
+ # determine actual governor
+-actual_gov=`cpufreq-info -c $cpu -p | sed 's/.*\ //'`
++actual_gov=`cpupower -c $cpu frequency-info -p | tail -1 | sed 's/.*\ //'`
+
+ # determine available governors
+-avail_gov=`cpufreq-info -c $cpu -g`
++avail_gov=`cpupower -c $cpu frequency-info -g | tail -1`
+
+ avail_gov1=`echo $avail_gov | sed "s/.*$actual_gov//"`
+ avail_gov2=`echo $avail_gov | sed "s/$actual_gov.*//"`
+@@ -14,4 +14,4 @@ avail_gov=`echo "$avail_gov1 $avail_gov2
+
+ next_gov=`echo $avail_gov | sed "s/\ .*//"`
+
+-cpufreq-set -c $cpu -g $next_gov
++cpupower -c $cpu frequency-set -g $next_gov
+--- a/Makefile
++++ b/Makefile
+@@ -6,7 +6,7 @@ GTK_LIB = `pkg-config gtk+-2.0 --libs`
+ FLAGS = -O2 -Wall -fPIC $(GTK_INCLUDE)
+ LIBS = $(GTK_LIB)
+
+-LFLAGS = -shared -lcpufreq
++LFLAGS = -shared -lcpupower
+
+ CC = gcc $(CFLAGS) $(FLAGS)
+
diff --git a/x11-plugins/gkrellm-cpufreq/gkrellm-cpufreq-0.6.1.ebuild b/x11-plugins/gkrellm-cpufreq/gkrellm-cpufreq-0.6.1.ebuild
new file mode 100644
index 0000000..3979198
--- /dev/null
+++ b/x11-plugins/gkrellm-cpufreq/gkrellm-cpufreq-0.6.1.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI="5"
+
+inherit eutils gkrellm-plugin
+
+MY_P=${P/gkrellm/gkrellm2}
+
+DESCRIPTION="A Gkrellm2 plugin for displaying and manipulating CPU frequency"
+HOMEPAGE="http://iacs.epfl.ch/~winkelma/gkrellm2-cpufreq/"
+SRC_URI="http://iacs.epfl.ch/~winkelma/gkrellm2-cpufreq//${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+S=${WORKDIR}/${MY_P}
+
+RDEPEND="sys-power/cpupower
+ app-admin/sudo"
+
+PLUGIN_SO=cpufreq.so
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-use-cpupower.patch
+}
+
+src_install() {
+ gkrellm-plugin_src_install
+ exeinto /usr/sbin
+ doexe cpufreqnextgovernor
+}
+
+pkg_postinst() {
+ echo
+ einfo "Add these lines to /etc/sudoers to allow users to change cpu governor and speed:"
+ einfo "ALL ALL = (root) NOPASSWD: /usr/bin/cpupower -c [0-9]* frequency-set -g userspace"
+ einfo "ALL ALL = (root) NOPASSWD: /usr/bin/cpupower -c [0-9]* frequency-set -f [0-9]*"
+ einfo "ALL ALL = (root) NOPASSWD: /usr/sbin/cpufreqnextgovernor"
+ echo
+}
diff --git a/x11-plugins/gkrellm-cpufreq/metadata.xml b/x11-plugins/gkrellm-cpufreq/metadata.xml
new file mode 100644
index 0000000..7b5f042
--- /dev/null
+++ b/x11-plugins/gkrellm-cpufreq/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>DuPol@gmx.de</email>
+ <name>Dustin Polke</name>
+ </maintainer>
+</pkgmetadata>