From 7bb00b36b412ea4e1a0bf2ec2620db488f4276eb Mon Sep 17 00:00:00 2001 From: Dustin Polke Date: Sat, 6 Jan 2018 20:00:09 +0100 Subject: [x11-plugins/gkrellm-cpufreq] Version bump to 0.6.4. Drop old. Package-Manager: Portage-2.3.13, Repoman-2.3.3 --- x11-plugins/gkrellm-cpufreq/ChangeLog | 9 ++- x11-plugins/gkrellm-cpufreq/Manifest | 2 +- .../files/gkrellm-cpufreq-0.6.1-use-cpupower.patch | 50 ---------------- .../files/gkrellm-cpufreq-0.6.4-use-cpupower.patch | 67 ++++++++++++++++++++++ .../gkrellm-cpufreq/gkrellm-cpufreq-0.6.1.ebuild | 44 -------------- .../gkrellm-cpufreq/gkrellm-cpufreq-0.6.4.ebuild | 42 ++++++++++++++ 6 files changed, 117 insertions(+), 97 deletions(-) delete mode 100644 x11-plugins/gkrellm-cpufreq/files/gkrellm-cpufreq-0.6.1-use-cpupower.patch create mode 100644 x11-plugins/gkrellm-cpufreq/files/gkrellm-cpufreq-0.6.4-use-cpupower.patch delete mode 100644 x11-plugins/gkrellm-cpufreq/gkrellm-cpufreq-0.6.1.ebuild create mode 100644 x11-plugins/gkrellm-cpufreq/gkrellm-cpufreq-0.6.4.ebuild diff --git a/x11-plugins/gkrellm-cpufreq/ChangeLog b/x11-plugins/gkrellm-cpufreq/ChangeLog index 73e93e5..5803faa 100644 --- a/x11-plugins/gkrellm-cpufreq/ChangeLog +++ b/x11-plugins/gkrellm-cpufreq/ChangeLog @@ -1,7 +1,13 @@ # ChangeLog for x11-plugins/gkrellm-cpufreq -# Copyright 1999-2017 Gentoo Foundation; Distributed under the GPL v2 +# Copyright 1999-2018 Gentoo Foundation; Distributed under the GPL v2 # $Header: $ +*gkrellm-cpufreq-0.6.4 (06 Jan 2018) + + 06 Jan 2018; Dustin Polke +gkrellm-cpufreq-0.6.4.ebuild, + -gkrellm-cpufreq-0.6.1.ebuild: + Version bump to 0.6.4. Drop old. + 31 Jan 2017; Dustin Polke metadata.xml: Fix repoman complaint about metadata. @@ -11,4 +17,3 @@ +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 index eec59c1..e57ab09 100644 --- a/x11-plugins/gkrellm-cpufreq/Manifest +++ b/x11-plugins/gkrellm-cpufreq/Manifest @@ -1 +1 @@ -DIST gkrellm2-cpufreq-0.6.1.tar.gz 13238 SHA256 ff0ce9f54f00979d1427da8660e9422696756f9d6290aa94d2689896e47049eb SHA512 29863f740acec09bc3ded30865d8049dba20430b4ba2a0f2386b12fd29a2befc0915dc96ab334b897c7670a5b9a2a1cdf8c3c5b27d04a1782bf06e8ab92d45cf WHIRLPOOL b116fc066676353f5bb29f94ea433930856ec54e6ca8665969597e6fca4e0806d0de36b30512f530777ec410d58bd99cab9575f341535b2deb721f43a43c1586 +DIST gkrellm2-cpufreq-0.6.4.tar.gz 13738 BLAKE2B 29090b31187f93ae098d8f2dd74c10c97df5e894bef4ec47bfe0cfca32180f3312e183c370e1a4506f800d9802e71e75ca157e81a219c7743d72d01dfd4bfe4e SHA512 e6a0a37cf41e96f46389658899add2cec751fd9f53548de47268ffd6a27aa2a90bfeeb263a9f91dc958d5255cda74fc61d2618b0d76db4cd84a4122c7245e452 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 deleted file mode 100644 index 5a6a2ce..0000000 --- a/x11-plugins/gkrellm-cpufreq/files/gkrellm-cpufreq-0.6.1-use-cpupower.patch +++ /dev/null @@ -1,50 +0,0 @@ ---- 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/files/gkrellm-cpufreq-0.6.4-use-cpupower.patch b/x11-plugins/gkrellm-cpufreq/files/gkrellm-cpufreq-0.6.4-use-cpupower.patch new file mode 100644 index 0000000..bf88d4b --- /dev/null +++ b/x11-plugins/gkrellm-cpufreq/files/gkrellm-cpufreq-0.6.4-use-cpupower.patch @@ -0,0 +1,67 @@ +--- a/cpufreq.c ++++ b/cpufreq.c +@@ -49,6 +49,7 @@ + + #include + #include ++#include + + /* version number */ + #define VERSION "0.6.4" +@@ -125,13 +126,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); + } + +@@ -616,7 +617,7 @@ GkrellmMonitor* gkrellm_init_plugin(void + monitor = &plugin_mon; + + /* determine number of cpus */ +- for( ncpu = 0; cpufreq_cpu_exists(ncpu)==0; ++ncpu ) ++ for( ncpu = 0; cpupower_is_cpu_online(ncpu)==0; ++ncpu ) + ; + ncpu = ncpu > NCPU_MAX ? NCPU_MAX : ncpu; + +--- 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 deleted file mode 100644 index 3979198..0000000 --- a/x11-plugins/gkrellm-cpufreq/gkrellm-cpufreq-0.6.1.ebuild +++ /dev/null @@ -1,44 +0,0 @@ -# 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/gkrellm-cpufreq-0.6.4.ebuild b/x11-plugins/gkrellm-cpufreq/gkrellm-cpufreq-0.6.4.ebuild new file mode 100644 index 0000000..59e9580 --- /dev/null +++ b/x11-plugins/gkrellm-cpufreq/gkrellm-cpufreq-0.6.4.ebuild @@ -0,0 +1,42 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit eutils gkrellm-plugin + +MY_P=${P/gkrellm/gkrellm2} + +DESCRIPTION="A Gkrellm2 plugin for displaying and manipulating CPU frequency" +HOMEPAGE="http://chw.populus.org/rub/7" +SRC_URI="http://christoph.winkelmann.googlepages.com/${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +S=${WORKDIR}/${MY_P} + +RDEPEND="app-admin/gkrellm:2[X] + sys-power/cpupower + app-admin/sudo" + +PATCHES=( "${FILESDIR}"/${P}-use-cpupower.patch ) + +PLUGIN_SO=cpufreq.so + +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 +} -- cgit v1.2.3-65-gdbad