blob: ead597c88d7ac5ff9f49c24a9981616ca584c3a7 (
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
|
# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-i18n/kinput2/kinput2-3.1_beta4-r2.ebuild,v 1.5 2002/11/06 16:06:03 vapier Exp $
MY_P="kinput2-v3.1-beta4.tar.gz"
DESCRIPTION="A Japanese input server which supports the XIM protocol"
SRC_URI="ftp://ftp.sra.co.jp/pub/x11/kinput2/${MY_P}.tar.gz"
HOMEPAGE="http://www.nec.co.jp/canna/"
SLOT="0"
LICENSE="as-is"
KEYWORDS="x86"
IUSE="canna freewnn"
DEPEND="virtual/glibc
canna? >=app-i18n/canna-3.5_beta2-r1
freewnn? >=app-i18n/freewnn-1.1.1_alpha19 : >=app-i18n/canna-3.5_beta2-r1"
S="${WORKDIR}/${MY_P}"
src_unpack() {
# unpack the archive
unpack ${A}
# patch Kinput2.conf to ensure that files are installed into image dir
cd ${S}
patch -p0 < ${FILESDIR}/${P}/gentoo.diff || die
# hack to set define UseCanna, define UseWnn or both
cp Kinput2.conf Kinput2.tmp
use canna && sed -e "s:\/\* \#define UseCanna \*\/:\#define UseCanna:" Kinput2.tmp > Kinput2.conf
cp Kinput2.conf Kinput2.tmp
use freewnn && sed -e "s:\/\* \#define UseWnn \*\/:\#define UseWnn:" Kinput2.tmp > Kinput2.conf
# default to UseCanna if we don't have freewnn in useflags
cp Kinput2.conf Kinput2.tmp
use freewnn || sed -e "s:\/\* \#define UseCanna \*\/:\#define UseCanna:" Kinput2.tmp > Kinput2.conf || die
}
src_compile() {
# create a Makefile from Kinput2.conf
xmkmf || die "xmkmf failed"
make Makefiles || die "Makefile creation failed"
# build Kinput2
make depend || die "make depend failed"
make || die "make failed"
}
src_install() {
# install libs, executables, dictionaries
make DESTDIR=${D} install || die "installation failed"
# install docs
dodoc README NEWS
}
|