blob: 337723774072bf1a80f0804f4e7493246250fab3 (
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
|
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-i18n/xsim/xsim-0.3.9.4-r1.ebuild,v 1.8 2004/06/28 02:07:45 vapier Exp $
inherit eutils
use kde && inherit kde
DESCRIPTION="A simple and fast GB and BIG5 Chinese XIM server"
HOMEPAGE="http://developer.berlios.de/projects/xsim/"
SRC_URI="http://download.berlios.de/xsim/${P}.tar.gz"
LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS="x86"
IUSE="kde"
DEPEND="virtual/libc
=sys-libs/db-3*
>=sys-apps/sed-4
kde? ( >=kde-base/kdelibs-3 )"
src_unpack() {
unpack ${A}
epatch ${FILESDIR}/${P}-db3.patch
cd ${S}
einfo "Patching ./configure to respect CFLAGS .."
sed -i -e "s/\(CFLAGS.*\)-O2/\1${CFLAGS}/" configure
}
src_compile() {
local myconf
myconf="${myconf} --with-bdb-includes=/usr/include/db3 --with-bdb-libs=/usr/lib"
use kde \
&& myconf="${myconf} --with-kde3=${KDEDIR} --with-qt3=${QTDIR} --enable-status-kde3"
econf ${myconf} || die "configure failed"
emake xsim_etcp=/etc || die "make failed"
}
src_install() {
einstall xsim_datp=${D}/usr/lib/xsim/dat \
xsim_libp=${D}/usr/lib/xsim/plugins \
xsim_binp=${D}/usr/bin \
xsim_etcp=${D}/etc \
install-data install || die "install failed"
sed -i -e "s#DICT_LOCAL\(.*\)/usr/dat#DICT_LOCAL\1/usr/lib/xsim/dat#" \
-e "s#PLUGIN_LOCAL\(.*\)/usr/plugins#PLUGIN_LOCAL\1/usr/lib/xsim/plugins#" \
${D}/etc/xsimrc
dodoc ChangeLog COPYING INSTALL README* TODO
}
pkg_postinst() {
einfo "XSIM needs write access to /usr/lib/xsim/dat/chardb, so if you"
einfo "not running it as root, you need to do the following:"
echo
einfo " cp -r /usr/lib/xsim/dat \${HOME}/.xsim"
einfo " sed -i \"s#DICT_LOCAL.*#DICT_LOCAL \${HOME}/.xsim#\" > \${HOME}/.xsim/xsimrc"
echo
}
|