summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys-power/powertop/ChangeLog10
-rw-r--r--sys-power/powertop/files/powertop-1.98-build-libnl-3.patch27
-rw-r--r--sys-power/powertop/files/powertop-1.98-build.patch70
-rw-r--r--sys-power/powertop/powertop-1.98.ebuild12
-rw-r--r--sys-power/powertop/powertop-9999.ebuild10
5 files changed, 104 insertions, 25 deletions
diff --git a/sys-power/powertop/ChangeLog b/sys-power/powertop/ChangeLog
index dbb6bc88ac09..660f5cbe3f80 100644
--- a/sys-power/powertop/ChangeLog
+++ b/sys-power/powertop/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sys-power/powertop
-# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-power/powertop/ChangeLog,v 1.47 2011/10/27 16:21:54 jer Exp $
+# 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 $
+
+ 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,
+ powertop-9999.ebuild:
+ Revert incorrect libnl change (powertop works with libnl ver 1, 2, or 3), and
+ further clean up the build.
27 Oct 2011; Jeroen Roovers <jer@gentoo.org> powertop-1.97-r1.ebuild,
powertop-1.98.ebuild:
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
index cebb09f4ee3d..8f130fdacebc 100644
--- a/sys-power/powertop/files/powertop-1.98-build.patch
+++ b/sys-power/powertop/files/powertop-1.98-build.patch
@@ -1,26 +1,80 @@
-From f60a30a247fd1bfdd58de42934937a861e4b927a Mon Sep 17 00:00:00 2001
+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 CFLAGS/LDFLAGS when linking
+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 | 2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
+ Makefile | 20 ++++++++++++--------
+ 1 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/Makefile b/Makefile
-index b0b6cb7..f637bfe 100644
+index b0b6cb7..bf9b79a 100644
--- a/Makefile
+++ b/Makefile
-@@ -70,7 +70,7 @@ clean:
+@@ -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) $(CFLAGS) $(LDFLAGS) $(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.6
+1.7.8.5
diff --git a/sys-power/powertop/powertop-1.98.ebuild b/sys-power/powertop/powertop-1.98.ebuild
index 24e44bd833e9..dec17f677bf1 100644
--- a/sys-power/powertop/powertop-1.98.ebuild
+++ b/sys-power/powertop/powertop-1.98.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2011 Gentoo Foundation
+# 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.2 2011/10/27 16:21:54 jer Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-power/powertop/powertop-1.98.ebuild,v 1.3 2012/04/19 01:22:34 vapier Exp $
EAPI="4"
@@ -22,7 +22,7 @@ SLOT="0"
IUSE="unicode"
DEPEND="
- dev-libs/libnl:1.1
+ dev-libs/libnl
sys-apps/pciutils
sys-devel/gettext
sys-libs/ncurses[unicode?]
@@ -40,15 +40,11 @@ src_prepare() {
use unicode || sed -i 's:-lncursesw:-lncurses:' Makefile
epatch "${FILESDIR}"/${PN}-1.98-build.patch
epatch "${FILESDIR}"/${PN}-1.98-build-cc.patch
- sed -i -r \
- -e '/FLAGS/s: (-O2|-g|-fno-omit-frame-pointer|-fstack-protector|-D_FORTIFY_SOURCE=2)\>: :g' \
- -e '/@\$\(CC\)/s:@::' \
- Makefile || die
+ epatch "${FILESDIR}"/${PN}-1.98-build-libnl-3.patch
}
src_configure() {
tc-export BUILD_CC CC CXX
- CFLAGS+=" ${CPPFLAGS}" # blah!
}
src_install() {
diff --git a/sys-power/powertop/powertop-9999.ebuild b/sys-power/powertop/powertop-9999.ebuild
index c70e4ee7bf9a..0216a6645f77 100644
--- a/sys-power/powertop/powertop-9999.ebuild
+++ b/sys-power/powertop/powertop-9999.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2011 Gentoo Foundation
+# 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.7 2011/08/23 22:14:16 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-power/powertop/powertop-9999.ebuild,v 1.8 2012/04/19 01:22:34 vapier Exp $
EAPI="4"
@@ -40,15 +40,11 @@ src_prepare() {
use unicode || sed -i 's:-lncursesw:-lncurses:' Makefile
epatch "${FILESDIR}"/${PN}-1.98-build.patch
epatch "${FILESDIR}"/${PN}-1.98-build-cc.patch
- sed -i -r \
- -e '/FLAGS/s: (-O2|-g|-fno-omit-frame-pointer|-fstack-protector|-D_FORTIFY_SOURCE=2)\>: :g' \
- -e '/@\$\(CC\)/s:@::' \
- Makefile || die
+ epatch "${FILESDIR}"/${PN}-1.98-build-libnl-3.patch
}
src_configure() {
tc-export BUILD_CC CC CXX
- CFLAGS+=" ${CPPFLAGS}" # blah!
}
src_install() {