# Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit toolchain-funcs DESCRIPTION="A RSS/Atom feed reader for the text console." SRC_URI="http://www.newsbeuter.org/downloads/${P}.tar.gz" HOMEPAGE="http://www.newsbeuter.org" LICENSE="MIT" SLOT="0" KEYWORDS="~amd64" IUSE="doc nls" DEPEND=">=dev-db/sqlite-3.4 >=dev-libs/stfl-0.18 net-misc/curl nls? ( sys-devel/gettext ) doc? ( >=app-text/asciidoc-8.2.6 )" src_unpack() { unpack ${A} cd "${S}" if ! use nls; then sed -i \ -e "s:-D_ENABLE_NLS::" \ -e "s,^install: install-mo,install:," \ -e "s:^NB_DEPS=\$(MOFILES):NB_DEPS=:" \ -e "s,^\$(PODBEUTER): \$(MOFILES),\$(PODBEUTER):," \ Makefile || die "patching Makefile failed" sed -i -e "s:gettext::" src/keymap.cpp \ || die "patching src/keymap.cpp failed" fi sed -i \ -e "s:-ggdb::" \ -e "s:^CXX=.*:CXX=$(tc-getCXX):" \ -e "s:^CC=.*:CC=$(tc-getCC):" \ -e "s:^AR=.*:AR=$(tc-getAR):" \ -e "s:^RANLIB=.*:RANLIB=$(tc-getRANLIB):" \ -e "s:\$(MKDIR) \$(docdir).*::" \ -e "s:\$(INSTALL) -m 644 doc.*::" \ Makefile } src_compile() { emake prefix="/usr" config || die "make config failed" if use doc; then emake prefix="/usr" doc || die "emake doc failed" fi emake prefix="/usr" all || die "emake failed" } src_install() { emake prefix="${D}/usr" install || die "emake install failed" if use doc; then dodoc doc/newsbeuter-cfgcmds.txt \ doc/newsbeuter-keycmds.txt \ doc/podbeuter-cfgcmds.txt doman doc/podbeuter.1 doc/newsbeuter.1 fi; dodoc AUTHORS README CHANGES TODO \ doc/example-config \ doc/example-bookmark-plugin.sh dohtml -A xhtml doc/xhtml/newsbeuter.html }