You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
120 lines
3.1 KiB
120 lines
3.1 KiB
12 years ago
|
# Copyright 1999-2012 Gentoo Foundation
|
||
|
# Distributed under the terms of the GNU General Public License v2
|
||
12 years ago
|
# $Header: /var/cvsroot/gentoo-x86/app-i18n/fcitx/fcitx-4.2.4.ebuild,v 1.1 2012/06/07 06:28:17 qiaomuf Exp $
|
||
12 years ago
|
|
||
|
EAPI="3"
|
||
|
|
||
12 years ago
|
inherit multilib cmake-utils eutils
|
||
12 years ago
|
|
||
|
DESCRIPTION="Free Chinese Input Toy for X. Another Chinese XIM Input Method"
|
||
|
HOMEPAGE="http://www.fcitx.org/"
|
||
12 years ago
|
SRC_URI="http://fcitx.googlecode.com/files/${P}.tar.xz
|
||
|
http://fcitx.googlecode.com/files/pinyin.tar.gz
|
||
|
table? ( http://fcitx.googlecode.com/files/table.tar.gz )"
|
||
12 years ago
|
|
||
|
LICENSE="GPL-2"
|
||
|
SLOT="0"
|
||
12 years ago
|
KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
|
||
12 years ago
|
IUSE="+cairo debug gir gtk gtk3 lua opencc +pango qt snooper static-libs +table test"
|
||
12 years ago
|
|
||
12 years ago
|
RDEPEND="
|
||
|
cairo? (
|
||
|
x11-libs/cairo[X]
|
||
|
pango? ( x11-libs/pango[X] )
|
||
|
!pango? ( media-libs/fontconfig )
|
||
|
)
|
||
|
gtk? (
|
||
|
x11-libs/gtk+:2
|
||
|
dev-libs/glib:2
|
||
|
dev-libs/dbus-glib
|
||
|
)
|
||
|
gtk3? (
|
||
|
x11-libs/gtk+:3
|
||
|
dev-libs/glib:2
|
||
|
dev-libs/dbus-glib
|
||
|
)
|
||
12 years ago
|
lua? ( dev-lang/lua )
|
||
12 years ago
|
opencc? ( app-i18n/opencc )
|
||
12 years ago
|
qt? (
|
||
|
x11-libs/qt-gui:4
|
||
|
x11-libs/qt-dbus:4
|
||
|
)
|
||
|
sys-apps/dbus
|
||
|
x11-libs/libX11"
|
||
12 years ago
|
DEPEND="${RDEPEND}
|
||
12 years ago
|
app-arch/xz-utils
|
||
|
dev-util/intltool
|
||
12 years ago
|
virtual/pkgconfig
|
||
12 years ago
|
x11-proto/xproto"
|
||
12 years ago
|
|
||
12 years ago
|
update_gtk_immodules() {
|
||
|
local GTK2_CONFDIR="/etc/gtk-2.0"
|
||
|
# bug #366889
|
||
|
if has_version '>=x11-libs/gtk+-2.22.1-r1:2' || has_multilib_profile ; then
|
||
|
GTK2_CONFDIR="${GTK2_CONFDIR}/$(get_abi_CHOST)"
|
||
|
fi
|
||
|
mkdir -p "${EPREFIX}${GTK2_CONFDIR}"
|
||
|
|
||
|
if [ -x "${EPREFIX}/usr/bin/gtk-query-immodules-2.0" ] ; then
|
||
|
"${EPREFIX}/usr/bin/gtk-query-immodules-2.0" > "${EPREFIX}${GTK2_CONFDIR}/gtk.immodules"
|
||
|
fi
|
||
|
}
|
||
|
|
||
|
update_gtk3_immodules() {
|
||
|
if [ -x "${EPREFIX}/usr/bin/gtk-query-immodules-3.0" ] ; then
|
||
|
"${EPREFIX}/usr/bin/gtk-query-immodules-3.0" --update-cache
|
||
|
fi
|
||
|
}
|
||
|
|
||
|
src_prepare() {
|
||
12 years ago
|
cp "${DISTDIR}/pinyin.tar.gz" "${S}/data" || die "pinyin.tar.gz is not found"
|
||
|
if use table ; then
|
||
|
cp "${DISTDIR}/table.tar.gz" "${S}/data/table" || die "table.tar.gz is not found"
|
||
|
fi
|
||
12 years ago
|
}
|
||
|
|
||
12 years ago
|
src_configure() {
|
||
|
local mycmakeargs="
|
||
12 years ago
|
-DLIB_INSTALL_DIR=/usr/$(get_libdir)
|
||
|
$(cmake-utils_use_enable cairo CARIO)
|
||
|
$(cmake-utils_use_enable debug DEBUG)
|
||
12 years ago
|
$(cmake-utils_use_enable gir GIR)
|
||
12 years ago
|
$(cmake-utils_use_enable gtk GTK2_IM_MODULE)
|
||
|
$(cmake-utils_use_enable gtk3 GTK3_IM_MODULE)
|
||
12 years ago
|
$(cmake-utils_use_enable lua LUA)
|
||
12 years ago
|
$(cmake-utils_use_enable opencc OPENCC)
|
||
|
$(cmake-utils_use_enable pango PANGO)
|
||
12 years ago
|
$(cmake-utils_use_enable qt QT_IM_MODULE)
|
||
12 years ago
|
$(cmake-utils_use_enable snooper SNOOPER)
|
||
12 years ago
|
$(cmake-utils_use_enable static-libs STATIC)
|
||
|
$(cmake-utils_use_enable table TABLE)
|
||
|
$(cmake-utils_use_enable test TEST)"
|
||
12 years ago
|
cmake-utils_src_configure
|
||
12 years ago
|
}
|
||
|
|
||
|
src_install() {
|
||
|
cmake-utils_src_install
|
||
|
|
||
|
dodoc AUTHORS ChangeLog README THANKS TODO || die
|
||
|
|
||
|
rm -rf "${ED}"/usr/share/fcitx/doc/ || die
|
||
|
dodoc doc/pinyin.txt doc/cjkvinput.txt || die
|
||
|
dohtml doc/wb_fh.htm || die
|
||
|
}
|
||
|
|
||
|
pkg_postinst() {
|
||
12 years ago
|
use gtk && update_gtk_immodules
|
||
|
use gtk3 && update_gtk3_immodules
|
||
12 years ago
|
elog
|
||
|
elog "You should export the following variables to use fcitx"
|
||
|
elog " export XMODIFIERS=\"@im=fcitx\""
|
||
|
elog " export XIM=fcitx"
|
||
|
elog " export XIM_PROGRAM=fcitx"
|
||
|
elog
|
||
12 years ago
|
}
|
||
|
|
||
|
pkg_postrm() {
|
||
|
use gtk && update_gtk_immodules
|
||
|
use gtk3 && update_gtk3_immodules
|
||
12 years ago
|
}
|