diff --git a/sdk_container/src/third_party/portage-stable/sys-power/powertop/files/powertop-1.98-build-cc.patch b/sdk_container/src/third_party/portage-stable/sys-power/powertop/files/powertop-1.98-build-cc.patch new file mode 100644 index 0000000000..70beb81db3 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-power/powertop/files/powertop-1.98-build-cc.patch @@ -0,0 +1,28 @@ +From e2a8efc2d349880833215ccbe9ac6cb80cdfe5d0 Mon Sep 17 00:00:00 2001 +From: Mike Frysinger +Date: Tue, 23 Aug 2011 18:03:38 -0400 +Subject: [PATCH] allow control over the build compiler + +Signed-off-by: Mike Frysinger +--- + Makefile | 3 ++- + 1 files changed, 2 insertions(+), 1 deletions(-) + +diff --git a/Makefile b/Makefile +index f637bfe..75e6e63 100644 +--- a/Makefile ++++ b/Makefile +@@ -80,8 +80,9 @@ install: powertop + @(cd po/ && env LOCALESDIR=$(LOCALESDIR) DESTDIR=$(DESTDIR) $(MAKE) $@) + + ++BUILD_CC ?= gcc + csstoh: csstoh.c +- gcc -o csstoh csstoh.c ++ $(BUILD_CC) -o csstoh csstoh.c + + css.h: csstoh powertop.css + ./csstoh powertop.css css.h +-- +1.7.6 + diff --git a/sdk_container/src/third_party/portage-stable/sys-power/powertop/files/powertop-1.98-build.patch b/sdk_container/src/third_party/portage-stable/sys-power/powertop/files/powertop-1.98-build.patch new file mode 100644 index 0000000000..cebb09f4ee --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-power/powertop/files/powertop-1.98-build.patch @@ -0,0 +1,26 @@ +From f60a30a247fd1bfdd58de42934937a861e4b927a Mon Sep 17 00:00:00 2001 +From: Mike Frysinger +Date: Tue, 23 Aug 2011 18:01:36 -0400 +Subject: [PATCH] use CFLAGS/LDFLAGS when linking + +Signed-off-by: Mike Frysinger +--- + Makefile | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/Makefile b/Makefile +index b0b6cb7..f637bfe 100644 +--- a/Makefile ++++ b/Makefile +@@ -70,7 +70,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 + @(cd po/ && $(MAKE)) + + install: powertop +-- +1.7.6 + diff --git a/sdk_container/src/third_party/portage-stable/sys-power/powertop/powertop-1.98.ebuild b/sdk_container/src/third_party/portage-stable/sys-power/powertop/powertop-1.98.ebuild new file mode 100644 index 0000000000..9e7c34dc1b --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-power/powertop/powertop-1.98.ebuild @@ -0,0 +1,64 @@ +# Copyright 1999-2011 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.1 2011/08/23 22:14:16 vapier Exp $ + +EAPI="4" + +inherit eutils toolchain-funcs +if [[ ${PV} == "9999" ]] ; then + EGIT_REPO_URI="git://git.kernel.org/pub/scm/status/powertop/powertop.git" + inherit git-2 + SRC_URI="" +else + SRC_URI="mirror://kernel/linux/status/${PN}/${P}.tar.bz2" + KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" +fi + +DESCRIPTION="tool that helps you find what software is using the most power" +HOMEPAGE="http://www.lesswatts.org/projects/powertop/" + +LICENSE="GPL-2" +SLOT="0" +IUSE="unicode" + +DEPEND=" + dev-libs/libnl + sys-apps/pciutils + sys-devel/gettext + sys-libs/ncurses[unicode?] + sys-libs/zlib +" +RDEPEND=" + ${DEPEND} + net-wireless/bluez + x11-apps/xset +" + +DOCS=( TODO README ) + +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 +} + +src_configure() { + tc-export BUILD_CC CC CXX + CFLAGS+=" ${CPPFLAGS}" # blah! +} + +src_install() { + default + keepdir /var/cache/powertop +} + +pkg_postinst() { + echo + einfo "For PowerTOP to work best, use a Linux kernel with the" + einfo "tickless idle (NO_HZ) feature enabled (version 2.6.21 or later)" + echo +}