diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /sys-power/powertop | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sys-power/powertop')
22 files changed, 1312 insertions, 0 deletions
diff --git a/sys-power/powertop/Manifest b/sys-power/powertop/Manifest new file mode 100644 index 000000000000..611bb61d0b25 --- /dev/null +++ b/sys-power/powertop/Manifest @@ -0,0 +1,4 @@ +DIST powertop-1.13.tar.gz 104675 SHA256 2bc866089496877dd26d2d316ad5763ab8ecb5e28aefba44bc5d355dcdc58d98 SHA512 0c22a903da64798d987492336d57260372e03eab067ad94cf30b7640e9ee05e759a2fe9fa48fbdc35404cd2782b6b29d705e11e68452653b08f7f9df1a52be44 WHIRLPOOL 5ba44b84f49609f67c32563f75e20f6576c21a93fcb1ca99ebfe064475397602aa0f0fb9575e05b5a0290983791e7cf6ebae0139b39158b962e4b51027a6f5aa +DIST powertop-2.5.tar.gz 635979 SHA256 8b2c08a555d79e1c428863470c41cb023971d74ba4801d80a05e35adeec23c0b SHA512 696629fb6f5d0164da3ec2b259780dc635abc661de859e5e908debd3872c9a82024c0cc2dd8210c4cd1cf5586bf4238e31c3af29266f6a8ed8d90b1d876f04d8 WHIRLPOOL 5940b15ea4c5f09809e9a8febc11b1abe680df04469d75889c3a0cc0935a8c9d578d1f7c4ecaf2507cda74d574696a61b3bef21c6e30e9c768c09abf03436bcf +DIST powertop-2.6.tar.gz 3024009 SHA256 3024c2b13c8f32cdac0b0ea9359eb5668dc9bd11776cf063481daa878533d1ee SHA512 7c44b9c49f74d0f415d0332b60629940e05cf1c9170a9a7b98427da630c25c0cc9c8ece49e059ec8c665847ff03fa8a341e0cf8f7ca792d889f2c52a39ddbb62 WHIRLPOOL eaa6e05d2fdb3050eb3a37f39fb5d760a8d3d91461b8c6f0ae825138080a0dd8a532e490a71246d62d2e340e3820b402d761a1331a6e7b6bc23db116c98cf0d9 +DIST powertop-2.7.tar.gz 654329 SHA256 8d4b1490e2baad4467c0ded3c423db4472dcbf7b2dd8f8f2a928f54047c678ca SHA512 7a69bee4dd5330d9d5d6da9c47615337cdde27eb1eeb3ffc75297df1a61b5ced9f2ee94684680154e71c0c46fac72e5485cadf7a43e943d8087b1d7b4f33f59d WHIRLPOOL b2323b3222fa45ff1874cca9f2a3121aebd54d4dd9c89a31f7299fac15e30013ae3103f79759e86368efdba528eb3a2f166359cbe15d97022166abc16e6fddad diff --git a/sys-power/powertop/files/csstoh b/sys-power/powertop/files/csstoh new file mode 100644 index 000000000000..51d1ec1372b0 --- /dev/null +++ b/sys-power/powertop/files/csstoh @@ -0,0 +1,18 @@ +#!/bin/sh + +in=$1 +out=$2 + +( +cat <<EOF +#ifndef __INCLUDE_GUARD_CCS_H +#define __INCLUDE_GUARD_CCS_H + +const char css[] = +EOF +sed -e 's:^:\t":' -e 's:$:\\n":' "${in}" +cat <<EOF +; +#endif +EOF +) > "${out}" diff --git a/sys-power/powertop/files/powertop-1.98-build-cc.patch b/sys-power/powertop/files/powertop-1.98-build-cc.patch new file mode 100644 index 000000000000..70beb81db3ba --- /dev/null +++ b/sys-power/powertop/files/powertop-1.98-build-cc.patch @@ -0,0 +1,28 @@ +From e2a8efc2d349880833215ccbe9ac6cb80cdfe5d0 Mon Sep 17 00:00:00 2001 +From: Mike Frysinger <vapier@gentoo.org> +Date: Tue, 23 Aug 2011 18:03:38 -0400 +Subject: [PATCH] allow control over the build compiler + +Signed-off-by: Mike Frysinger <vapier@gentoo.org> +--- + Makefile | 3 ++- + 1 files changed, 2 insertions(+), 1 deletions(-) + +diff --git a/Makefile b/Makefile +index f637bfe..75e6e63 100644 +--- a/Makefile ++++ b/Makefile +@@ -80,8 +80,9 @@ install: powertop + @(cd po/ && env LOCALESDIR=$(LOCALESDIR) DESTDIR=$(DESTDIR) $(MAKE) $@) + + ++BUILD_CC ?= gcc + csstoh: csstoh.c +- gcc -o csstoh csstoh.c ++ $(BUILD_CC) -o csstoh csstoh.c + + css.h: csstoh powertop.css + ./csstoh powertop.css css.h +-- +1.7.6 + diff --git a/sys-power/powertop/files/powertop-1.98-build-libnl-3.patch b/sys-power/powertop/files/powertop-1.98-build-libnl-3.patch new file mode 100644 index 000000000000..bbe2b1c85737 --- /dev/null +++ b/sys-power/powertop/files/powertop-1.98-build-libnl-3.patch @@ -0,0 +1,27 @@ +From 21dcbd03507632c987e8c68b3efcf7b4a5d51147 Mon Sep 17 00:00:00 2001 +From: Mike Frysinger <vapier@gentoo.org> +Date: Wed, 18 Apr 2012 21:11:22 -0400 +Subject: [PATCH] use right libnl pkg-config name + +Signed-off-by: Mike Frysinger <vapier@gentoo.org> +--- + Makefile | 3 +-- + 1 files changed, 1 insertions(+), 2 deletions(-) + +diff --git a/Makefile b/Makefile +index 94ed2be..8a90b85 100644 +--- a/Makefile ++++ b/Makefile +@@ -39,8 +39,7 @@ endif + + ifeq ($(NL3FOUND),Y) + CPPFLAGS += -DCONFIG_LIBNL20 +-LIBS += -lnl-genl +-NLLIBNAME = libnl-3.0 ++NLLIBNAME = libnl-genl-3.0 + endif + + ifeq ($(NLLIBNAME),) +-- +1.7.8.5 + diff --git a/sys-power/powertop/files/powertop-1.98-build.patch b/sys-power/powertop/files/powertop-1.98-build.patch new file mode 100644 index 000000000000..8f130fdacebc --- /dev/null +++ b/sys-power/powertop/files/powertop-1.98-build.patch @@ -0,0 +1,80 @@ +From cafa47147fdc503103cda1e67e736ab95051e44a Mon Sep 17 00:00:00 2001 +From: Mike Frysinger <vapier@gentoo.org> +Date: Tue, 23 Aug 2011 18:01:36 -0400 +Subject: [PATCH] use right flag names + +CFLAGS for the C compiler, CXXFLAGS for the C++ compiler, and +CPPFLAGS for preprocessor flags. + +Signed-off-by: Mike Frysinger <vapier@gentoo.org> +--- + Makefile | 20 ++++++++++++-------- + 1 files changed, 12 insertions(+), 8 deletions(-) + +diff --git a/Makefile b/Makefile +index b0b6cb7..bf9b79a 100644 +--- a/Makefile ++++ b/Makefile +@@ -2,9 +2,13 @@ all: powertop po/powertop.pot + + VERSION := 1.98 + +-CFLAGS += -Wall -O2 -g -fno-omit-frame-pointer -fstack-protector -Wshadow -Wformat -D_FORTIFY_SOURCE=2 +-CPPFLAGS += -Wall -O2 -g -fno-omit-frame-pointer +-CXXFLAGS += -Wall -O2 -g -fno-omit-frame-pointer -fstack-protector -Wshadow -Wformat -D_FORTIFY_SOURCE=2 ++WFLAGS = -Wall -Wshadow -Wformat ++COMMON_FLAGS = -O2 -g -fno-omit-frame-pointer -fstack-protector ++CFLAGS ?= $(COMMON_FLAGS) ++CFLAGS += $(WFLAGS) ++CXXFLAGS ?= $(COMMON_FLAGS) ++CXXFLAGS += $(WFLAGS) ++CPPFLAGS += -D_FORTIFY_SOURCE=2 + PKG_CONFIG ?= pkg-config + + OBJS := lib.o main.o display.o html.o devlist.o +@@ -31,13 +35,13 @@ NLLIBNAME = libnl-1 + endif + + ifeq ($(NL2FOUND),Y) +-CFLAGS += -DCONFIG_LIBNL20 ++CPPFLAGS += -DCONFIG_LIBNL20 + LIBS += -lnl-genl + NLLIBNAME = libnl-2.0 + endif + + ifeq ($(NL3FOUND),Y) +-CFLAGS += -DCONFIG_LIBNL20 ++CPPFLAGS += -DCONFIG_LIBNL20 + LIBS += -lnl-genl + NLLIBNAME = libnl-3.0 + endif +@@ -47,7 +51,7 @@ $(error Cannot find development files for any supported version of libnl) + endif + + LIBS += $(shell $(PKG_CONFIG) --libs $(NLLIBNAME)) +-CFLAGS += $(shell $(PKG_CONFIG) --cflags $(NLLIBNAME)) ++CPPFLAGS += $(shell $(PKG_CONFIG) --cflags $(NLLIBNAME)) + + + +@@ -70,7 +74,7 @@ clean: + rm -f *.o *~ powertop DEADJOE core.* */*.o */*~ csstoh css.h + + powertop: $(OBJS) $(HEADERS) +- $(CXX) $(OBJS) $(LIBS) -o powertop ++ $(CXX) $(CXXFLAGS) $(LDFLAGS) $(OBJS) $(LIBS) -o powertop + @(cd po/ && $(MAKE)) + + install: powertop +@@ -90,7 +94,7 @@ css.h: csstoh powertop.css + %.o: %.cpp lib.h css.h Makefile + @echo " CC $<" + @[ -x /usr/bin/cppcheck ] && /usr/bin/cppcheck -q $< || : +- @$(CC) $(CFLAGS) -c -o $@ $< ++ @$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $< + + + uptrans: +-- +1.7.8.5 + diff --git a/sys-power/powertop/files/powertop-1.98-gcc-4.7.patch b/sys-power/powertop/files/powertop-1.98-gcc-4.7.patch new file mode 100644 index 000000000000..78d2d70e5ebb --- /dev/null +++ b/sys-power/powertop/files/powertop-1.98-gcc-4.7.patch @@ -0,0 +1,151 @@ +From b86877fb2f24563d74cd3faf7eceffcc8fa59299 Mon Sep 17 00:00:00 2001 +From: Han Shen <shenhan@chromium.org> +Date: Thu, 19 Apr 2012 12:14:08 -0400 +Subject: [PATCH] include unistd.h when necessary + +Older versions of gcc (pre-4.7) would implicitly include unistd.h in some +of its internal headers. With newer versions though, that is no longer +the case, so building powertop breaks with files that use things from the +unistd.h header but don't include it explicitly. + +Signed-off-by: Han Shen <shenhan@chromium.org> +Signed-off-by: Mike Frysinger <vapier@gentoo.org> +--- + cpu/intel_cpus.cpp | 1 + + devices/alsa.cpp | 2 +- + devices/device.cpp | 1 + + devices/i915-gpu.cpp | 2 +- + devices/network.cpp | 1 + + devices/rfkill.cpp | 2 +- + devices/thinkpad-fan.cpp | 1 + + devices/thinkpad-light.cpp | 1 + + html.cpp | 1 + + main.cpp | 1 + + 10 files changed, 10 insertions(+), 3 deletions(-) + +diff --git a/cpu/intel_cpus.cpp b/cpu/intel_cpus.cpp +index f42f3b4..bbbd460 100644 +--- a/cpu/intel_cpus.cpp ++++ b/cpu/intel_cpus.cpp +@@ -34,6 +34,7 @@ + #include <sys/time.h> + #include <string.h> + #include <errno.h> ++#include <unistd.h> + + #include "../lib.h" + #include "../parameters/parameters.h" +diff --git a/devices/alsa.cpp b/devices/alsa.cpp +index b0bcd3f..5100c36 100644 +--- a/devices/alsa.cpp ++++ b/devices/alsa.cpp +@@ -39,7 +39,7 @@ using namespace std; + #include "../devlist.h" + + #include <string.h> +- ++#include <unistd.h> + + alsa::alsa(char *_name, char *path): device() + { +diff --git a/devices/device.cpp b/devices/device.cpp +index c38b96c..9ce4509 100644 +--- a/devices/device.cpp ++++ b/devices/device.cpp +@@ -29,6 +29,7 @@ + #include <stdio.h> + #include <limits.h> + #include <stdlib.h> ++#include <unistd.h> + + using namespace std; + +diff --git a/devices/i915-gpu.cpp b/devices/i915-gpu.cpp +index a9dc899..ca2dad1 100644 +--- a/devices/i915-gpu.cpp ++++ b/devices/i915-gpu.cpp +@@ -28,7 +28,7 @@ + #include <stdio.h> + #include <sys/types.h> + #include <dirent.h> +- ++#include <unistd.h> + + using namespace std; + +diff --git a/devices/network.cpp b/devices/network.cpp +index 5f3ddf2..72c766d 100644 +--- a/devices/network.cpp ++++ b/devices/network.cpp +@@ -33,6 +33,7 @@ + #include <dirent.h> + #include <libgen.h> + #include <stdlib.h> ++#include <unistd.h> + + #include <linux/ethtool.h> + +diff --git a/devices/rfkill.cpp b/devices/rfkill.cpp +index 5bf40c4..33a8fcd 100644 +--- a/devices/rfkill.cpp ++++ b/devices/rfkill.cpp +@@ -29,7 +29,7 @@ + #include <sys/types.h> + #include <dirent.h> + #include <libgen.h> +- ++#include <unistd.h> + + using namespace std; + +diff --git a/devices/thinkpad-fan.cpp b/devices/thinkpad-fan.cpp +index 4ac3d11..8750c6e 100644 +--- a/devices/thinkpad-fan.cpp ++++ b/devices/thinkpad-fan.cpp +@@ -29,6 +29,7 @@ + #include <sys/types.h> + #include <dirent.h> + #include <math.h> ++#include <unistd.h> + + #include "../lib.h" + +diff --git a/devices/thinkpad-light.cpp b/devices/thinkpad-light.cpp +index ba4c553..7e91637 100644 +--- a/devices/thinkpad-light.cpp ++++ b/devices/thinkpad-light.cpp +@@ -29,6 +29,7 @@ + #include <sys/types.h> + #include <dirent.h> + #include <math.h> ++#include <unistd.h> + + #include "../lib.h" + +diff --git a/html.cpp b/html.cpp +index 0a4db2e..8260ed5 100644 +--- a/html.cpp ++++ b/html.cpp +@@ -29,6 +29,7 @@ + #include <utility> + #include <iostream> + #include <fstream> ++#include <unistd.h> + + #include "css.h" + #include "lib.h" +diff --git a/main.cpp b/main.cpp +index 45a126e..0bbb4aa 100644 +--- a/main.cpp ++++ b/main.cpp +@@ -33,6 +33,7 @@ + #include <time.h> + #include <sys/stat.h> + #include <getopt.h> ++#include <unistd.h> + + #include "cpu/cpu.h" + #include "process/process.h" +-- +1.7.8.5 + diff --git a/sys-power/powertop/files/powertop-2.2-cpu-add-new-Intel-cpuid.patch b/sys-power/powertop/files/powertop-2.2-cpu-add-new-Intel-cpuid.patch new file mode 100644 index 000000000000..04f17a3b5e82 --- /dev/null +++ b/sys-power/powertop/files/powertop-2.2-cpu-add-new-Intel-cpuid.patch @@ -0,0 +1,41 @@ +From 6626761dec9b3d1e3053d214913f329ed27c468c Mon Sep 17 00:00:00 2001 +From: Kristen Carlson Accardi <kristen@linux.intel.com> +Date: Tue, 19 Mar 2013 16:45:47 -0700 +Subject: [PATCH] cpu: add new Intel cpuid + +update cpu to support next generation Intel core processor +--- + src/cpu/cpu.cpp | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/cpu/cpu.cpp b/src/cpu/cpu.cpp +index 1eb340c..afe6a8c 100644 +--- a/src/cpu/cpu.cpp ++++ b/src/cpu/cpu.cpp +@@ -78,6 +78,7 @@ static class abstract_cpu * new_package(int package, int cpu, char * vendor, int + case 0x3A: /* IVB */ + case 0x3C: + case 0x3D: /* IVB Xeon */ ++ case 0x45: /* Next Gen Intel Core Processor */ + has_c2c7_res = 1; + ret = new class nhm_package; + break; +@@ -116,6 +117,7 @@ static class abstract_cpu * new_core(int core, int cpu, char * vendor, int famil + case 0x3A: /* IVB */ + case 0x3C: + case 0x3D: /* IVB Xeon */ ++ case 0x45: /* Next Gen Intel Core Processor */ + ret = new class nhm_core; + } + } +@@ -159,6 +161,7 @@ static class abstract_cpu * new_cpu(int number, char * vendor, int family, int m + case 0x3A: /* IVB */ + case 0x3C: + case 0x3D: /* IVB Xeon */ ++ case 0x45: /* Next Gen Intel Core Processor */ + ret = new class nhm_cpu; + } + } +-- +1.8.1.2 + diff --git a/sys-power/powertop/files/powertop-2.2-use-package_version.patch b/sys-power/powertop/files/powertop-2.2-use-package_version.patch new file mode 100644 index 000000000000..f4ec6c3ed040 --- /dev/null +++ b/sys-power/powertop/files/powertop-2.2-use-package_version.patch @@ -0,0 +1,26 @@ +It was missed to update POWERTOP_VERSION macro so that the +new v2.2 release still shows v2.1 string on the header of +ncurses window. Convert to use PACKAGE_VERSION macro which +set by autotools to the AC_INIT version so that it cannot +be missed anymore. + +Signed-off-by: Namhyung Kim <namhyung at gmail.com> +--- + src/lib.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/lib.h b/src/lib.h +index 8cf4632..209421a 100644 +--- a/src/lib.h ++++ b/src/lib.h +@@ -35,8 +35,8 @@ + + #define _(STRING) gettext(STRING) + +-#define POWERTOP_VERSION "v2.1" +-#define POWERTOP_SHORT_VERSION "2.1" ++#define POWERTOP_VERSION "v"PACKAGE_VERSION ++#define POWERTOP_SHORT_VERSION PACKAGE_VERSION + + + extern int get_max_cpu(void); diff --git a/sys-power/powertop/files/powertop-2.4-tinfo.patch b/sys-power/powertop/files/powertop-2.4-tinfo.patch new file mode 100644 index 000000000000..b965d8e06a59 --- /dev/null +++ b/sys-power/powertop/files/powertop-2.4-tinfo.patch @@ -0,0 +1,11 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -46,7 +46,7 @@ + AC_FUNC_STRTOD + AC_CHECK_FUNCS([fdatasync getpagesize gettimeofday memmove memset mkdir munmap pow realpath regcomp select setlocale socket sqrt strcasecmp strchr strdup strerror strncasecmp strstr strtoul strtoull]) + +-AC_SEARCH_LIBS([delwin], [ncursesw ncurses], [], AC_MSG_ERROR([ncurses is required but was not found]), []) ++PKG_CHECK_MODULES(ncurses, ncurses, [LIBS="$LIBS $ncurses_LIBS"], AC_MSG_ERROR([ncurses is required but was not found])) + + has_libpci=0 + PKG_CHECK_MODULES([PCIUTILS], [libpci],[has_libpci=1],[ diff --git a/sys-power/powertop/files/powertop-2.7-baytrail-msr.patch b/sys-power/powertop/files/powertop-2.7-baytrail-msr.patch new file mode 100644 index 000000000000..9c4c17b3f8c1 --- /dev/null +++ b/sys-power/powertop/files/powertop-2.7-baytrail-msr.patch @@ -0,0 +1,33 @@ +From 037906c55374cbf045f197b43c22314617dbfc21 Mon Sep 17 00:00:00 2001 +From: Daniel Leung <daniel.leung@linux.intel.com> +Date: Wed, 25 Feb 2015 16:36:45 -0800 +Subject: [PATCH] Baytrail does not have core C7 MSR to read + +So do not acquire core C7 from MSR, or else it fails +and stops the program. + +Reported-by: Eoff, Ullysses A <ullysses.a.eoff@intel.com> +Signed-off-by: Daniel Leung <daniel.leung@linux.intel.com> +--- + src/cpu/intel_cpus.cpp | 5 ----- + 1 file changed, 5 deletions(-) + +diff --git a/src/cpu/intel_cpus.cpp b/src/cpu/intel_cpus.cpp +index 04275e5..72ecd50 100644 +--- a/src/cpu/intel_cpus.cpp ++++ b/src/cpu/intel_cpus.cpp +@@ -135,11 +135,6 @@ nhm_core::nhm_core(int model) + if (model == 0x37) { + has_c3_res = 0; + has_c1_res = 1; +- this->byt_has_ahci(); +- if ((this->get_byt_ahci_support()) == 0) +- has_c7_res = 1;/*BYT-T PC7 <- S0iX*/ +- else +- has_c7_res = 0; + } else { + has_c3_res = 1; + has_c1_res = 0; +-- +2.3.1 + diff --git a/sys-power/powertop/files/powertop-2.7-braswell.patch b/sys-power/powertop/files/powertop-2.7-braswell.patch new file mode 100644 index 000000000000..cabbed44ed03 --- /dev/null +++ b/sys-power/powertop/files/powertop-2.7-braswell.patch @@ -0,0 +1,81 @@ +From 1c60f2342b752149f3d6543c63fee11a167dc998 Mon Sep 17 00:00:00 2001 +From: "David E. Box" <david.e.box@linux.intel.com> +Date: Thu, 2 Apr 2015 21:24:29 -0700 +Subject: [PATCH] Fix Powertop support for Intel Braswell SOC + +Correct Braswell MSR used to determine PC6 residency. + +Signed-off-by: David E. Box <david.e.box@linux.intel.com> +--- + src/cpu/intel_cpus.cpp | 21 +++++++++++++++++++-- + src/cpu/intel_cpus.h | 1 + + 2 files changed, 20 insertions(+), 2 deletions(-) + +diff --git a/src/cpu/intel_cpus.cpp b/src/cpu/intel_cpus.cpp +index d96cb49..1f3647a 100644 +--- a/src/cpu/intel_cpus.cpp ++++ b/src/cpu/intel_cpus.cpp +@@ -289,6 +289,7 @@ nhm_package::nhm_package(int model) + has_c8c9c10_res = 0; + has_c2c6_res = 0; + has_c7_res = 0; ++ has_c6c_res = 0; + + switch(model) { + case 0x2A: /* SNB */ +@@ -314,6 +315,9 @@ nhm_package::nhm_package(int model) + else + has_c7_res = 0; + } ++ /* BSW only exposes package C6 */ ++ else if (model == 0x4C) ++ has_c6c_res = 1; + else + has_c3_res = 1; + +@@ -360,7 +364,15 @@ void nhm_package::measurement_start(void) + + if (this->has_c3_res) + c3_before = get_msr(number, MSR_PKG_C3_RESIDENCY); +- c6_before = get_msr(number, MSR_PKG_C6_RESIDENCY); ++ ++ /* ++ * Hack for Braswell where C7 MSR is actually BSW C6 ++ */ ++ if (this->has_c6c_res) ++ c6_before = get_msr(number, MSR_PKG_C7_RESIDENCY); ++ else ++ c6_before = get_msr(number, MSR_PKG_C6_RESIDENCY); ++ + if (this->has_c7_res) + c7_before = get_msr(number, MSR_PKG_C7_RESIDENCY); + if (this->has_c8c9c10_res) { +@@ -401,7 +413,12 @@ void nhm_package::measurement_end(void) + + if (this->has_c3_res) + c3_after = get_msr(number, MSR_PKG_C3_RESIDENCY); +- c6_after = get_msr(number, MSR_PKG_C6_RESIDENCY); ++ ++ if (this->has_c6c_res) ++ c6_after = get_msr(number, MSR_PKG_C7_RESIDENCY); ++ else ++ c6_after = get_msr(number, MSR_PKG_C6_RESIDENCY); ++ + if (this->has_c7_res) + c7_after = get_msr(number, MSR_PKG_C7_RESIDENCY); + if (has_c8c9c10_res) { +diff --git a/src/cpu/intel_cpus.h b/src/cpu/intel_cpus.h +index 810a243..0331069 100644 +--- a/src/cpu/intel_cpus.h ++++ b/src/cpu/intel_cpus.h +@@ -77,6 +77,7 @@ public: + int has_c7_res; + int has_c2c6_res; + int has_c3_res; ++ int has_c6c_res; /* BSW */ + int has_c8c9c10_res; + nhm_package(int model); + virtual void measurement_start(void); +-- +2.4.4 + diff --git a/sys-power/powertop/files/powertop-2.7-broadwell.patch b/sys-power/powertop/files/powertop-2.7-broadwell.patch new file mode 100644 index 000000000000..7a1ed6f1ff33 --- /dev/null +++ b/sys-power/powertop/files/powertop-2.7-broadwell.patch @@ -0,0 +1,28 @@ +From 60258e6149a420b45521201e02f39cf41839e081 Mon Sep 17 00:00:00 2001 +From: Alexandra Yates <alexandra.yates@linux.intel.com> +Date: Wed, 22 Oct 2014 06:57:10 -0700 +Subject: [PATCH] Enable PowerTOP support for: BSW, BDW-H + +Added PowerTOP support for BSW and BDW-H platforms. + +Signed-off-by: Alexandra Yates <alexandra.yates@linux.intel.com> +--- + src/cpu/intel_cpus.cpp | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/cpu/intel_cpus.cpp b/src/cpu/intel_cpus.cpp +index 167f1a7..d307aa1 100644 +--- a/src/cpu/intel_cpus.cpp ++++ b/src/cpu/intel_cpus.cpp +@@ -59,6 +59,8 @@ static int intel_cpu_models[] = { + 0x3D, /* Intel Next Generation */ + 0x3F, /* HSX */ + 0x46, /* HSW */ ++ 0x47, /* BDW-H */ ++ 0x4C, /* BSW */ + 0x4D, /* AVN */ + 0x4F, /* BDX */ + 0x56, /* BDX-DE */ +-- +2.4.4 + diff --git a/sys-power/powertop/files/powertop-2.7-skylake-2.patch b/sys-power/powertop/files/powertop-2.7-skylake-2.patch new file mode 100644 index 000000000000..be5f0a3789ee --- /dev/null +++ b/sys-power/powertop/files/powertop-2.7-skylake-2.patch @@ -0,0 +1,37 @@ +From a7ddbd00f84253da38acc393e38f1c4db4263864 Mon Sep 17 00:00:00 2001 +From: Alexandra Yates <alexandra.yates@linux.intel.com> +Date: Thu, 16 Apr 2015 14:36:29 -0700 +Subject: [PATCH] Add C7- C10 support for Intel SKY + +Add C7 to C10 support for Intel SKY for CPU idle. + +Signed-off-by: Alexandra Yates <alexandra.yates@linux.intel.com> +--- + src/cpu/intel_cpus.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/cpu/intel_cpus.cpp b/src/cpu/intel_cpus.cpp +index 72ecd50..d96cb49 100644 +--- a/src/cpu/intel_cpus.cpp ++++ b/src/cpu/intel_cpus.cpp +@@ -63,7 +63,7 @@ static int intel_cpu_models[] = { + 0x4C, /* BSW */ + 0x4D, /* AVN */ + 0x4F, /* BDX */ +- 0x4E, /* Intel Next Generation */ ++ 0x4E, /* SKY */ + 0x56, /* BDX-DE */ + 0 /* last entry must be zero */ + }; +@@ -318,7 +318,7 @@ nhm_package::nhm_package(int model) + has_c3_res = 1; + + /* Haswell-ULT has C8/9/10*/ +- if (model == 0x45 || model ==0x3D) ++ if (model == 0x45 || model == 0x3D || model == 0x4E) + has_c8c9c10_res = 1; + } + +-- +2.4.4 + diff --git a/sys-power/powertop/files/powertop-2.7-skylake.patch b/sys-power/powertop/files/powertop-2.7-skylake.patch new file mode 100644 index 000000000000..50781dd2468d --- /dev/null +++ b/sys-power/powertop/files/powertop-2.7-skylake.patch @@ -0,0 +1,58 @@ +From 761e87f1ccd3b5364b5518d7e29f4b7b8a6b8490 Mon Sep 17 00:00:00 2001 +From: Alexandra Yates <alexandra.yates@linux.intel.com> +Date: Wed, 21 Jan 2015 16:55:59 -0800 +Subject: [PATCH] Adding support to SKY platforms. + +Adding Intel SKY platform support to PowerTOP + +Signed-off-by: Alexandra Yates <alexandra.yates@linux.intel.com> +--- + src/cpu/intel_cpus.cpp | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +diff --git a/src/cpu/intel_cpus.cpp b/src/cpu/intel_cpus.cpp +index d307aa1..04275e5 100644 +--- a/src/cpu/intel_cpus.cpp ++++ b/src/cpu/intel_cpus.cpp +@@ -51,18 +51,19 @@ static int intel_cpu_models[] = { + 0x2C, /* Westmere */ + 0x2A, /* SNB */ + 0x2D, /* SNB Xeon */ ++ 0x37, /* BYT-M */ + 0x3A, /* IVB */ + 0x3C, ++ 0x3D, /* Broadwell */ + 0x3E, /* IVB Xeon */ +- 0x37, /* BYT-M */ +- 0x45, /* HSW-ULT */ +- 0x3D, /* Intel Next Generation */ + 0x3F, /* HSX */ ++ 0x45, /* HSW-ULT */ + 0x46, /* HSW */ + 0x47, /* BDW-H */ + 0x4C, /* BSW */ + 0x4D, /* AVN */ + 0x4F, /* BDX */ ++ 0x4E, /* Intel Next Generation */ + 0x56, /* BDX-DE */ + 0 /* last entry must be zero */ + }; +@@ -125,6 +126,7 @@ nhm_core::nhm_core(int model) + case 0x3C: + case 0x3E: /* IVB Xeon */ + case 0x45: /* HSW-ULT */ ++ case 0x4E: /* SKY */ + case 0x3D: /* Intel Next Generation */ + has_c7_res = 1; + } +@@ -300,6 +302,7 @@ nhm_package::nhm_package(int model) + case 0x3C: + case 0x3E: /* IVB Xeon */ + case 0x45: /* HSW-ULT */ ++ case 0x4E: /* SKY */ + case 0x3D: /* Intel Next Generation */ + has_c2c6_res=1; + has_c7_res = 1; +-- +2.4.4 + diff --git a/sys-power/powertop/metadata.xml b/sys-power/powertop/metadata.xml new file mode 100644 index 000000000000..9cca7a80e628 --- /dev/null +++ b/sys-power/powertop/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>zerochaos@gentoo.org</email> + <name>Rick Farina</name> + </maintainer> +</pkgmetadata> diff --git a/sys-power/powertop/powertop-1.13.ebuild b/sys-power/powertop/powertop-1.13.ebuild new file mode 100644 index 000000000000..359fb8324fa6 --- /dev/null +++ b/sys-power/powertop/powertop-1.13.ebuild @@ -0,0 +1,44 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=3 + +inherit toolchain-funcs eutils + +DESCRIPTION="tool that helps you find what software is using the most power" +HOMEPAGE="http://www.lesswatts.org/projects/powertop/" +SRC_URI="http://www.lesswatts.org/projects/powertop/download/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 arm ppc sparc x86 ~amd64-linux ~x86-linux" +IUSE="unicode" + +DEPEND="sys-libs/ncurses[unicode?] + sys-devel/gettext" +RDEPEND="sys-libs/ncurses[unicode?] + virtual/libintl + sys-apps/pciutils" + +src_prepare() { + sed -i '/${CFLAGS}/s:$: ${LDFLAGS}:' Makefile + use unicode || sed -i 's:-lncursesw:-lncurses:' Makefile +} + +src_configure() { + tc-export CC +} + +src_install() { + emake install DESTDIR="${ED}" || die + dodoc Changelog README + gunzip "${ED}"/usr/share/man/man1/powertop.1.gz +} + +pkg_postinst() { + echo + einfo "For PowerTOP to work best, use a Linux kernel with the" + einfo "tickless idle (NO_HZ) feature enabled (version 2.6.21 or later)" + echo +} diff --git a/sys-power/powertop/powertop-2.5.ebuild b/sys-power/powertop/powertop-2.5.ebuild new file mode 100644 index 000000000000..238ac0253060 --- /dev/null +++ b/sys-power/powertop/powertop-2.5.ebuild @@ -0,0 +1,110 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +inherit eutils linux-info autotools +if [[ ${PV} == "9999" ]] ; then + EGIT_REPO_URI="git://github.com/fenrus75/powertop.git" + inherit git-2 autotools + SRC_URI="" +else + SRC_URI="https://01.org/powertop/sites/default/files/downloads/${P}.tar.gz" + KEYWORDS="amd64 arm ppc sparc x86 ~amd64-linux ~x86-linux" +fi + +DESCRIPTION="tool that helps you find what software is using the most power" +HOMEPAGE="https://01.org/powertop/" + +LICENSE="GPL-2" +SLOT="0" +IUSE="unicode X" + +COMMON_DEPEND=" + dev-libs/libnl:3 + sys-apps/pciutils + sys-libs/ncurses[unicode?] +" + +DEPEND="${COMMON_DEPEND} + virtual/pkgconfig + sys-devel/gettext +" +RDEPEND=" + ${COMMON_DEPEND} + X? ( x11-apps/xset ) + virtual/libintl +" + +DOCS=( TODO README ) + +pkg_setup() { + CONFIG_CHECK=" + ~X86_MSR + ~DEBUG_FS + ~PERF_EVENTS + ~TRACEPOINTS + ~NO_HZ + ~HIGH_RES_TIMERS + ~HPET_TIMER + ~CPU_FREQ_STAT + ~CPU_FREQ_GOV_ONDEMAND + ~FTRACE + ~BLK_DEV_IO_TRACE + ~TIMER_STATS + ~TRACING + " + ERROR_KERNEL_X86_MSR="X86_MSR is not enabled in the kernel, you almost certainly need it" + ERROR_KERNEL_DEBUG_FS="DEBUG_FS is not enabled in the kernel, you almost certainly need it" + ERROR_KERNEL_PERF_EVENTS="PERF_EVENTS should be enabled in the kernel for full powertop function" + ERROR_KERNEL_TRACEPOINTS="TRACEPOINTS should be enabled in the kernel for full powertop function" + ERROR_KERNEL_NO_HZ="NO_HZ should be enabled in the kernel for full powertop function" + ERROR_KERNEL_HIGH_RES_TIMERS="HIGH_RES_TIMERS should be enabled in the kernel for full powertop function" + ERROR_KERNEL_HPET_TIMER="HPET_TIMER should be enabled in the kernel for full powertop function" + ERROR_KERNEL_CPU_FREQ_STAT="CPU_FREQ_STAT should be enabled in the kernel for full powertop function" + ERROR_KERNEL_CPU_FREQ_GOV_ONDEMAND="CPU_FREQ_GOV_ONDEMAND should be enabled in the kernel for full powertop function" + ERROR_KERNEL_FTRACE="FTRACE needs to be turned on to enable BLK_DEV_IO_TRACE" + ERROR_KERNEL_BLK_DEV_IO_TRACE="BLK_DEV_IO_TRACE needs to be turned on to enable TIMER_STATS, TRACING and EVENT_POWER_TRACING_DEPRECATED" + ERROR_KERNEL_TIMER_STATS="TIMER_STATS should be enabled in the kernel for full powertop function" + ERROR_KERNEL_TRACING="TRACING should be enabled in the kernel for full powertop function" + linux-info_pkg_setup + if linux_config_exists; then + if kernel_is -lt 3 7 0; then + if linux_chkconfig_present SND_HDA_INTEL; then + CONFIG_CHECK="~SND_HDA_POWER_SAVE" + ERROR_KERNEL_SND_HDA_POWER_SAVE="SND_HDA_POWER_SAVE should be enabled in the kernel for full powertop function" + check_extra_config + fi + fi + if kernel_is -lt 3 9 0; then + CONFIG_CHECK="~EVENT_POWER_TRACING_DEPRECATED" + ERROR_KERNEL_EVENT_POWER_TRACING_DEPRECATED="EVENT_POWER_TRACING_DEPRECATED should be enabled in the kernel for full powertop function" + check_extra_config + fi + if kernel_is -lt 3 19; then + CONFIG_CHECK="~PM_RUNTIME" + ERROR_KERNEL_PM_RUNTIME="PM_RUNTIME should be enabled in the kernel for full powertop function" + check_extra_config + else + CONFIG_CHECK="~PM" + ERROR_KERNEL_PM="PM should be enabled in the kernel for full powertop function" + check_extra_config + fi + fi +} + +src_prepare() { + epatch "${FILESDIR}"/powertop-2.4-tinfo.patch + eautoreconf +} + +src_configure() { + export ac_cv_search_delwin=$(usex unicode -lncursesw -lncurses) + default +} + +src_install() { + default + keepdir /var/cache/powertop +} diff --git a/sys-power/powertop/powertop-2.6.ebuild b/sys-power/powertop/powertop-2.6.ebuild new file mode 100644 index 000000000000..482be30a139a --- /dev/null +++ b/sys-power/powertop/powertop-2.6.ebuild @@ -0,0 +1,107 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +inherit eutils linux-info autotools +if [[ ${PV} == "9999" ]] ; then + EGIT_REPO_URI="git://github.com/fenrus75/powertop.git" + inherit git-2 autotools + SRC_URI="" +else + SRC_URI="https://01.org/sites/default/files/downloads/${PN}/${P}.tar.gz" + KEYWORDS="amd64 arm ppc sparc x86 ~amd64-linux ~x86-linux" +fi + +DESCRIPTION="tool that helps you find what software is using the most power" +HOMEPAGE="https://01.org/powertop/" + +LICENSE="GPL-2" +SLOT="0" +IUSE="unicode X" + +COMMON_DEPEND=" + dev-libs/libnl:3 + sys-apps/pciutils + sys-libs/ncurses[unicode?] +" + +DEPEND="${COMMON_DEPEND} + virtual/pkgconfig + sys-devel/gettext +" +RDEPEND=" + ${COMMON_DEPEND} + X? ( x11-apps/xset ) + virtual/libintl +" + +DOCS=( TODO README ) + +S="${WORKDIR}/${PN}" + +pkg_setup() { + CONFIG_CHECK=" + ~X86_MSR + ~DEBUG_FS + ~PERF_EVENTS + ~TRACEPOINTS + ~NO_HZ + ~HIGH_RES_TIMERS + ~HPET_TIMER + ~CPU_FREQ_STAT + ~CPU_FREQ_GOV_ONDEMAND + ~FTRACE + ~BLK_DEV_IO_TRACE + ~TIMER_STATS + ~TRACING + " + ERROR_KERNEL_X86_MSR="X86_MSR is not enabled in the kernel, you almost certainly need it" + ERROR_KERNEL_DEBUG_FS="DEBUG_FS is not enabled in the kernel, you almost certainly need it" + ERROR_KERNEL_PERF_EVENTS="PERF_EVENTS should be enabled in the kernel for full powertop function" + ERROR_KERNEL_TRACEPOINTS="TRACEPOINTS should be enabled in the kernel for full powertop function" + ERROR_KERNEL_NO_HZ="NO_HZ should be enabled in the kernel for full powertop function" + ERROR_KERNEL_HIGH_RES_TIMERS="HIGH_RES_TIMERS should be enabled in the kernel for full powertop function" + ERROR_KERNEL_HPET_TIMER="HPET_TIMER should be enabled in the kernel for full powertop function" + ERROR_KERNEL_CPU_FREQ_STAT="CPU_FREQ_STAT should be enabled in the kernel for full powertop function" + ERROR_KERNEL_CPU_FREQ_GOV_ONDEMAND="CPU_FREQ_GOV_ONDEMAND should be enabled in the kernel for full powertop function" + ERROR_KERNEL_FTRACE="FTRACE needs to be turned on to enable BLK_DEV_IO_TRACE" + ERROR_KERNEL_BLK_DEV_IO_TRACE="BLK_DEV_IO_TRACE needs to be turned on to enable TIMER_STATS, TRACING and EVENT_POWER_TRACING_DEPRECATED" + ERROR_KERNEL_TIMER_STATS="TIMER_STATS should be enabled in the kernel for full powertop function" + ERROR_KERNEL_TRACING="TRACING should be enabled in the kernel for full powertop function" + linux-info_pkg_setup + if linux_config_exists; then + if kernel_is -lt 3 7 0; then + if linux_chkconfig_present SND_HDA_INTEL; then + CONFIG_CHECK="~SND_HDA_POWER_SAVE" + ERROR_KERNEL_SND_HDA_POWER_SAVE="SND_HDA_POWER_SAVE should be enabled in the kernel for full powertop function" + check_extra_config + fi + fi + if kernel_is -lt 3 9 0; then + CONFIG_CHECK="~EVENT_POWER_TRACING_DEPRECATED" + ERROR_KERNEL_EVENT_POWER_TRACING_DEPRECATED="EVENT_POWER_TRACING_DEPRECATED should be enabled in the kernel for full powertop function" + check_extra_config + fi + if kernel_is -lt 3 19; then + CONFIG_CHECK="~PM_RUNTIME" + ERROR_KERNEL_PM_RUNTIME="PM_RUNTIME should be enabled in the kernel for full powertop function" + check_extra_config + else + CONFIG_CHECK="~PM" + ERROR_KERNEL_PM="PM should be enabled in the kernel for full powertop function" + check_extra_config + fi + fi +} + +src_prepare() { + epatch "${FILESDIR}"/powertop-2.4-tinfo.patch + eautoreconf +} + +src_configure() { + export ac_cv_search_delwin=$(usex unicode -lncursesw -lncurses) + default +} diff --git a/sys-power/powertop/powertop-2.7-r1.ebuild b/sys-power/powertop/powertop-2.7-r1.ebuild new file mode 100644 index 000000000000..6171ac423cfa --- /dev/null +++ b/sys-power/powertop/powertop-2.7-r1.ebuild @@ -0,0 +1,104 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +inherit eutils linux-info +if [[ ${PV} == "9999" ]] ; then + EGIT_REPO_URI="git://github.com/fenrus75/powertop.git" + inherit git-2 autotools + SRC_URI="" +else + SRC_URI="https://01.org/sites/default/files/downloads/${PN}/${P}.tar.gz" + KEYWORDS="~amd64 ~arm ~ppc ~sparc ~x86 ~amd64-linux ~x86-linux" +fi + +DESCRIPTION="tool that helps you find what software is using the most power" +HOMEPAGE="https://01.org/powertop/" + +LICENSE="GPL-2" +SLOT="0" +IUSE="nls unicode X" + +COMMON_DEPEND=" + dev-libs/libnl:3 + sys-apps/pciutils + sys-libs/ncurses[unicode?] +" + +DEPEND="${COMMON_DEPEND} + virtual/pkgconfig + sys-devel/gettext +" +RDEPEND=" + ${COMMON_DEPEND} + X? ( x11-apps/xset ) + virtual/libintl +" + +DOCS=( TODO README ) + +pkg_setup() { + CONFIG_CHECK=" + ~X86_MSR + ~DEBUG_FS + ~PERF_EVENTS + ~TRACEPOINTS + ~NO_HZ + ~HIGH_RES_TIMERS + ~HPET_TIMER + ~CPU_FREQ_STAT + ~CPU_FREQ_GOV_ONDEMAND + ~FTRACE + ~BLK_DEV_IO_TRACE + ~TIMER_STATS + ~TRACING + " + ERROR_KERNEL_X86_MSR="X86_MSR is not enabled in the kernel, you almost certainly need it" + ERROR_KERNEL_DEBUG_FS="DEBUG_FS is not enabled in the kernel, you almost certainly need it" + ERROR_KERNEL_PERF_EVENTS="PERF_EVENTS should be enabled in the kernel for full powertop function" + ERROR_KERNEL_TRACEPOINTS="TRACEPOINTS should be enabled in the kernel for full powertop function" + ERROR_KERNEL_NO_HZ="NO_HZ should be enabled in the kernel for full powertop function" + ERROR_KERNEL_HIGH_RES_TIMERS="HIGH_RES_TIMERS should be enabled in the kernel for full powertop function" + ERROR_KERNEL_HPET_TIMER="HPET_TIMER should be enabled in the kernel for full powertop function" + ERROR_KERNEL_CPU_FREQ_STAT="CPU_FREQ_STAT should be enabled in the kernel for full powertop function" + ERROR_KERNEL_CPU_FREQ_GOV_ONDEMAND="CPU_FREQ_GOV_ONDEMAND should be enabled in the kernel for full powertop function" + ERROR_KERNEL_FTRACE="FTRACE needs to be turned on to enable BLK_DEV_IO_TRACE" + ERROR_KERNEL_BLK_DEV_IO_TRACE="BLK_DEV_IO_TRACE needs to be turned on to enable TIMER_STATS, TRACING and EVENT_POWER_TRACING_DEPRECATED" + ERROR_KERNEL_TIMER_STATS="TIMER_STATS should be enabled in the kernel for full powertop function" + ERROR_KERNEL_TRACING="TRACING should be enabled in the kernel for full powertop function" + linux-info_pkg_setup + if linux_config_exists; then + if kernel_is -lt 3 7 0; then + if linux_chkconfig_present SND_HDA_INTEL; then + CONFIG_CHECK="~SND_HDA_POWER_SAVE" + ERROR_KERNEL_SND_HDA_POWER_SAVE="SND_HDA_POWER_SAVE should be enabled in the kernel for full powertop function" + check_extra_config + fi + fi + if kernel_is -lt 3 9 0; then + CONFIG_CHECK="~EVENT_POWER_TRACING_DEPRECATED" + ERROR_KERNEL_EVENT_POWER_TRACING_DEPRECATED="EVENT_POWER_TRACING_DEPRECATED should be enabled in the kernel for full powertop function" + check_extra_config + fi + if kernel_is -lt 3 19; then + CONFIG_CHECK="~PM_RUNTIME" + ERROR_KERNEL_PM_RUNTIME="PM_RUNTIME should be enabled in the kernel for full powertop function" + check_extra_config + else + CONFIG_CHECK="~PM" + ERROR_KERNEL_PM="PM should be enabled in the kernel for full powertop function" + check_extra_config + fi + fi +} + +src_prepare() { + epatch "${FILESDIR}"/${P}-baytrail-msr.patch +} + +src_configure() { + export ac_cv_search_delwin=$(usex unicode -lncursesw -lncurses) + econf $(use_enable nls) +} diff --git a/sys-power/powertop/powertop-2.7-r2.ebuild b/sys-power/powertop/powertop-2.7-r2.ebuild new file mode 100644 index 000000000000..552caf0eaa1b --- /dev/null +++ b/sys-power/powertop/powertop-2.7-r2.ebuild @@ -0,0 +1,108 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +inherit eutils linux-info +if [[ ${PV} == "9999" ]] ; then + EGIT_REPO_URI="git://github.com/fenrus75/powertop.git" + inherit git-2 autotools + SRC_URI="" +else + SRC_URI="https://01.org/sites/default/files/downloads/${PN}/${P}.tar.gz" + KEYWORDS="~amd64 ~arm ~ppc ~sparc ~x86 ~amd64-linux ~x86-linux" +fi + +DESCRIPTION="tool that helps you find what software is using the most power" +HOMEPAGE="https://01.org/powertop/" + +LICENSE="GPL-2" +SLOT="0" +IUSE="nls unicode X" + +COMMON_DEPEND=" + dev-libs/libnl:3 + sys-apps/pciutils + sys-libs/ncurses[unicode?] +" + +DEPEND="${COMMON_DEPEND} + virtual/pkgconfig + sys-devel/gettext +" +RDEPEND=" + ${COMMON_DEPEND} + X? ( x11-apps/xset ) + virtual/libintl +" + +DOCS=( TODO README ) + +pkg_setup() { + CONFIG_CHECK=" + ~X86_MSR + ~DEBUG_FS + ~PERF_EVENTS + ~TRACEPOINTS + ~NO_HZ + ~HIGH_RES_TIMERS + ~HPET_TIMER + ~CPU_FREQ_STAT + ~CPU_FREQ_GOV_ONDEMAND + ~FTRACE + ~BLK_DEV_IO_TRACE + ~TIMER_STATS + ~TRACING + " + ERROR_KERNEL_X86_MSR="X86_MSR is not enabled in the kernel, you almost certainly need it" + ERROR_KERNEL_DEBUG_FS="DEBUG_FS is not enabled in the kernel, you almost certainly need it" + ERROR_KERNEL_PERF_EVENTS="PERF_EVENTS should be enabled in the kernel for full powertop function" + ERROR_KERNEL_TRACEPOINTS="TRACEPOINTS should be enabled in the kernel for full powertop function" + ERROR_KERNEL_NO_HZ="NO_HZ should be enabled in the kernel for full powertop function" + ERROR_KERNEL_HIGH_RES_TIMERS="HIGH_RES_TIMERS should be enabled in the kernel for full powertop function" + ERROR_KERNEL_HPET_TIMER="HPET_TIMER should be enabled in the kernel for full powertop function" + ERROR_KERNEL_CPU_FREQ_STAT="CPU_FREQ_STAT should be enabled in the kernel for full powertop function" + ERROR_KERNEL_CPU_FREQ_GOV_ONDEMAND="CPU_FREQ_GOV_ONDEMAND should be enabled in the kernel for full powertop function" + ERROR_KERNEL_FTRACE="FTRACE needs to be turned on to enable BLK_DEV_IO_TRACE" + ERROR_KERNEL_BLK_DEV_IO_TRACE="BLK_DEV_IO_TRACE needs to be turned on to enable TIMER_STATS, TRACING and EVENT_POWER_TRACING_DEPRECATED" + ERROR_KERNEL_TIMER_STATS="TIMER_STATS should be enabled in the kernel for full powertop function" + ERROR_KERNEL_TRACING="TRACING should be enabled in the kernel for full powertop function" + linux-info_pkg_setup + if linux_config_exists; then + if kernel_is -lt 3 7 0; then + if linux_chkconfig_present SND_HDA_INTEL; then + CONFIG_CHECK="~SND_HDA_POWER_SAVE" + ERROR_KERNEL_SND_HDA_POWER_SAVE="SND_HDA_POWER_SAVE should be enabled in the kernel for full powertop function" + check_extra_config + fi + fi + if kernel_is -lt 3 9 0; then + CONFIG_CHECK="~EVENT_POWER_TRACING_DEPRECATED" + ERROR_KERNEL_EVENT_POWER_TRACING_DEPRECATED="EVENT_POWER_TRACING_DEPRECATED should be enabled in the kernel for full powertop function" + check_extra_config + fi + if kernel_is -lt 3 19; then + CONFIG_CHECK="~PM_RUNTIME" + ERROR_KERNEL_PM_RUNTIME="PM_RUNTIME should be enabled in the kernel for full powertop function" + check_extra_config + else + CONFIG_CHECK="~PM" + ERROR_KERNEL_PM="PM should be enabled in the kernel for full powertop function" + check_extra_config + fi + fi +} + +src_prepare() { + epatch "${FILESDIR}"/${P}-baytrail-msr.patch + epatch "${FILESDIR}"/${P}-broadwell.patch + epatch "${FILESDIR}"/${P}-braswell.patch + epatch "${FILESDIR}"/${P}-skylake.patch + epatch "${FILESDIR}"/${P}-skylake-2.patch +} + +src_configure() { + export ac_cv_search_delwin=$(usex unicode -lncursesw -lncurses) + econf $(use_enable nls) +} diff --git a/sys-power/powertop/powertop-2.7.ebuild b/sys-power/powertop/powertop-2.7.ebuild new file mode 100644 index 000000000000..b3011ffb230d --- /dev/null +++ b/sys-power/powertop/powertop-2.7.ebuild @@ -0,0 +1,104 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +inherit eutils linux-info autotools +if [[ ${PV} == "9999" ]] ; then + EGIT_REPO_URI="git://github.com/fenrus75/powertop.git" + inherit git-2 autotools + SRC_URI="" +else + SRC_URI="https://01.org/sites/default/files/downloads/${PN}/${P}.tar.gz" + KEYWORDS="~amd64 ~arm ~ppc ~sparc ~x86 ~amd64-linux ~x86-linux" +fi + +DESCRIPTION="tool that helps you find what software is using the most power" +HOMEPAGE="https://01.org/powertop/" + +LICENSE="GPL-2" +SLOT="0" +IUSE="unicode X" + +COMMON_DEPEND=" + dev-libs/libnl:3 + sys-apps/pciutils + sys-libs/ncurses[unicode?] +" + +DEPEND="${COMMON_DEPEND} + virtual/pkgconfig + sys-devel/gettext +" +RDEPEND=" + ${COMMON_DEPEND} + X? ( x11-apps/xset ) + virtual/libintl +" + +DOCS=( TODO README ) + +pkg_setup() { + CONFIG_CHECK=" + ~X86_MSR + ~DEBUG_FS + ~PERF_EVENTS + ~TRACEPOINTS + ~NO_HZ + ~HIGH_RES_TIMERS + ~HPET_TIMER + ~CPU_FREQ_STAT + ~CPU_FREQ_GOV_ONDEMAND + ~FTRACE + ~BLK_DEV_IO_TRACE + ~TIMER_STATS + ~TRACING + " + ERROR_KERNEL_X86_MSR="X86_MSR is not enabled in the kernel, you almost certainly need it" + ERROR_KERNEL_DEBUG_FS="DEBUG_FS is not enabled in the kernel, you almost certainly need it" + ERROR_KERNEL_PERF_EVENTS="PERF_EVENTS should be enabled in the kernel for full powertop function" + ERROR_KERNEL_TRACEPOINTS="TRACEPOINTS should be enabled in the kernel for full powertop function" + ERROR_KERNEL_NO_HZ="NO_HZ should be enabled in the kernel for full powertop function" + ERROR_KERNEL_HIGH_RES_TIMERS="HIGH_RES_TIMERS should be enabled in the kernel for full powertop function" + ERROR_KERNEL_HPET_TIMER="HPET_TIMER should be enabled in the kernel for full powertop function" + ERROR_KERNEL_CPU_FREQ_STAT="CPU_FREQ_STAT should be enabled in the kernel for full powertop function" + ERROR_KERNEL_CPU_FREQ_GOV_ONDEMAND="CPU_FREQ_GOV_ONDEMAND should be enabled in the kernel for full powertop function" + ERROR_KERNEL_FTRACE="FTRACE needs to be turned on to enable BLK_DEV_IO_TRACE" + ERROR_KERNEL_BLK_DEV_IO_TRACE="BLK_DEV_IO_TRACE needs to be turned on to enable TIMER_STATS, TRACING and EVENT_POWER_TRACING_DEPRECATED" + ERROR_KERNEL_TIMER_STATS="TIMER_STATS should be enabled in the kernel for full powertop function" + ERROR_KERNEL_TRACING="TRACING should be enabled in the kernel for full powertop function" + linux-info_pkg_setup + if linux_config_exists; then + if kernel_is -lt 3 7 0; then + if linux_chkconfig_present SND_HDA_INTEL; then + CONFIG_CHECK="~SND_HDA_POWER_SAVE" + ERROR_KERNEL_SND_HDA_POWER_SAVE="SND_HDA_POWER_SAVE should be enabled in the kernel for full powertop function" + check_extra_config + fi + fi + if kernel_is -lt 3 9 0; then + CONFIG_CHECK="~EVENT_POWER_TRACING_DEPRECATED" + ERROR_KERNEL_EVENT_POWER_TRACING_DEPRECATED="EVENT_POWER_TRACING_DEPRECATED should be enabled in the kernel for full powertop function" + check_extra_config + fi + if kernel_is -lt 3 19; then + CONFIG_CHECK="~PM_RUNTIME" + ERROR_KERNEL_PM_RUNTIME="PM_RUNTIME should be enabled in the kernel for full powertop function" + check_extra_config + else + CONFIG_CHECK="~PM" + ERROR_KERNEL_PM="PM should be enabled in the kernel for full powertop function" + check_extra_config + fi + fi +} + +src_prepare() { + eautoreconf +} + +src_configure() { + export ac_cv_search_delwin=$(usex unicode -lncursesw -lncurses) + default +} diff --git a/sys-power/powertop/powertop-9999.ebuild b/sys-power/powertop/powertop-9999.ebuild new file mode 100644 index 000000000000..b3011ffb230d --- /dev/null +++ b/sys-power/powertop/powertop-9999.ebuild @@ -0,0 +1,104 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +inherit eutils linux-info autotools +if [[ ${PV} == "9999" ]] ; then + EGIT_REPO_URI="git://github.com/fenrus75/powertop.git" + inherit git-2 autotools + SRC_URI="" +else + SRC_URI="https://01.org/sites/default/files/downloads/${PN}/${P}.tar.gz" + KEYWORDS="~amd64 ~arm ~ppc ~sparc ~x86 ~amd64-linux ~x86-linux" +fi + +DESCRIPTION="tool that helps you find what software is using the most power" +HOMEPAGE="https://01.org/powertop/" + +LICENSE="GPL-2" +SLOT="0" +IUSE="unicode X" + +COMMON_DEPEND=" + dev-libs/libnl:3 + sys-apps/pciutils + sys-libs/ncurses[unicode?] +" + +DEPEND="${COMMON_DEPEND} + virtual/pkgconfig + sys-devel/gettext +" +RDEPEND=" + ${COMMON_DEPEND} + X? ( x11-apps/xset ) + virtual/libintl +" + +DOCS=( TODO README ) + +pkg_setup() { + CONFIG_CHECK=" + ~X86_MSR + ~DEBUG_FS + ~PERF_EVENTS + ~TRACEPOINTS + ~NO_HZ + ~HIGH_RES_TIMERS + ~HPET_TIMER + ~CPU_FREQ_STAT + ~CPU_FREQ_GOV_ONDEMAND + ~FTRACE + ~BLK_DEV_IO_TRACE + ~TIMER_STATS + ~TRACING + " + ERROR_KERNEL_X86_MSR="X86_MSR is not enabled in the kernel, you almost certainly need it" + ERROR_KERNEL_DEBUG_FS="DEBUG_FS is not enabled in the kernel, you almost certainly need it" + ERROR_KERNEL_PERF_EVENTS="PERF_EVENTS should be enabled in the kernel for full powertop function" + ERROR_KERNEL_TRACEPOINTS="TRACEPOINTS should be enabled in the kernel for full powertop function" + ERROR_KERNEL_NO_HZ="NO_HZ should be enabled in the kernel for full powertop function" + ERROR_KERNEL_HIGH_RES_TIMERS="HIGH_RES_TIMERS should be enabled in the kernel for full powertop function" + ERROR_KERNEL_HPET_TIMER="HPET_TIMER should be enabled in the kernel for full powertop function" + ERROR_KERNEL_CPU_FREQ_STAT="CPU_FREQ_STAT should be enabled in the kernel for full powertop function" + ERROR_KERNEL_CPU_FREQ_GOV_ONDEMAND="CPU_FREQ_GOV_ONDEMAND should be enabled in the kernel for full powertop function" + ERROR_KERNEL_FTRACE="FTRACE needs to be turned on to enable BLK_DEV_IO_TRACE" + ERROR_KERNEL_BLK_DEV_IO_TRACE="BLK_DEV_IO_TRACE needs to be turned on to enable TIMER_STATS, TRACING and EVENT_POWER_TRACING_DEPRECATED" + ERROR_KERNEL_TIMER_STATS="TIMER_STATS should be enabled in the kernel for full powertop function" + ERROR_KERNEL_TRACING="TRACING should be enabled in the kernel for full powertop function" + linux-info_pkg_setup + if linux_config_exists; then + if kernel_is -lt 3 7 0; then + if linux_chkconfig_present SND_HDA_INTEL; then + CONFIG_CHECK="~SND_HDA_POWER_SAVE" + ERROR_KERNEL_SND_HDA_POWER_SAVE="SND_HDA_POWER_SAVE should be enabled in the kernel for full powertop function" + check_extra_config + fi + fi + if kernel_is -lt 3 9 0; then + CONFIG_CHECK="~EVENT_POWER_TRACING_DEPRECATED" + ERROR_KERNEL_EVENT_POWER_TRACING_DEPRECATED="EVENT_POWER_TRACING_DEPRECATED should be enabled in the kernel for full powertop function" + check_extra_config + fi + if kernel_is -lt 3 19; then + CONFIG_CHECK="~PM_RUNTIME" + ERROR_KERNEL_PM_RUNTIME="PM_RUNTIME should be enabled in the kernel for full powertop function" + check_extra_config + else + CONFIG_CHECK="~PM" + ERROR_KERNEL_PM="PM should be enabled in the kernel for full powertop function" + check_extra_config + fi + fi +} + +src_prepare() { + eautoreconf +} + +src_configure() { + export ac_cv_search_delwin=$(usex unicode -lncursesw -lncurses) + default +} |