mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-28 00:51:41 +02:00
sys-power: powertop: Version 1.98 from Gentoo
BUG=chromium-os:19538 TEST=Run 'powertop' and make sure it reports ver. 1.98 at the top. Change-Id: Ib88309ff329a0ab892555e1757f84289096a9c5a Signed-off-by: Simon Que <sque@chromium.org> Reviewed-on: http://gerrit.chromium.org/gerrit/6563 Reviewed-by: Mike Frysinger <vapier@chromium.org> Reviewed-by: David James <davidjames@chromium.org>
This commit is contained in:
parent
5235d9d148
commit
4dabbe5fd8
@ -0,0 +1,28 @@
|
|||||||
|
From e2a8efc2d349880833215ccbe9ac6cb80cdfe5d0 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Mike Frysinger <vapier@gentoo.org>
|
||||||
|
Date: Tue, 23 Aug 2011 18:03:38 -0400
|
||||||
|
Subject: [PATCH] allow control over the build compiler
|
||||||
|
|
||||||
|
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
||||||
|
---
|
||||||
|
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
|
||||||
|
|
26
sdk_container/src/third_party/portage-stable/sys-power/powertop/files/powertop-1.98-build.patch
vendored
Normal file
26
sdk_container/src/third_party/portage-stable/sys-power/powertop/files/powertop-1.98-build.patch
vendored
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
From f60a30a247fd1bfdd58de42934937a861e4b927a 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
|
||||||
|
|
||||||
|
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
||||||
|
---
|
||||||
|
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
|
||||||
|
|
64
sdk_container/src/third_party/portage-stable/sys-power/powertop/powertop-1.98.ebuild
vendored
Normal file
64
sdk_container/src/third_party/portage-stable/sys-power/powertop/powertop-1.98.ebuild
vendored
Normal file
@ -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
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user