diff options
Diffstat (limited to 'sys-power')
-rw-r--r-- | sys-power/Manifest.gz | bin | 5546 -> 5547 bytes | |||
-rw-r--r-- | sys-power/powertop/Manifest | 7 | ||||
-rw-r--r-- | sys-power/powertop/files/powertop-2.9-libc++.patch | 44 | ||||
-rw-r--r-- | sys-power/powertop/powertop-2.8.ebuild | 9 | ||||
-rw-r--r-- | sys-power/powertop/powertop-2.9.ebuild | 115 | ||||
-rw-r--r-- | sys-power/powertop/powertop-9999.ebuild | 15 |
6 files changed, 180 insertions, 10 deletions
diff --git a/sys-power/Manifest.gz b/sys-power/Manifest.gz Binary files differindex a7d69275199f..6baf7d05fb2c 100644 --- a/sys-power/Manifest.gz +++ b/sys-power/Manifest.gz diff --git a/sys-power/powertop/Manifest b/sys-power/powertop/Manifest index dbc8b8feeb19..39630ac68359 100644 --- a/sys-power/powertop/Manifest +++ b/sys-power/powertop/Manifest @@ -1,4 +1,7 @@ +AUX powertop-2.9-libc++.patch 1182 BLAKE2B cad53198b44a1b402995207c33e33d06cec5f2994f3acb2b03fd81cbf78d5e7b85828fbbc1290b0308494fd29fd5c6b8b886bed7d206e530835db9d559963652 SHA512 ea4925df50118e0394e81a1eb18fc2559d7459065bc9e10978e60bd9ada0c757583b691cf98f4da07be9545163663cb993db72774ae3963b7873500767b86972 DIST powertop-2.8.tar.gz 670000 BLAKE2B 4259f462d36fe0cbb157859d6e1d3e1face67f7232fe8d4112d77f844b545f49e9cf486e21bcbc34f64ffb0c891c1864141784dde14e3a96647d6535641a840a SHA512 253d0e15f0972cf8639735c510f4884d49a0da76c31dd2f39603e2297e6c6f0b9fa283c7b3cb04a431c91f8296275c0adaecc4c3e9ea132c0c31064f7f432c80 -EBUILD powertop-2.8.ebuild 3316 BLAKE2B 2abff4940a54cd69899acd851ef7539447b99dc231ccb5c5465c7b3f5ef9dd9dfb65e4e9e06de129b4ac1d21f18a206cade36d44e96a8873fb0dbd6b3ae1ddd4 SHA512 89fddfe5836f3c52e83761eea4b58eadbe89354bb1a220bac798a637e9eff349cb5273df563b74bbb96413a41cc487a917fa4fbde65faeccf0ee9ac18c548d49 -EBUILD powertop-9999.ebuild 3575 BLAKE2B 39a2dd7a0e0bdd42459cd9c3605d934935b230d63e1a4db087abecc37f5d7c1f39325f192a5adb9f4fd79933122f4c423c9feb0b28b61f1f0c928e510207720a SHA512 c4f4fa75a57402806a1eb80183aea4c2dbbdbc0e9add49ccfc216445334674a104308318ff5fa228585cd1754c265a202465752fc043718843af49878937bc3e +DIST powertop-v2.9.tar.gz 718763 BLAKE2B bb6ce789614397b02f0e9f1cb71585cb456c1428cc43e9fe1c4b3bc9f96171fede4c587410e78e58ad8d0b0f772549a93f454bcd1b521e6dd3c809a85dc3cf30 SHA512 783af538c44e3fae7215a5b4247eb32a72e02150b3f297e6b9777a450823dd30aca014601892c0e80937a366eed95b42b622c68161d53e905ad4fbcb574b26f5 +EBUILD powertop-2.8.ebuild 3356 BLAKE2B ab7b2846e8752558a56545e94fb036d7c4f5322cf02d29b3f9c30e76c3f3b9690e2cb962c8180991b169363bc22d1109fd4139a287f87cf6c53edb251d659cdd SHA512 e243fd2facd6195480a121d665d80ce049561713d81a1165ced9a18756d2ac9728620b83c0c6acbe9433c5a87e568003f70980b77d1866b302a55d22e75c2e90 +EBUILD powertop-2.9.ebuild 3709 BLAKE2B 0c33754aef5fa578e3081f4ea4bbf1f57b954a4c881505011f8341d97b3b7fdce8b2de250658ca14d5f2fd4cfdb5830c0a6693a757a59f1022bc33e1f713bf6d SHA512 31553e19089a6a510891e3e26f68f7b135bb04da803802ed1ff3df7a1c372bfe6446ccb5cc85a3794348a7912fbdea040b0c5107842df8ca8b52b7a1d3c6717b +EBUILD powertop-9999.ebuild 3663 BLAKE2B b020232c48201403e5467004745f82dad3f25231107b8bd6b227b257f20611a305545195a3ff89a7990a05f4cca3d73c761966af4d0b61b663118043fbf0e522 SHA512 9020b3bb5e59d05150cc8e3bc22f18d959c18c08db02256f1b06754a1a4293a04e400fe3d37b1a6910ff4f167221e2b37abf67a52d13d76a9c4941d7d6cbf8d7 MISC metadata.xml 253 BLAKE2B 48f33288fc58b41b96f50af29bb4ce8989e714fa989ed445afc8933d1483e1026a019783805ad1b42399227819f461ed5c874df1c78c4bf144bccd07306ee995 SHA512 fad4a58e4c2a6eaa8bbbdc75e3995b5da53c9291f82480e35a9badfc1374bcc484663f2577790a46218be90d3b42bb45620297316c5493bc4a46af0dbd29189e diff --git a/sys-power/powertop/files/powertop-2.9-libc++.patch b/sys-power/powertop/files/powertop-2.9-libc++.patch new file mode 100644 index 000000000000..d378280f3c68 --- /dev/null +++ b/sys-power/powertop/files/powertop-2.9-libc++.patch @@ -0,0 +1,44 @@ +https://github.com/fenrus75/powertop/commit/b9c431aad6cc5383c9571007469eee8e64ec85a6 + +From b9c431aad6cc5383c9571007469eee8e64ec85a6 Mon Sep 17 00:00:00 2001 +From: Manoj Gupta <manojgupta@chromium.org> +Date: Sat, 4 Nov 2017 13:44:04 -0700 +Subject: [PATCH] Fix powertop build with libc++. + +<ctime> header is not automatically included with libc++. +Add it explicitly to make powertop build with libc++. + +This fixes the following errors: +devices/gpu_rapl_device.cpp:35:14: error: use of undeclared identifier +'time'; did you mean 'tie'? +last_time = time(NULL); + ^~~~ +devices/gpu_rapl_device.cpp:45:14: error:use of undeclared identifier +'time'; did you mean 'tie'? +last_time = time(NULL); + ^~~~ + +parameters/learn.cpp:161:10: error: use of undeclared identifier +'time'; did you mean 'tie'? +start = time(NULL); + ^~~~ +--- + src/lib.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/lib.h b/src/lib.h +index b64bb0f5433f..6d85eb6e4b40 100644 +--- a/src/lib.h ++++ b/src/lib.h +@@ -54,7 +54,7 @@ extern const char *kernel_function(uint64_t address); + + + +- ++#include <ctime> + #include <string> + using namespace std; + +-- +2.15.1 + diff --git a/sys-power/powertop/powertop-2.8.ebuild b/sys-power/powertop/powertop-2.8.ebuild index ab67bbf8ed91..e0975e47ca83 100644 --- a/sys-power/powertop/powertop-2.8.ebuild +++ b/sys-power/powertop/powertop-2.8.ebuild @@ -45,7 +45,6 @@ pkg_setup() { ~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" @@ -58,8 +57,7 @@ pkg_setup() { 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_BLK_DEV_IO_TRACE="BLK_DEV_IO_TRACE needs to be turned on to enable other config options" ERROR_KERNEL_TRACING="TRACING should be enabled in the kernel for full powertop function" linux-info_pkg_setup if linux_config_exists; then @@ -84,6 +82,11 @@ pkg_setup() { ERROR_KERNEL_PM="PM should be enabled in the kernel for full powertop function" check_extra_config fi + if kernel_is -lt 4 11; then + CONFIG_CHECK="~TIMER_STATS" + ERROR_KERNEL_TIMER_STATS="TIMER_STATS should be enabled in the kernel for full powertop function" + check_extra_config + fi fi } diff --git a/sys-power/powertop/powertop-2.9.ebuild b/sys-power/powertop/powertop-2.9.ebuild new file mode 100644 index 000000000000..a46c1a302cbc --- /dev/null +++ b/sys-power/powertop/powertop-2.9.ebuild @@ -0,0 +1,115 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" + +inherit eutils linux-info +if [[ ${PV} == "9999" ]] ; then + EGIT_REPO_URI="https://github.com/fenrus75/powertop.git" + inherit git-r3 autotools + SRC_URI="" +else + MY_P="${PN}-v${PV}" + SRC_URI="https://01.org/sites/default/files/downloads/${PN}/${MY_P}.tar.gz" + KEYWORDS="~amd64 ~arm ~ppc ~sparc ~x86 ~amd64-linux ~x86-linux" + S="${WORKDIR}/${MY_P}" +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 +" + +PATCHES=( + "${FILESDIR}"/${P}-libc++.patch +) + +pkg_setup() { + CONFIG_CHECK=" + ~X86_MSR + ~DEBUG_FS + ~PERF_EVENTS + ~TRACEPOINTS + ~NO_HZ_IDLE + ~HIGH_RES_TIMERS + ~HPET_TIMER + ~CPU_FREQ_STAT + ~CPU_FREQ_GOV_ONDEMAND + ~FTRACE + ~BLK_DEV_IO_TRACE + ~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_IDLE="NO_HZ_IDLE 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 other config options" + 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 + if kernel_is -lt 4 11; then + CONFIG_CHECK="~TIMER_STATS" + ERROR_KERNEL_TIMER_STATS="TIMER_STATS should be enabled in the kernel for full powertop function" + check_extra_config + fi + fi +} + +src_prepare() { + default + if [[ ${PV} == "9999" ]] ; then + chmod +x scripts/version || die "Failed to make 'scripts/version' executable" + scripts/version || die "Failed to extract version information" + eautoreconf + fi +} + +src_configure() { + export ac_cv_search_delwin=$(usex unicode -lncursesw -lncurses) + econf $(use_enable nls) +} diff --git a/sys-power/powertop/powertop-9999.ebuild b/sys-power/powertop/powertop-9999.ebuild index 8d4d40d26b93..62872e31be8e 100644 --- a/sys-power/powertop/powertop-9999.ebuild +++ b/sys-power/powertop/powertop-9999.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2017 Gentoo Foundation +# Copyright 1999-2018 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 EAPI="6" @@ -9,8 +9,10 @@ if [[ ${PV} == "9999" ]] ; then inherit git-r3 autotools SRC_URI="" else - SRC_URI="https://01.org/sites/default/files/downloads/${PN}/${P}.tar.gz" + MY_P="${PN}-v${PV}" + SRC_URI="https://01.org/sites/default/files/downloads/${PN}/${MY_P}.tar.gz" KEYWORDS="~amd64 ~arm ~ppc ~sparc ~x86 ~amd64-linux ~x86-linux" + S="${WORKDIR}/${MY_P}" fi DESCRIPTION="tool that helps you find what software is using the most power" @@ -49,7 +51,6 @@ pkg_setup() { ~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" @@ -62,8 +63,7 @@ pkg_setup() { 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_BLK_DEV_IO_TRACE="BLK_DEV_IO_TRACE needs to be turned on to enable other config options" ERROR_KERNEL_TRACING="TRACING should be enabled in the kernel for full powertop function" linux-info_pkg_setup if linux_config_exists; then @@ -88,6 +88,11 @@ pkg_setup() { ERROR_KERNEL_PM="PM should be enabled in the kernel for full powertop function" check_extra_config fi + if kernel_is -lt 4 11; then + CONFIG_CHECK="~TIMER_STATS" + ERROR_KERNEL_TIMER_STATS="TIMER_STATS should be enabled in the kernel for full powertop function" + check_extra_config + fi fi } |