summaryrefslogtreecommitdiff
blob: a68b3af7cad674d298c9bcb488353e476db61975 (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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI=4

inherit eutils autotools

DESCRIPTION="Multilingual Library for Unix/Linux"
HOMEPAGE="https://savannah.nongnu.org/projects/m17n"
SRC_URI="http://www.m17n.org/m17n-lib-download/${P}.tar.gz"

LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~sparc ~x86"
IUSE="anthy athena anthy bidi fontconfig gd spell libotf libxml2 X xft"

RDEPEND="
	anthy? ( app-i18n/anthy )
	spell? ( app-text/aspell )
	libxml2? ( dev-libs/libxml2 )
	X? (
		athena? ( x11-libs/libXaw )
		bidi? ( dev-libs/fribidi )
		fontconfig? ( media-libs/fontconfig )
		gd? ( media-libs/gd[png] )
		libotf? ( >=dev-libs/libotf-0.9.4 )
		xft? (
			>=media-libs/freetype-2.1
			x11-libs/libXft )
		x11-libs/libX11
	)
	~dev-db/m17n-db-${PV}"
# athena? ( x11-libs/libXaw )
# athena shoud be enabled to build m17n-edit properly when X is enabled.

# linguas_th? ( || ( app-i18n/libthai app-i18n/wordcut ) )
#

DEPEND="${RDEPEND}
	virtual/pkgconfig"

src_prepare() {
	epatch \
		"${FILESDIR}"/${PN}-1.6.2-gui.patch \
		"${FILESDIR}"/${PN}-1.6.3-parallel-make.patch \
		"${FILESDIR}"/${PN}-1.6.3-configure.patch \
		"${FILESDIR}"/${PN}-1.6.3-ispell.patch

	eautoreconf
}

src_configure() {
	local myconf="$(use_with anthy) $(use_with spell ispell) $(use_with libxml2)"

	if use X; then
		myconf+=" --with-x --enable-gui $(use_with athena) $(use_with bidi fribidi)
$(use_with fontconfig) $(use_with xft freetype) $(use_with gd) $(use_with libotf)
$(use_with xft)"
	else
		myconf+=" --without-x --disable-gui --without-athena --without-fribidi
--without-fontconfig --without-freetype --without-gd --without-libotf
--without-xft"
	fi

	econf ${myconf} || die
}

src_install() {
	# bug #363239
	emake -j1 DESTDIR="${D}" install || die

	dodoc AUTHORS ChangeLog NEWS README TODO
}