From fd57f2f9db49c571f9223ffa4883bab1f804de00 Mon Sep 17 00:00:00 2001 From: Tony Vroon Date: Tue, 19 Oct 2010 21:16:33 +0000 Subject: Instill LDFLAGS respect into build system. Port to EAPI=2. Closes bug #341479 by Diego Elio "Flameeyes" Pettenò . MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (Portage version: 2.1.9.20/cvs/Linux x86_64) --- app-laptop/ibam/ChangeLog | 11 +++++- app-laptop/ibam/files/ibam-0.5.2-ldflags.patch | 27 +++++++++++++ app-laptop/ibam/ibam-0.5.2-r1.ebuild | 54 ++++++++++++++++++++++++++ app-laptop/ibam/ibam-0.5.2.ebuild | 4 +- 4 files changed, 92 insertions(+), 4 deletions(-) create mode 100644 app-laptop/ibam/files/ibam-0.5.2-ldflags.patch create mode 100644 app-laptop/ibam/ibam-0.5.2-r1.ebuild (limited to 'app-laptop') 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; +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ò . *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 -- cgit v1.2.3-65-gdbad