summaryrefslogtreecommitdiff
blob: 03881dcac1262f895dd07db4535e3c392f35a216 (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
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-i18n/xcin/xcin-2.5.3_pre3-r2.ebuild,v 1.3 2008/05/04 17:49:08 nixnut Exp $

inherit multilib eutils autotools libtool

MY_P=${PN}_2.5.2.99.pre2+cvs20030224

DESCRIPTION="Chinese X Input Method"
HOMEPAGE="http://cle.linux.org.tw/xcin/"
SRC_URI="mirror://debian/pool/main/x/${PN}/${MY_P}.orig.tar.gz
	mirror://debian/pool/main/x/${PN}/${MY_P}-1.4.diff.gz"

LICENSE="XCIN GPL-2"
SLOT="0"
KEYWORDS="ppc x86"
IUSE="debug nls unicode"

RDEPEND=">=sys-libs/db-4.5
	>=app-i18n/libtabe-0.2.6
	unicode? ( media-fonts/hkscs-ming
		media-fonts/arphicfonts )
	dev-libs/libchewing
	x11-libs/libX11"
DEPEND="${RDEPEND}
	nls? ( sys-devel/gettext )"

S=${WORKDIR}/${MY_P/_/-}

src_unpack() {
	unpack ${A}
	cd "${S}"
	epatch "${WORKDIR}"/${MY_P}-1.4.diff
	rm -f configure
	cd script
	elibtoolize
	eautoreconf
	mv configure ../
	cd ..
}

src_compile() {
	myconf="--with-xcin-rcdir=/etc
		--with-xcin-dir=/usr/$(get_libdir)/xcin25
		--with-db-lib=/usr/$(get_libdir)
		--with-tabe-inc=/usr/include/tabe
		--with-tabe-lib=/usr/$(get_libdir)
		$(use_enable debug)"

	econf ${myconf}
	emake -j1 || die "emake failed."
}

src_install() {
	emake \
		prefix="${D}/usr" \
		program_prefix="${D}" \
		install || die

	for docdir in doc doc/En doc/En/internal doc/history doc/internal doc/modules; do
		docinto ${docdir#doc/}
		if use unicode; then
			for doc in $(find ${docdir} -maxdepth '1' -type 'f'); do
				iconv -f BIG5 -t UTF-8 --output=${doc}.UTF-8 ${doc}
				mv ${doc}.UTF-8 ${doc}
			done
		fi
		dodoc ${docdir}/*
	done
}