summaryrefslogtreecommitdiff
path: root/extra/fcitx
diff options
context:
space:
mode:
Diffstat (limited to 'extra/fcitx')
-rw-r--r--extra/fcitx/PKGBUILD65
-rw-r--r--extra/fcitx/fcitx-gtk2.install11
-rw-r--r--extra/fcitx/fcitx-gtk3.install11
-rw-r--r--extra/fcitx/fcitx.install12
4 files changed, 85 insertions, 14 deletions
diff --git a/extra/fcitx/PKGBUILD b/extra/fcitx/PKGBUILD
index 2b34f225f..68629172d 100644
--- a/extra/fcitx/PKGBUILD
+++ b/extra/fcitx/PKGBUILD
@@ -1,27 +1,64 @@
-# $Id: PKGBUILD 103288 2010-12-17 09:19:33Z andrea $
+# $Id: PKGBUILD 136943 2011-09-03 10:34:07Z andrea $
# Maintainer: Andrea Scarpino <andrea@archlinux.org>
-# Contributor: damir <damir@archlinux.org>
+# Contributor: csslayer <wengxt AT gmail com>
-pkgname=fcitx
-pkgver=4.0.1
+pkgbase=fcitx
+pkgname=('fcitx' 'fcitx-gtk2' 'fcitx-gtk3' 'fcitx-qt')
+pkgver=4.1.0
pkgrel=1
-pkgdesc="Free Chinese Input Toy of X, a collection of Simplified Chinese input methods for Linux"
arch=('i686' 'x86_64')
url="http://code.google.com/p/fcitx/"
license=('GPL')
-depends=('dbus-core' 'pango')
-makedepends=('intltool')
-options=('!libtool')
-source=("http://fcitx.googlecode.com/files/${pkgname}-${pkgver}.tar.gz")
-sha1sums=('22d48cd65ae6ee36e49c0ed07761a3cb2f7e2669')
+makedepends=('cmake' 'intltool' 'doxygen' 'gtk2' 'gtk3' 'qt' 'dbus-glib' 'icu')
+source=("http://fcitx.googlecode.com/files/${pkgbase}-${pkgver}.tar.bz2")
+sha1sums=('d6aa9ce3344582ba92e850940c20dd28bf98e264')
build() {
- cd "${srcdir}/${pkgname}-${pkgver}"
- ./configure --prefix=/usr
+ cd "${srcdir}"
+ mkdir build
+ cd build
+ cmake ../${pkgbase}-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DENABLE_OPENCC=OFF \
+ -DENABLE_GTK3_IM_MODULE=ON \
+ -DENABLE_QT_IM_MODULE=ON
make
}
-package() {
- cd "${srcdir}/${pkgname}-${pkgver}"
+package_fcitx() {
+ pkgdesc="Free Chinese Input Toy of X - Input Method Server for X window system"
+ depends=('dbus-core' 'pango')
+ install=fcitx.install
+
+ cd "${srcdir}"/build
+ make DESTDIR="${pkgdir}" install
+
+ rm -r "${pkgdir}"/usr/lib/{gtk-2.0,gtk-3.0,qt}
+}
+
+package_fcitx-gtk2() {
+ pkgdesc='GTK2 IM Module for fcitx'
+ depends=('gtk2' 'dbus-glib' 'fcitx')
+ install=fcitx-gtk2.install
+
+ cd "${srcdir}"/build/src/frontend/gtk2
+ make DESTDIR="${pkgdir}" install
+}
+
+package_fcitx-gtk3() {
+ pkgdesc='GTK3 IM Module for fcitx'
+ depends=('gtk3' 'dbus-glib' 'fcitx')
+ install=fcitx-gtk3.install
+
+ cd "${srcdir}"/build/src/frontend/gtk3
+ make DESTDIR="${pkgdir}" install
+}
+
+package_fcitx-qt() {
+ pkgdesc='QT IM Module for fcitx'
+ depends=('qt' 'icu' 'fcitx')
+
+ cd "${srcdir}"/build/src/frontend/qt
make DESTDIR="${pkgdir}" install
}
diff --git a/extra/fcitx/fcitx-gtk2.install b/extra/fcitx/fcitx-gtk2.install
new file mode 100644
index 000000000..7503c05eb
--- /dev/null
+++ b/extra/fcitx/fcitx-gtk2.install
@@ -0,0 +1,11 @@
+post_install() {
+ usr/bin/gtk-query-immodules-2.0 > etc/gtk-2.0/gtk.immodules
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/extra/fcitx/fcitx-gtk3.install b/extra/fcitx/fcitx-gtk3.install
new file mode 100644
index 000000000..b44958797
--- /dev/null
+++ b/extra/fcitx/fcitx-gtk3.install
@@ -0,0 +1,11 @@
+post_install() {
+ usr/bin/gtk-query-immodules-3.0 --update-cache
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/extra/fcitx/fcitx.install b/extra/fcitx/fcitx.install
new file mode 100644
index 000000000..316bccffe
--- /dev/null
+++ b/extra/fcitx/fcitx.install
@@ -0,0 +1,12 @@
+post_install() {
+ [[ -x usr/bin/gtk-update-icon-cache ]] && gtk-update-icon-cache -q -t -f usr/share/icons/hicolor || true
+ [[ -x usr/bin/update-desktop-database ]] && update-desktop-database -q || true
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}