summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTony Vroon <chainsaw@gentoo.org>2010-10-19 21:16:33 +0000
committerTony Vroon <chainsaw@gentoo.org>2010-10-19 21:16:33 +0000
commitfd57f2f9db49c571f9223ffa4883bab1f804de00 (patch)
tree84f05c03d1ea96c9def35aa13d5d636d7f918fb0 /app-laptop
parentQA: remove econf from src_prepare on EAPI=2. (diff)
downloadgentoo-2-fd57f2f9db49c571f9223ffa4883bab1f804de00.tar.gz
gentoo-2-fd57f2f9db49c571f9223ffa4883bab1f804de00.tar.bz2
gentoo-2-fd57f2f9db49c571f9223ffa4883bab1f804de00.zip
Instill LDFLAGS respect into build system. Port to EAPI=2. Closes bug #341479 by Diego Elio "Flameeyes" Pettenò <flameeyes@gentoo.org>.
(Portage version: 2.1.9.20/cvs/Linux x86_64)
Diffstat (limited to 'app-laptop')
-rw-r--r--app-laptop/ibam/ChangeLog11
-rw-r--r--app-laptop/ibam/files/ibam-0.5.2-ldflags.patch27
-rw-r--r--app-laptop/ibam/ibam-0.5.2-r1.ebuild54
-rw-r--r--app-laptop/ibam/ibam-0.5.2.ebuild4
4 files changed, 92 insertions, 4 deletions
diff --git a/app-laptop/ibam/ChangeLog b/app-laptop/ibam/ChangeLog
index e325fc8eea0f..15b6a3a800b9 100644
--- a/app-laptop/ibam/ChangeLog
+++ b/app-laptop/ibam/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for app-laptop/ibam
-# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-laptop/ibam/ChangeLog,v 1.6 2009/07/29 22:01:07 scarabeus Exp $
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/app-laptop/ibam/ChangeLog,v 1.7 2010/10/19 21:16:33 chainsaw Exp $
+
+*ibam-0.5.2-r1 (19 Oct 2010)
+
+ 19 Oct 2010; <chainsaw@gentoo.org> +ibam-0.5.2-r1.ebuild,
+ +files/ibam-0.5.2-ldflags.patch:
+ Instill LDFLAGS respect into build system. Port to EAPI=2. Closes bug
+ #341479 by Diego Elio "Flameeyes" Pettenò <flameeyes@gentoo.org>.
*ibam-0.5.2 (29 Jul 2009)
diff --git a/app-laptop/ibam/files/ibam-0.5.2-ldflags.patch b/app-laptop/ibam/files/ibam-0.5.2-ldflags.patch
new file mode 100644
index 000000000000..23c481dd6371
--- /dev/null
+++ b/app-laptop/ibam/files/ibam-0.5.2-ldflags.patch
@@ -0,0 +1,27 @@
+diff -uNr ibam-0.5.2.ORIG//Makefile ibam-0.5.2/Makefile
+--- ibam-0.5.2.ORIG//Makefile 2010-10-19 21:49:39.000000000 +0100
++++ ibam-0.5.2/Makefile 2010-10-19 21:53:27.000000000 +0100
+@@ -30,12 +30,12 @@
+ all: ibam
+
+ ibam: ibam.cpp ibam.inl ibam.hpp
+- $(CC) $(CFLAGS) ibam.cpp -o ibam
++ $(CC) $(LDFLAGS) $(CFLAGS) ibam.cpp -o ibam
+
+ krell: ibam-krell.so
+
+ ibam-krell.so: ibam-krell.o
+- $(CC) $(CFLAGS) -fPIC -shared -Wl -o ibam-krell.so ibam-krell.o
++ $(CC) $(LDFLAGS) $(CFLAGS) -fPIC -shared -Wl -o ibam-krell.so ibam-krell.o
+
+ ibam-krell.o: ibam-krell.cpp ibam.hpp ibam.inl
+ $(CC) $(CFLAGS) -fPIC `pkg-config gtk+-2.0 --cflags` `gdk-pixbuf-config --cflags` -c ibam-krell.cpp
+@@ -43,7 +43,7 @@
+ krell1: ibam-krell1.so
+
+ ibam-krell1.so: ibam-krell1.o
+- $(CC) $(CFLAGS) -shared -Wl -o ibam-krell1.so ibam-krell1.o
++ $(CC) $(LDFLAGS) $(CFLAGS) -shared -Wl -o ibam-krell1.so ibam-krell1.o
+
+ ibam-krell1.o: ibam-krell1.cpp ibam.hpp ibam.inl
+ $(CC) $(CFLAGS) -fPIC `gtk-config --cflags` `imlib-config --cflags-gdk` -c ibam-krell1.cpp
diff --git a/app-laptop/ibam/ibam-0.5.2-r1.ebuild b/app-laptop/ibam/ibam-0.5.2-r1.ebuild
new file mode 100644
index 000000000000..d2af89d2e973
--- /dev/null
+++ b/app-laptop/ibam/ibam-0.5.2-r1.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-laptop/ibam/ibam-0.5.2-r1.ebuild,v 1.1 2010/10/19 21:16:33 chainsaw Exp $
+
+EAPI=2
+
+inherit base toolchain-funcs
+
+DESCRIPTION="Intelligent Battery Monitor"
+HOMEPAGE="http://ibam.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+IUSE="gkrellm"
+
+DEPEND="gkrellm? ( app-admin/gkrellm )"
+RDEPEND="${DEPEND}"
+PATCHES=( "${FILESDIR}/${P}-ldflags.patch" )
+
+src_prepare() {
+ base_src_prepare
+ sed -i \
+ -e "s:^CFLAGS=-O3:CFLAGS=${CFLAGS}:" \
+ -e "s:^CC=g++:CC=$(tc-getCXX):" \
+ "${S}"/Makefile \
+ || die "Failed to set CFLAGS/compiler"
+}
+
+src_compile() {
+ emake || die "Making ibam failed"
+ if use gkrellm; then
+ emake krell || die "Making krell failed"
+ fi
+}
+
+src_install() {
+ dobin ibam || die "dobin failed"
+ dodoc CHANGES README REPORT || die "dodoc failed"
+
+ if use gkrellm; then
+ insinto /usr/$(get_libdir)/gkrellm2/plugins
+ doins ibam-krell.so || die "doins gkrellm plugin failed"
+ fi
+}
+
+pkg_postinst() {
+ elog
+ elog "You will need to install sci-visualization/gnuplot if you wish to use"
+ elog "the --plot argument to ibam."
+ elog
+}
diff --git a/app-laptop/ibam/ibam-0.5.2.ebuild b/app-laptop/ibam/ibam-0.5.2.ebuild
index 1719dd61fdd8..7030c04b9ef3 100644
--- a/app-laptop/ibam/ibam-0.5.2.ebuild
+++ b/app-laptop/ibam/ibam-0.5.2.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2009 Gentoo Foundation
+# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-laptop/ibam/ibam-0.5.2.ebuild,v 1.1 2009/07/29 22:01:07 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-laptop/ibam/ibam-0.5.2.ebuild,v 1.2 2010/10/19 21:16:33 chainsaw Exp $
inherit eutils toolchain-funcs