--- irssi-xmpp-0.50.ebuild 2009-11-03 18:50:43.000000000 +0100 +++ irssi-xmpp-0.51.ebuild 2010-08-28 12:39:34.000000000 +0200 @@ -4,7 +4,7 @@ EAPI="2" -inherit toolchain-funcs +inherit eutils toolchain-funcs multilib DESCRIPTION="An irssi plugin providing Jabber/XMPP support" HOMEPAGE="http://cybione.org/~irssi-xmpp/" @@ -20,21 +20,15 @@ RDEPEND="${DEPEND}" src_prepare() { - # Patch config.mk to include local CFLAGS and LDFLAGS. - # Those can probably be removed after 0.50 since upstream fixed it. - # Also set PREFIX and CC to the values we prefer. - sed -i \ - -e "s#^CFLAGS = #CFLAGS = ${CFLAGS} #" \ - -e "s#^LDFLAGS = #LDFLAGS = ${LDFLAGS} #" \ - -e "/^PREFIX ?\\?= /cPREFIX = /usr" \ - -e "/^CC = /cCC = $(tc-getCC)" \ - config.mk || die "patching config.mk failed" - # Patch Makefile to remove /irssi-xmpp suffix for docs. - sed -i -e 's#\${IRSSI_DOC}/irssi-xmpp$#${IRSSI_DOC}#' \ - Makefile || die "patching Makefile failed" + epatch "${FILESDIR}"/${P}-build_system.patch \ + "${FILESDIR}"/${P}-implicit_conversion.patch +} + +src_compile() { + emake PREFIX="/usr" CC="$(tc-getCC)" || die } src_install() { - emake DESTDIR="${D}" IRSSI_DOC="/usr/share/doc/${PF}" \ - install || die "install failed" + emake DESTDIR="${D}" PREFIX="/usr" IRSSI_LIB="/usr/$(get_libdir)/irssi" \ + IRSSI_DOC="/usr/share/doc/${PF}" install || die }