diff options
author | Mike Frysinger <vapier@gentoo.org> | 2012-04-19 01:22:35 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2012-04-19 01:22:35 +0000 |
commit | 9f299eb911ed8823dd42cff364533bba4aa1511d (patch) | |
tree | c8ca117fcc2dc7ffe9d5370b28ed9755f39d11b8 /sys-power/powertop/files | |
parent | Version bump for beta channel release. (diff) | |
download | gentoo-2-9f299eb911ed8823dd42cff364533bba4aa1511d.tar.gz gentoo-2-9f299eb911ed8823dd42cff364533bba4aa1511d.tar.bz2 gentoo-2-9f299eb911ed8823dd42cff364533bba4aa1511d.zip |
Revert incorrect libnl change (powertop works with libnl ver 1, 2, or 3), and further clean up the build.
(Portage version: 2.2.0_alpha100/cvs/Linux x86_64)
Diffstat (limited to 'sys-power/powertop/files')
-rw-r--r-- | sys-power/powertop/files/powertop-1.98-build-libnl-3.patch | 27 | ||||
-rw-r--r-- | sys-power/powertop/files/powertop-1.98-build.patch | 70 |
2 files changed, 89 insertions, 8 deletions
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 |