summaryrefslogtreecommitdiff
blob: 65f917f186b8f380dcf451b612b7c3bd9bc6b388 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI="5"

inherit autotools eutils

DESCRIPTION="Library and command-line tool for removing accents from characters"
HOMEPAGE="http://www.nongnu.org/unac/"
SRC_URI="mirror://debian/pool/main/u/unac/${P/-/_}.orig.tar.gz"

LICENSE="GPL-2+"
SLOT="0"
KEYWORDS="amd64 x86"
IUSE="static-libs test"

RDEPEND="virtual/libiconv"
DEPEND="${RDEPEND}
	test? ( dev-lang/perl )"

S="${WORKDIR}/${P}.orig"

src_prepare() {
	epatch "${FILESDIR}/${P}-debian-gcc-4.4-bug-556379.patch"
	epatch "${FILESDIR}/${P}-automake-1.13.1.patch"
	# otherwise automake will fail
	touch config.rpath
	eautoreconf
}

src_configure() {
	econf $(use_enable static-libs static)
}

src_install() {
	DOCS="AUTHORS ChangeLog NEWS README THANKS"
	default
	prune_libtool_files
}

pkg_postinst() {
	einfo "Examples of using unaccent from the command line:"
	einfo "unaccent utf8 été"
	einfo "echo -e '\\\\0303\\\\0251t\\\\0303\\\\0251' | unaccent utf8"
	einfo "unaccent ISO-8859-1 < myfile > myfile.unaccent"
	einfo
	einfo "See man unaccent and man unac for more information."
}