# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils DESCRIPTION="unac is a C library and a command line tool that removes accents from characters." HOMEPAGE="http://www.senga.org/" SRC_URI="http://www.senga.org/download/${PN}/${P}.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="iconv" # if iconv use flag not set then virtual/libiconv is required DEPEND="virtual/libc !iconv? ( virtual/libiconv )" src_unpack() { unpack ${A} cd "${S}" epatch "${FILESDIR}"/${P}-Makefile.in.patch } src_compile() { if use iconv; then einfo "libiconv should not be required since iconv use flag is present." else einfo "libiconv is required since iconv use flag is not set globally." fi econf || die "econf failed. Either set the iconv USE flag globally in /etc/make.conf and rebuild your libc/gcc system or emerge an iconv library (virtual/libiconv)." emake || die "emake failed" } src_install() { make DESTDIR="${D}" install || die "make install failed" # emake unaccent DESTDIR="${D}" install || die "make install failed" dodoc AUTHORS ChangeLog NEWS README THANKS # doman unaccent.1 } pkg_postinst() { einfo einfo "Examples of using unaccent from command line:" einfo "unaccent ISO-8859-1 été" einfo "echo 'été' | unaccent ISO-8859-1" einfo "unaccent ISO-8859-1 < myfile > myfile.unaccent" einfo einfo "man unaccent and man unac for more information." }