commit:     56d45d2e211908e6a4055c67d798c2a90395e77d
Author:     Mike Frysinger <vapier <AT> chromium <DOT> org>
AuthorDate: Wed Jan 24 23:34:54 2018 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Wed Jan 24 23:34:54 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=56d45d2e

sys-power/powertop: version bump to 2.9 #637342

 sys-power/powertop/Manifest                        |  1 +
 sys-power/powertop/files/powertop-2.9-libc++.patch | 44 ++++++++++++++++++++++
 .../{powertop-9999.ebuild => powertop-2.9.ebuild}  | 10 ++++-
 sys-power/powertop/powertop-9999.ebuild            |  6 ++-
 4 files changed, 57 insertions(+), 4 deletions(-)

diff --git a/sys-power/powertop/Manifest b/sys-power/powertop/Manifest
index 25ec6b5378f..c0cd2b6155f 100644
--- a/sys-power/powertop/Manifest
+++ b/sys-power/powertop/Manifest
@@ -1 +1,2 @@
 DIST powertop-2.8.tar.gz 670000 BLAKE2B 
4259f462d36fe0cbb157859d6e1d3e1face67f7232fe8d4112d77f844b545f49e9cf486e21bcbc34f64ffb0c891c1864141784dde14e3a96647d6535641a840a
 SHA512 
253d0e15f0972cf8639735c510f4884d49a0da76c31dd2f39603e2297e6c6f0b9fa283c7b3cb04a431c91f8296275c0adaecc4c3e9ea132c0c31064f7f432c80
+DIST powertop-v2.9.tar.gz 718763 BLAKE2B 
bb6ce789614397b02f0e9f1cb71585cb456c1428cc43e9fe1c4b3bc9f96171fede4c587410e78e58ad8d0b0f772549a93f454bcd1b521e6dd3c809a85dc3cf30
 SHA512 
783af538c44e3fae7215a5b4247eb32a72e02150b3f297e6b9777a450823dd30aca014601892c0e80937a366eed95b42b622c68161d53e905ad4fbcb574b26f5

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 00000000000..d378280f3c6
--- /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 <[email protected]>
+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-9999.ebuild 
b/sys-power/powertop/powertop-2.9.ebuild
similarity index 94%
copy from sys-power/powertop/powertop-9999.ebuild
copy to sys-power/powertop/powertop-2.9.ebuild
index 923a9055543..a46c1a302cb 100644
--- a/sys-power/powertop/powertop-9999.ebuild
+++ b/sys-power/powertop/powertop-2.9.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"
@@ -36,6 +38,10 @@ RDEPEND="
        virtual/libintl
 "
 
+PATCHES=(
+       "${FILESDIR}"/${P}-libc++.patch
+)
+
 pkg_setup() {
        CONFIG_CHECK="
                ~X86_MSR

diff --git a/sys-power/powertop/powertop-9999.ebuild 
b/sys-power/powertop/powertop-9999.ebuild
index 923a9055543..62872e31be8 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"

Reply via email to