summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2012-04-19 16:17:48 +0000
committerMike Frysinger <vapier@gentoo.org>2012-04-19 16:17:48 +0000
commit386d5e552cb3bb20525927d5610e390b7c5573c4 (patch)
tree6ea616f43773c6cfd65b82581cbc045b88b6307d /sys-power
parentDrop ~hppa and ~mips: they've been added by mistake without proper testing by... (diff)
downloadgentoo-2-386d5e552cb3bb20525927d5610e390b7c5573c4.tar.gz
gentoo-2-386d5e552cb3bb20525927d5610e390b7c5573c4.tar.bz2
gentoo-2-386d5e552cb3bb20525927d5610e390b7c5573c4.zip
Fix building with gcc-4.7.
(Portage version: 2.2.0_alpha100/cvs/Linux x86_64)
Diffstat (limited to 'sys-power')
-rw-r--r--sys-power/powertop/ChangeLog6
-rw-r--r--sys-power/powertop/files/powertop-1.98-gcc-4.7.patch151
-rw-r--r--sys-power/powertop/powertop-1.98.ebuild3
-rw-r--r--sys-power/powertop/powertop-9999.ebuild3
4 files changed, 160 insertions, 3 deletions
diff --git a/sys-power/powertop/ChangeLog b/sys-power/powertop/ChangeLog
index 660f5cbe3f80..3e1a2011d5a8 100644
--- a/sys-power/powertop/ChangeLog
+++ b/sys-power/powertop/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for sys-power/powertop
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-power/powertop/ChangeLog,v 1.48 2012/04/19 01:22:34 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-power/powertop/ChangeLog,v 1.49 2012/04/19 16:17:48 vapier Exp $
+
+ 19 Apr 2012; Mike Frysinger <vapier@gentoo.org> powertop-1.98.ebuild,
+ +files/powertop-1.98-gcc-4.7.patch, powertop-9999.ebuild:
+ Fix building with gcc-4.7.
19 Apr 2012; Mike Frysinger <vapier@gentoo.org> powertop-1.98.ebuild,
files/powertop-1.98-build.patch, +files/powertop-1.98-build-libnl-3.patch,
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/powertop-1.98.ebuild b/sys-power/powertop/powertop-1.98.ebuild
index dec17f677bf1..2ecdd68d1a53 100644
--- a/sys-power/powertop/powertop-1.98.ebuild
+++ b/sys-power/powertop/powertop-1.98.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-power/powertop/powertop-1.98.ebuild,v 1.3 2012/04/19 01:22:34 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-power/powertop/powertop-1.98.ebuild,v 1.4 2012/04/19 16:17:48 vapier Exp $
EAPI="4"
@@ -41,6 +41,7 @@ src_prepare() {
epatch "${FILESDIR}"/${PN}-1.98-build.patch
epatch "${FILESDIR}"/${PN}-1.98-build-cc.patch
epatch "${FILESDIR}"/${PN}-1.98-build-libnl-3.patch
+ epatch "${FILESDIR}"/${PN}-1.98-gcc-4.7.patch
}
src_configure() {
diff --git a/sys-power/powertop/powertop-9999.ebuild b/sys-power/powertop/powertop-9999.ebuild
index 0216a6645f77..938c3a2f621b 100644
--- a/sys-power/powertop/powertop-9999.ebuild
+++ b/sys-power/powertop/powertop-9999.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-power/powertop/powertop-9999.ebuild,v 1.8 2012/04/19 01:22:34 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-power/powertop/powertop-9999.ebuild,v 1.9 2012/04/19 16:17:48 vapier Exp $
EAPI="4"
@@ -41,6 +41,7 @@ src_prepare() {
epatch "${FILESDIR}"/${PN}-1.98-build.patch
epatch "${FILESDIR}"/${PN}-1.98-build-cc.patch
epatch "${FILESDIR}"/${PN}-1.98-build-libnl-3.patch
+ epatch "${FILESDIR}"/${PN}-1.98-gcc-4.7.patch
}
src_configure() {