summaryrefslogtreecommitdiff
blob: 673266f6c3f0446d83eb5d8df57dcd3f7d85eff2 (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
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-i18n/uim-qt/uim-qt-0.1.7.ebuild,v 1.3 2004/10/06 07:28:18 usata Exp $

inherit eutils

DESCRIPTION="Qt immodules input method framework plugin for UIM"
HOMEPAGE="http://freedesktop.org/Software/UimQt"
SRC_URI="http://freedesktop.org/~kzk/${PN}/${P}.tar.gz"

LICENSE="GPL-2 | BSD"
SLOT="0"
KEYWORDS="~x86"
IUSE=""

DEPEND=">=app-i18n/uim-0.4.3
	|| ( =x11-libs/qt-3.3.3 =x11-libs/qt-3.3.2 )"

S="${WORKDIR}/${PN}"

pkg_setup() {
	if [ ! -e /usr/qt/3/plugins/inputmethods/libqimsw-none.so ] ; then
		die "You need to rebuild qt-3.3.3 or qt-3.3.2 with immqt-bc(recommended) or immqt USE flag enabled."
	fi
}

src_unpack() {
	unpack ${A}
	cd ${S}
	epatch ${FILESDIR}/${P}-thread.diff
}

src_compile() {
	sed -e 's,${QTDIR},${D}${QTDIR},g' install > ${T}/install

	qmake || die "qmake failed"
	emake -j1 || die "make failed."
}

src_install() {
	sh ${T}/install || die "install failed"

	dodoc COPYING ChangeLog README* TODO THANKS
}

src_test() {
	#cd edittest
	#qmake -project || die "qmake -project failed"
	#qmake || die "qmake failed"
	#emake || die "emake failed"
	#
	# This programme needs human interaction to test. (i.e. You need to
	# manually check whether quiminputcontextplugin is working or not
	# with GUI interface)
	#./edittest
	return
}

pkg_postinst() {
	einfo
	einfo "After you emerged ${PN}, use right click to switch immodules for Qt."
	einfo "If you would like to use ${PN} as default instead of XIM, set QT_IM_MODULE to uim-*."
	einfo "e.g.)"
	einfo "	% export QT_IM_MODULE=uim-anthy"
	einfo
	ewarn
	ewarn "qtconfig is no longer used for selecting input methods."
	ewarn
}