summaryrefslogtreecommitdiff
path: root/vietnamese
diff options
context:
space:
mode:
authorThierry Thomas <thierry@FreeBSD.org>2004-12-29 18:08:46 +0000
committerThierry Thomas <thierry@FreeBSD.org>2004-12-29 18:08:46 +0000
commite4b2658c1c053e4d8b77376ccb3a0c5f17821adb (patch)
tree9b2d2af0e86d90457c0534e68a5a4ec34e57408d /vietnamese
parentAdd m odified date to my last commit. (diff)
Add xvnkb 0.2.8, a Vietnamese input method for X-Window.
PR: 65207 Submitted by: Nguyen Tam Chinh.
Notes
Notes: svn path=/head/; revision=125451
Diffstat (limited to 'vietnamese')
-rw-r--r--vietnamese/Makefile1
-rw-r--r--vietnamese/xvnkb/Makefile49
-rw-r--r--vietnamese/xvnkb/distinfo2
-rw-r--r--vietnamese/xvnkb/files/patch-Makefile.common12
-rw-r--r--vietnamese/xvnkb/files/patch-configure11
-rw-r--r--vietnamese/xvnkb/files/patch-main.c38
-rw-r--r--vietnamese/xvnkb/files/patch-scripts-new_install.sh128
-rw-r--r--vietnamese/xvnkb/files/xvnkb.148
-rw-r--r--vietnamese/xvnkb/pkg-descr5
-rw-r--r--vietnamese/xvnkb/pkg-message12
10 files changed, 306 insertions, 0 deletions
diff --git a/vietnamese/Makefile b/vietnamese/Makefile
index 76b345d3b2fd..4ea78f5ae7e8 100644
--- a/vietnamese/Makefile
+++ b/vietnamese/Makefile
@@ -1,5 +1,6 @@
# $FreeBSD$
#
+ SUBDIR += xvnkb
COMMENT = Vietnamese support
diff --git a/vietnamese/xvnkb/Makefile b/vietnamese/xvnkb/Makefile
new file mode 100644
index 000000000000..5783134e7cd4
--- /dev/null
+++ b/vietnamese/xvnkb/Makefile
@@ -0,0 +1,49 @@
+# ex:ts=8
+# Ports collection makefile for: xvnkb
+# Date created: Mon Apr 05, 2004
+# Whom: Nguyen Tam Chinh (chinhngt@sectorb.msk.ru)
+#
+# $FreeBSD$
+#
+
+PORTNAME= xvnkb
+PORTVERSION= 0.2.8
+CATEGORIES= vietnamese
+MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
+MASTER_SITE_SUBDIR= ${PORTNAME}
+
+MAINTAINER= chinhngt@sectorb.msk.ru
+COMMENT= A Vietnamese input method for X-Window
+
+USE_BZIP2= yes
+USE_XLIB= yes
+USE_GNOME= gtk20
+
+GNU_CONFIGURE= yes
+CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
+INSTALLS_SHLIB= yes
+
+.if defined(WITHOUT_XFT)
+CONFIGURE_ARGS+= --no-xft
+.else
+LIB_DEPENDS+= Xft.2:${PORTSDIR}/x11-fonts/libXft
+.endif
+
+WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
+
+PLIST_FILES= bin/xvnkb lib/libxvnkb.so lib/libxvnkb.so.0 lib/xvnkb.so.0.2.8
+
+MAN1= xvnkb.1
+
+.include <bsd.port.pre.mk>
+
+.if ${OSVERSION} < 502110
+RUN_DEPENDS+= ${LOCALBASE}/share/locale/la_LN.UTF-8/LC_CTYPE:${PORTSDIR}/misc/utf8locale
+.endif
+
+post-install:
+ @${STRIP_CMD} ${PREFIX}/bin/xvnkb
+ ${INSTALL_MAN} ${FILESDIR}/xvnkb.1 ${MANPREFIX}/man/man1
+ @${CAT} ${PKGMESSAGE}
+
+.include <bsd.port.post.mk>
diff --git a/vietnamese/xvnkb/distinfo b/vietnamese/xvnkb/distinfo
new file mode 100644
index 000000000000..f80e312f3d15
--- /dev/null
+++ b/vietnamese/xvnkb/distinfo
@@ -0,0 +1,2 @@
+MD5 (xvnkb-0.2.8.tar.bz2) = 9ce3d7f9c25a33d574a280a5946ac27c
+SIZE (xvnkb-0.2.8.tar.bz2) = 76798
diff --git a/vietnamese/xvnkb/files/patch-Makefile.common b/vietnamese/xvnkb/files/patch-Makefile.common
new file mode 100644
index 000000000000..8f458ca38dad
--- /dev/null
+++ b/vietnamese/xvnkb/files/patch-Makefile.common
@@ -0,0 +1,12 @@
+--- Makefile.common.orig Fri Jan 16 23:19:17 2004
++++ Makefile.common Wed Dec 29 00:06:37 2004
+@@ -44,7 +44,8 @@
+ rm -f .*.sw*
+
+ install: all
+- @./xvnkb_install
++# @./xvnkb_install
++ sh xvnkb_install
+
+ uninstall:
+ @./xvnkb_uninstall
diff --git a/vietnamese/xvnkb/files/patch-configure b/vietnamese/xvnkb/files/patch-configure
new file mode 100644
index 000000000000..7decdda243d3
--- /dev/null
+++ b/vietnamese/xvnkb/files/patch-configure
@@ -0,0 +1,11 @@
+--- configure.orig Fri Jan 16 23:19:17 2004
++++ configure Wed Dec 29 00:11:23 2004
+@@ -228,7 +228,7 @@
+ fi
+
+ echo "VERSION=$version" > Makefile.cfg
+-#echo "PREFIX=$prefix" >> Makefile.cfg
++echo "PREFIX=$prefix" >> Makefile.cfg
+ echo "XLIB_DIR=$xlib_dir" >> Makefile.cfg
+ if [ "$vk_opt" != "" ]; then
+ echo "VK_OPT=$vk_opt" >> Makefile.cfg
diff --git a/vietnamese/xvnkb/files/patch-main.c b/vietnamese/xvnkb/files/patch-main.c
new file mode 100644
index 000000000000..ab453a78954c
--- /dev/null
+++ b/vietnamese/xvnkb/files/patch-main.c
@@ -0,0 +1,38 @@
+--- main.c.orig Jan 17 01:19:17 2004
++++ main.c Wed Dec 29 19:47:31 2004
+@@ -144,7 +144,7 @@
+ "Hãy đặt lại LANG thành %s.\n"
+ "Tham khảo thêm tài liệu của xvnkb để chọn LANG và tạo locale."
+ };
+- static char *locale_messages[] = {
++/* static char *locale_messages[] = {
+ "Missing locale information for LANG %s in\n"
+ "/usr/share/locale/%s.\n"
+ "We may not work with Vietnamese properly.%s\n"
+@@ -153,7 +153,7 @@
+ "/usr/share/locale/%s.\n"
+ "Chúng ta có thể sẽ không làm việc được với tiếng Việt.%s\n"
+ "Tham khảo thêm tài liệu của xvnkb để tạo các thông tin này."
+- };
++ };*/
+
+ FILE *fp;
+ char buf[512];
+@@ -202,7 +202,7 @@
+ sprintf(buf, lang_messages[vk_interface], sys_lang, slang);
+ VKShowMessage(buf);
+ }
+- else {
++/* else {
+ sprintf(buf, "/usr/share/locale/%s/LC_IDENTIFICATION", sys_lang);
+ fp = fopen(buf, "r");
+ if( fp ) {
+@@ -216,7 +216,7 @@
+ "\nAnd xvnkb will display Vietnamese text incorrectly.");
+ VKShowMessage(buf);
+ }
+- }
++ }*/
+ }
+ }
+ /*----------------------------------------------------------------------------*/
diff --git a/vietnamese/xvnkb/files/patch-scripts-new_install.sh b/vietnamese/xvnkb/files/patch-scripts-new_install.sh
new file mode 100644
index 000000000000..b97c3ea0f7cb
--- /dev/null
+++ b/vietnamese/xvnkb/files/patch-scripts-new_install.sh
@@ -0,0 +1,128 @@
+--- scripts/new_install.sh.orig Fri Jan 16 23:19:17 2004
++++ scripts/new_install.sh Wed Dec 29 15:28:22 2004
+@@ -19,11 +19,11 @@
+ # #
+ #----------------------------------------------------------------------------#
+
+-PREFIX="/usr/local"
++#PREFIX="/usr/local"
+
+ ID=`id -u`
+-LD="/etc/ld.so.preload"
+-SO="/lib/xvnkb.so"
++#LD="/etc/ld.so.preload"
++#SO="/lib/xvnkb.so"
+
+ if [ "$ID" != "0" ]; then
+ echo "You must be root to install xvnkb."
+@@ -46,56 +46,59 @@
+ cp ./xvnkb $PREFIX/bin && echo ok
+ echo -n "Copy xvnkb.so.$VERSION => $PREFIX/lib ... "
+ cp ./xvnkb.so.$VERSION $PREFIX/lib && echo ok
+-echo -n "Copy xvnkb_localeconf.sh => $PREFIX/bin ... "
+-cp ./scripts/xvnkb.lconf.sh $PREFIX/bin/xvnkb_localeconf.sh && echo ok
+-echo -n "Initialize xvnkb core ... "
+-XVNKB_CORE="$SO.$VERSION"
+-while [ -f $XVNKB_CORE ]; do
+- if [ "$N" = "" ]; then
+- N=1;
+- else
+- N=$((N + 1))
+- fi
+- XVNKB_CORE="$SO.$VERSION-$N"
+-done
+-cp ./xvnkb.so.$VERSION $XVNKB_CORE
+-chattr +i $XVNKB_CORE
+-if [ -f "$LD" ]; then
+- grep -v xvnkb.so $LD > $LD.xvnkb
+- /bin/mv -f $LD.xvnkb $LD
+-fi
+-echo "$XVNKB_CORE" >> $LD
+-echo done
+-
+-if [ "$LANG" = "C" ]; then
+- LANG="en_US"
+-fi
+-
+-if [ "`echo $LANG | grep UTF-8`" = "" ]; then
+- echo "If you want to input Vietnamese Unicode, please run"
+- echo
+- echo " # $PREFIX/bin/xvnkb_localeconf.sh $LANG.UTF-8"
+- echo
+- echo "and set your LANG to $LANG.UTF-8."
+- echo "See xvnkb documents for more information."
+-fi
+-
+-if [ "$OL" != "" ]; then
+- echo "You are using LD_PRELOAD to load xvnkb core."
+- echo "Try to remove this old setting style..."
+- if [ -f /etc/X11/xinit/xinitrc.d/xvnkb.sh ]; then
+- /bin/rm -f /etc/X11/xinit/xinitrc.d/xvnkb.sh
+- fi
+- echo -e "\\033[1;31m"
+- echo "* NOTICE: If you set it somewhere else (e.g. /etc/profile, /etc/bashrc,"
+- echo "~/.bash_profile, ~/.bashrc, ~/.xinitrc) by yourself, please remove it also!"
+- echo -e "\\033[0;39m"
+-fi
++ln -sf $PREFIX/lib/xvnkb.so.$VERSION $PREFIX/lib/libxvnkb.so
++ln -sf $PREFIX/lib/xvnkb.so.$VERSION $PREFIX/lib/libxvnkb.so.0
+
+-echo
+-echo "You can use xvnkb now! If you are using X, please restart your Window Manager."
+-echo "It will load xvnkb core control automatically for you and affect to all"
+-echo "applications. Right now, xvnkb core control can affect to new starting"
+-echo "applications only. Run \"xvnkb\" to control status."
+-echo
++#echo -n "Copy xvnkb_localeconf.sh => $PREFIX/bin ... "
++#cp ./scripts/xvnkb.lconf.sh $PREFIX/bin/xvnkb_localeconf.sh && echo ok
++#echo -n "Initialize xvnkb core ... "
++#XVNKB_CORE="$SO.$VERSION"
++#while [ -f $XVNKB_CORE ]; do
++# if [ "$N" = "" ]; then
++# N=1;
++# else
++# N=$((N + 1))
++# fi
++# XVNKB_CORE="$SO.$VERSION-$N"
++#done
++#cp ./xvnkb.so.$VERSION $XVNKB_CORE
++#chattr +i $XVNKB_CORE
++#if [ -f "$LD" ]; then
++# grep -v xvnkb.so $LD > $LD.xvnkb
++# /bin/mv -f $LD.xvnkb $LD
++#fi
++#echo "$XVNKB_CORE" >> $LD
++#echo done
++
++#if [ "$LANG" = "C" ]; then
++# LANG="en_US"
++#fi
++
++#if [ "`echo $LANG | grep UTF-8`" = "" ]; then
++# echo "If you want to input Vietnamese Unicode, please run"
++# echo
++# echo " # $PREFIX/bin/xvnkb_localeconf.sh $LANG.UTF-8"
++# echo
++# echo "and set your LANG to $LANG.UTF-8."
++# echo "See xvnkb documents for more information."
++#fi
++
++#if [ "$OL" != "" ]; then
++# echo "You are using LD_PRELOAD to load xvnkb core."
++# echo "Try to remove this old setting style..."
++# if [ -f /etc/X11/xinit/xinitrc.d/xvnkb.sh ]; then
++# /bin/rm -f /etc/X11/xinit/xinitrc.d/xvnkb.sh
++# fi
++# echo -e "\\033[1;31m"
++# echo "* NOTICE: If you set it somewhere else (e.g. /etc/profile, /etc/bashrc,"
++# echo "~/.bash_profile, ~/.bashrc, ~/.xinitrc) by yourself, please remove it also!"
++# echo -e "\\033[0;39m"
++#fi
++
++#echo
++#echo "You can use xvnkb now! If you are using X, please restart your Window Manager."
++#echo "It will load xvnkb core control automatically for you and affect to all"
++#echo "applications. Right now, xvnkb core control can affect to new starting"
++#echo "applications only. Run \"xvnkb\" to control status."
++#echo
+
diff --git a/vietnamese/xvnkb/files/xvnkb.1 b/vietnamese/xvnkb/files/xvnkb.1
new file mode 100644
index 000000000000..aebc75a7748c
--- /dev/null
+++ b/vietnamese/xvnkb/files/xvnkb.1
@@ -0,0 +1,48 @@
+.\" $FreeBSD$
+.Dd April 05, 2004
+.Dt "xvnkb" 1
+.Os
+.Sh NAME
+.Nm xvnkb ,
+.Nd A Vietnamese keyboard input method
+.Sh SYNOPSIS
+.Nm xvnkb
+.Op Fl h
+.Op Fl m=method
+.Op Fl c=charset
+.Sh DESCRIPTION
+.Nm \&xvnkb
+is a Vietnamese keyboard input for X-Window System. xvnkb supports a wide range of input methods and charsets.
+.Sh OPTIONS
+.Bl -tag -width indent
+.It Fl h
+Print the help message.
+.It Fl m=method
+Use the specified input method.
+Supported methods are:
+vni, telex, viqr.
+.It Fl c=charset
+Choose the input charset.
+Supported charsets are: utf8, tcvn, viscii, vps, viqr.
+.El
+.Sh EXAMPLES
+.Bl -tag -width
+On FreeBSD 4.x, you need to install a port called utf8locale (ports/misc/utf8locale) in order to use UTF-8 charset. To enable UTF-8 locale and preload xvnkb core module, you should also add these lines at top of your .xinitrc (or profile)
+.It export GTK_IM_MODULE=xim
+.It export LANG=en_US.UTF-8
+.It export LD_PRELOAD=/usr/local/lib/xvnkb.so.0.2.8
+.El
+.Sh FILES
+.Bl -tag -width
+.It Pa /usr/local/lib/xvnkb.so.0.2.8
+xvnkb core module
+.It Pa /usr/local/bin/xvnkb
+executable GUI control module
+.El
+.Sh BUGS
+There're may be some bugs. Please write the author if you catch something wrong.
+.Sh AUTHORS
+xvnkb was mostly written by
+.An Dao Hai Lam Aq lam@visc-network.com .
+Man page and freebsd ports created by
+.An Nguyen Tam Chinh Aq chinhngt@sectorb.msk.ru .
diff --git a/vietnamese/xvnkb/pkg-descr b/vietnamese/xvnkb/pkg-descr
new file mode 100644
index 000000000000..464a076521e9
--- /dev/null
+++ b/vietnamese/xvnkb/pkg-descr
@@ -0,0 +1,5 @@
+xvnkb is a Vietnamese keyboard input method for X-Window. It provides
+a useful way for editing Vietnamese on X-Window environment with popular
+input methods and charsets.
+
+WWW: http://xvnkb.sourceforge.net/
diff --git a/vietnamese/xvnkb/pkg-message b/vietnamese/xvnkb/pkg-message
new file mode 100644
index 000000000000..fd5a08423464
--- /dev/null
+++ b/vietnamese/xvnkb/pkg-message
@@ -0,0 +1,12 @@
+To use xvnkb in X-Windows environment, you should add these lines to your
+.xinitrc:
+
+# use xim module of gtk
+export GTK_IM_MODULE=xim
+# change locale to UTF-8, for example en_US.UTF-8
+export LANG=en_US.UTF-8
+# preload xvnkb core module
+export LD_PRELOAD=/usr/local/lib/xvnkb.so.0.2.8
+
+-- Nguyen Tam Chinh
+chinhngt@sectorb.msk.ru