aboutsummaryrefslogtreecommitdiff
path: root/chinese/oxim
diff options
context:
space:
mode:
Diffstat (limited to 'chinese/oxim')
-rw-r--r--chinese/oxim/Makefile72
-rw-r--r--chinese/oxim/distinfo3
-rw-r--r--chinese/oxim/files/patch-configure21
-rw-r--r--chinese/oxim/files/patch-gtk-immodule-gtkintl.h11
-rw-r--r--chinese/oxim/pkg-descr8
-rw-r--r--chinese/oxim/pkg-message16
-rw-r--r--chinese/oxim/pkg-plist31
7 files changed, 162 insertions, 0 deletions
diff --git a/chinese/oxim/Makefile b/chinese/oxim/Makefile
new file mode 100644
index 000000000000..c4bd4a9a7326
--- /dev/null
+++ b/chinese/oxim/Makefile
@@ -0,0 +1,72 @@
+# New ports collection makefile for: oxim
+# Date created: Mar 19 2006
+# Whom: Rong-En Fan <rafan@infor.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= oxim
+PORTVERSION= 1.0.1
+CATEGORIES= chinese textproc
+MASTER_SITES= ftp://140.111.128.66/odp/OXIM/Source/
+
+MAINTAINER= rafan@infor.org
+COMMENT= Open X Input Method server
+
+# make sure we have the required libchewing
+LIB_DEPENDS= Xft.2:${PORTSDIR}/x11-fonts/libXft
+BUILD_DEPENDS= zh-libchewing>=0.2.7:${PORTSDIR}/chinese/libchewing
+RUN_DEPENDS= zh-libchewing>=0.2.7:${PORTSDIR}/chinese/libchewing \
+ zh-fireflyttf>=0:${PORTSDIR}/chinese/fireflyttf
+
+OPTIONS= GTK2 "Enable GTK2 input method module" On
+
+USE_ICONV= yes
+USE_X_PREFIX= yes
+USE_GNOME=
+
+GNU_CONFIGURE= yes
+INSTALLS_SHLIB= yes
+CPPFLAGS+= -I${LOCALBASE}/include -I${X11BASE}/include
+LDFLAGS+= -L${LOCALBASE}/lib -liconv
+CONFIGURE_ENV+= CONFIG_SHELL=${SH} \
+ CHEWING_CFLAGS=-I${LOCALBASE}/include \
+ CPPFLAGS="${CPPFLAGS}" \
+ LDFLAGS="${LDFLAGS}"
+CONFIGURE_ARGS+=--disable-bimsphone-module \
+ --disable-static \
+ --with-conf-dir=${PREFIX}/etc/${PORTNAME}
+
+.include <bsd.port.pre.mk>
+
+.if defined(WITHOUT_GTK2)
+CONFIGURE_ARGS+= --disable-gtk-immodule
+PLIST_SUB+= GTK2="@comment "
+.else
+USE_GNOME+= gtk20
+CONFIGURE_ARGS+= --enable-gtk-immodule
+PLIST_SUB+= GTK2=""
+.endif
+
+# TODO WITHOUT_NLS knob
+#.if !defined(WITHOUT_NLS)
+USE_GETTEXT= yes
+PLIST_SUB+= NLS=""
+LDFLAGS+= -lintl
+CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
+#.else
+#CONFIGURE_ARGS+=--disable-nls
+#PLIST_SUB+= NLS="@comment "
+#.endif
+
+post-patch:
+ ${REINPLACE_CMD} 's|%%PREFIX%%|${PREFIX}|' \
+ ${WRKSRC}/src/gtk-immodule/gtkintl.h
+post-install:
+.if !defined(WITHOUT_GTK2)
+ @gtk-query-immodules-2.0 > ${PREFIX}/etc/gtk-2.0/gtk.immodules
+.endif
+ @${CAT} ${PKGMESSAGE}
+ @${ECHO} To display this message again, type ${PKG_INFO} -D ${PKGNAME}
+
+.include <bsd.port.post.mk>
diff --git a/chinese/oxim/distinfo b/chinese/oxim/distinfo
new file mode 100644
index 000000000000..b8c995e62906
--- /dev/null
+++ b/chinese/oxim/distinfo
@@ -0,0 +1,3 @@
+MD5 (oxim-1.0.1.tar.gz) = c884153c122e4110a85184141de53aca
+SHA256 (oxim-1.0.1.tar.gz) = 2099c98f8b0aa9830b92f0dff42fc461cce92ce48d43d81b4d8036bdb4d019a2
+SIZE (oxim-1.0.1.tar.gz) = 3023499
diff --git a/chinese/oxim/files/patch-configure b/chinese/oxim/files/patch-configure
new file mode 100644
index 000000000000..67dc6be897d0
--- /dev/null
+++ b/chinese/oxim/files/patch-configure
@@ -0,0 +1,21 @@
+--- configure.orig Sat Mar 18 10:57:51 2006
++++ configure Sat Mar 18 11:02:32 2006
+@@ -29642,6 +29642,7 @@
+ test $found = y && break
+ done
+ fi
++if test "$enable_bimsphone_module" = "yes" ; then
+ if test $found = n; then
+ echo "$as_me:$LINENO: result: You need Berkeley DB to compile bimsphone module." >&5
+ echo "${ECHO_T}You need Berkeley DB to compile bimsphone module." >&6
+@@ -29652,6 +29653,10 @@
+ DB_INC=${db_include}
+
+ DB_LIBS=${db_lib}
++else
++DB_INC=
++DB_LIBS=
++fi
+
+
+ #-----------------------------------------------------------------------
diff --git a/chinese/oxim/files/patch-gtk-immodule-gtkintl.h b/chinese/oxim/files/patch-gtk-immodule-gtkintl.h
new file mode 100644
index 000000000000..da511fe67491
--- /dev/null
+++ b/chinese/oxim/files/patch-gtk-immodule-gtkintl.h
@@ -0,0 +1,11 @@
+--- src/gtk-immodule/gtkintl.h.orig Thu Mar 23 08:43:55 2006
++++ src/gtk-immodule/gtkintl.h Thu Mar 23 08:46:33 2006
+@@ -1,7 +1,7 @@
+ #ifndef __GTKINTL_H__
+ #define __GTKINTL_H__
+ #define ENABLE_NLS 1
+-#define GTK_LOCALEDIR "/usr/share/locale"
++#define GTK_LOCALEDIR "%%PREFIX%%/share/locale"
+ #define GETTEXT_PACKAGE "gtk20"
+
+ #ifdef ENABLE_NLS
diff --git a/chinese/oxim/pkg-descr b/chinese/oxim/pkg-descr
new file mode 100644
index 000000000000..e77ced63197b
--- /dev/null
+++ b/chinese/oxim/pkg-descr
@@ -0,0 +1,8 @@
+oxim is a common input method server, which focuses mainly on Chinese.
+It is mainly developed by Firefly <firefly@ossii.com.tw>, and is a
+fork from xcin 2.5.3 (pre-release version). In addition to the
+original Root and OverTheSpot input style inherited from xcin, it
+also supports OnTheSpot and OnTheSpotQT. You can easily use oxim in
+GTK and QT based software.
+
+WWW: http://opendesktop.org.tw/
diff --git a/chinese/oxim/pkg-message b/chinese/oxim/pkg-message
new file mode 100644
index 000000000000..453a361cc76c
--- /dev/null
+++ b/chinese/oxim/pkg-message
@@ -0,0 +1,16 @@
+--------------------------------------------------------------------
+Remember to set environment variables:
+
+ (csh/tcsh) (sh/bash)
+ setenv XMODIFIERS @im=oxim export XMODIFIERS='@im=oxim'
+ setenv GTK_IM_MODULE oxim export GTK_IM_MODULE=oxim
+ setenv QT_IM_MODULE xim export QT_IM_MODULE=xim
+
+If you have disabled GTK2 support, you may want to use ``xim'' for
+GTK_IM_MODULE (GTK2 support is enabled by default).
+
+Finally, to start the oxim input method daemon, use command:
+
+ exec oxim &
+
+--------------------------------------------------------------------
diff --git a/chinese/oxim/pkg-plist b/chinese/oxim/pkg-plist
new file mode 100644
index 000000000000..0067ca38939f
--- /dev/null
+++ b/chinese/oxim/pkg-plist
@@ -0,0 +1,31 @@
+bin/oxim
+bin/oxim2tab
+etc/oxim/locale.list
+etc/oxim/oxim.conf
+lib/liboxim.la
+lib/liboxim.so
+lib/liboxim.so.0
+%%GTK2%%lib/gtk-2.0/immodules/gtk-im-oxim.la
+%%GTK2%%lib/gtk-2.0/immodules/gtk-im-oxim.so
+lib/oxim/modules/chewing.la
+lib/oxim/modules/chewing.so
+lib/oxim/modules/gen-inp.la
+lib/oxim/modules/gen-inp.so
+lib/oxim/modules/unicode.la
+lib/oxim/modules/unicode.so
+lib/oxim/tables/array30.tab
+lib/oxim/tables/cns11643.tab
+lib/oxim/tables/cnscj.tab
+lib/oxim/tables/cnsimplex.tab
+lib/oxim/tables/cnsphone.tab
+lib/oxim/tables/default.phr
+lib/oxim/tables/ez.tab
+lib/oxim/tables/sys.tab
+@dirrm etc/oxim
+@dirrm lib/oxim/tables
+@dirrm lib/oxim/modules
+@dirrm lib/oxim
+%%GTK2%%@dirrmtry lib/gtk-2.0/immodules
+%%GTK2%%@dirrmtry lib/gtk-2.0
+%%GTK2%%@exec gtk-query-immodules-2.0 > %D/etc/gtk-2.0/gtk.immodules
+%%GTK2%%@unexec gtk-query-immodules-2.0 > %D/etc/gtk-2.0/gtk.immodules