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

EAPI=4

DESCRIPTION="Provides conversion in both directions between UTF-8 Unicode and many 7-bit ASCII equivalents"
HOMEPAGE="http://billposer.org/Software/uni2ascii.html"
SRC_URI="http://billposer.org/Software/Downloads/${P}.tar.bz2"

LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64"
IUSE="-tk"

DEPEND=""
RDEPEND="tk? (
    dev-lang/tcl
    dev-lang/tk
    dev-tcltk/tablelist
)"

src_install() {
    emake DESTDIR="${D}" install
    if ! use tk; then
        rm -f "${D}/usr/bin/u2a"
    fi
}