# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=3

DESCRIPTION="Command line interface to manage hierarchical todos"
HOMEPAGE="http://code.meskio.net/tudu/"
SRC_URI="http://code.meskio.net/${PN}/${P}.tar.gz"

LICENSE="GLP-3"
SLOT="0"
KEYWORDS="~amd64"
IUSE=""

DEPEND="sys-libs/ncurses[unicode]"
RDEPEND="${DEPEND}"

src_prepare()
{
	#--as-needed really break build
	LDFLAGS=${LDFLAGS/-Wl,--as-needed/}
}

src_compile()
{
	filter-flags -Wl,--as-needed
	filter-ldflags -Wl,--as-needed
	#strip-flags
	emake DESTDIR="/usr" ETC_DIR="/etc" || die " emake failed"
}

src_install()
{
	emake DESTDIR=${D} install || die "install failed"
	dodoc AUTHORS README ChangeLog CONTRIBUTORS COPYING || die
}