From 9b8e91b6ebbc1fc6ba4898618edca2128e0502eb Mon Sep 17 00:00:00 2001
From: Mike Frysinger <vapier@gentoo.org>
Date: Thu, 31 May 2007 08:09:07 +0000
Subject: Remove stupid USE=unicode requirement and make sure LDFLAGS are
 respected. (Portage version: 2.1.2.8)

---
 sys-power/powertop/ChangeLog           |  5 ++++-
 sys-power/powertop/powertop-1.5.ebuild | 18 +++++++++---------
 2 files changed, 13 insertions(+), 10 deletions(-)

(limited to 'sys-power/powertop')

diff --git a/sys-power/powertop/ChangeLog b/sys-power/powertop/ChangeLog
index 7b725f95c926..ab6a62793ab7 100644
--- a/sys-power/powertop/ChangeLog
+++ b/sys-power/powertop/ChangeLog
@@ -1,6 +1,9 @@
 # ChangeLog for sys-power/powertop
 # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-power/powertop/ChangeLog,v 1.8 2007/05/30 00:06:43 genstef Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-power/powertop/ChangeLog,v 1.9 2007/05/31 08:09:07 vapier Exp $
+
+  31 May 2007; Mike Frysinger <vapier@gentoo.org> powertop-1.5.ebuild:
+  Remove stupid USE=unicode requirement and make sure LDFLAGS are respected.
 
   29 May 2007; Stefan Schweizer <genstef@gentoo.org> powertop-1.5.ebuild:
   work around portage trying to compress twice thanks Andre
diff --git a/sys-power/powertop/powertop-1.5.ebuild b/sys-power/powertop/powertop-1.5.ebuild
index 6811a67a6f5f..3f5ded6d2042 100644
--- a/sys-power/powertop/powertop-1.5.ebuild
+++ b/sys-power/powertop/powertop-1.5.ebuild
@@ -1,6 +1,6 @@
 # Copyright 1999-2007 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-power/powertop/powertop-1.5.ebuild,v 1.2 2007/05/30 00:06:43 genstef Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-power/powertop/powertop-1.5.ebuild,v 1.3 2007/05/31 08:09:07 vapier Exp $
 
 inherit toolchain-funcs eutils
 
@@ -11,15 +11,15 @@ SRC_URI="http://www.linuxpowertop.org/download/${P}.tar.gz"
 LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS="~amd64 ~x86"
-IUSE=""
+IUSE="unicode"
+
 DEPEND="sys-libs/ncurses"
-RDEPEND="${DEPEND}"
 
-pkg_setup() {
-	if ! built_with_use sys-libs/ncurses unicode; then
-		eerror "You need USE=unicode for sys-libs/ncurses"
-		die "You need USE=unicode for sys-libs/ncurses"
-	fi
+src_unpack() {
+	unpack ${A}
+	cd "${S}"
+	sed -i '/${CFLAGS}/s:$: ${LDFLAGS}:' Makefile
+	use unicode || sed -i 's:-lncursesw:-lncurses:' Makefile
 }
 
 src_compile() {
@@ -30,7 +30,7 @@ src_compile() {
 src_install() {
 	emake install DESTDIR="${D}" || die
 	dodoc Changelog README
-	gunzip ${D}/usr/share/man/man1/powertop.1.gz
+	gunzip "${D}"/usr/share/man/man1/powertop.1.gz
 }
 
 pkg_postinst() {
-- 
cgit v1.2.3-65-gdbad