summaryrefslogtreecommitdiff
path: root/extra/gcin
diff options
context:
space:
mode:
Diffstat (limited to 'extra/gcin')
-rw-r--r--extra/gcin/PKGBUILD36
-rw-r--r--extra/gcin/fix_qt4_paths.patch31
-rw-r--r--extra/gcin/fix_x86_64_libdir.patch12
-rw-r--r--extra/gcin/install13
4 files changed, 92 insertions, 0 deletions
diff --git a/extra/gcin/PKGBUILD b/extra/gcin/PKGBUILD
new file mode 100644
index 000000000..42d692c41
--- /dev/null
+++ b/extra/gcin/PKGBUILD
@@ -0,0 +1,36 @@
+# $Id: PKGBUILD 116389 2011-03-23 02:55:06Z bisson $
+# Contributor: Andreas Radke <andyrtr@archlinux.org>
+# Contributor: damir <damir@archlinux.org>
+# Maintainer: Gaetan Bisson <bisson@archlinux.org>
+
+pkgname=gcin
+pkgver=1.6.0
+pkgrel=1
+pkgdesc='Input method server supporting various input methods'
+arch=('i686' 'x86_64')
+license=('LGPL')
+url='http://www.csie.nctu.edu.tw/~cp76/gcin/'
+depends=('gtk2' 'libxtst')
+makedepends=('anthy' 'qt')
+optdepends=('qt: support for qt4 input method')
+source=("${url}download/${pkgname}-${pkgver}.tar.bz2"
+ 'fix_x86_64_libdir.patch'
+ 'fix_qt4_paths.patch')
+sha1sums=('72d05f85e0cd410420eef539e034167172b8c34c'
+ 'e5c113e50420bf4750f5547641df6ec4b7e437e0'
+ '16d004424caed541d5baaa6874f708b1c138ab08')
+
+install=install
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ patch -p1 -i "${srcdir}/fix_x86_64_libdir.patch"
+ patch -p1 -i "${srcdir}/fix_qt4_paths.patch"
+ ./configure --prefix=/usr --use_i18n=Y
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/extra/gcin/fix_qt4_paths.patch b/extra/gcin/fix_qt4_paths.patch
new file mode 100644
index 000000000..b029c17e5
--- /dev/null
+++ b/extra/gcin/fix_qt4_paths.patch
@@ -0,0 +1,31 @@
+diff -aur old/configure new/configure
+--- old/configure 2011-02-10 20:34:48.153348697 +0100
++++ new/configure 2011-02-10 20:35:09.623348816 +0100
+@@ -174,7 +174,7 @@
+
+
+ QT4_IM='N'
+-QT4_IM_DIR=/usr/$LIB/qt4/plugins/inputmethods
++QT4_IM_DIR=/usr/$LIB/qt/plugins/inputmethods
+ echo "testing if you have qt4 support"
+ if [ -d $QT4_IM_DIR ]; then
+ QT4_IM='Y'
+diff -aur old/qt4-im/Makefile new/qt4-im/Makefile
+--- old/qt4-im/Makefile 2011-02-10 20:34:23.236682152 +0100
++++ new/qt4-im/Makefile 2011-02-10 20:35:09.623348816 +0100
+@@ -1,5 +1,5 @@
+ include ../config.mak
+-QT=qt4
++QT=qt
+ QTIM=$(QT)/plugins/inputmethods
+ IMMODULES=$(libdir)/$(QTIM)
+
+@@ -15,7 +15,7 @@
+ $(CXX) -E $(CFLAGS) $(INCS) $< > $@
+
+ moc_gcin-qt.cpp: gcin-qt.h
+- /usr/lib/$(QT)/bin/moc $< -o moc_gcin-qt.cpp
++ /usr/bin/moc $< -o moc_gcin-qt.cpp
+
+ im-gcin.so: $(OBJS)
+ export LD_RUN_PATH=$(gcinlibdir) ;\
diff --git a/extra/gcin/fix_x86_64_libdir.patch b/extra/gcin/fix_x86_64_libdir.patch
new file mode 100644
index 000000000..5f4df6a9e
--- /dev/null
+++ b/extra/gcin/fix_x86_64_libdir.patch
@@ -0,0 +1,12 @@
+diff -aur old/configure new/configure
+--- old/configure 2011-02-10 20:34:20.943348819 +0100
++++ new/configure 2011-02-10 20:34:48.153348697 +0100
+@@ -151,7 +151,7 @@
+
+ LIB='lib'
+ if [ -d /lib64 ]; then
+-LIB='lib64'
++LIB='lib'
+ fi
+
+ QT_IM='N'
diff --git a/extra/gcin/install b/extra/gcin/install
new file mode 100644
index 000000000..1097ea400
--- /dev/null
+++ b/extra/gcin/install
@@ -0,0 +1,13 @@
+post_install() {
+ echo -n "updating gtk.immodules... "
+ /usr/bin/gtk-query-immodules-2.0 > /etc/gtk-2.0/gtk.immodules
+ echo "done."
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}