aboutsummaryrefslogtreecommitdiffstats
path: root/vietnamese/xvnkb/files
diff options
context:
space:
mode:
authorthierry <thierry@FreeBSD.org>2004-12-30 02:08:46 +0800
committerthierry <thierry@FreeBSD.org>2004-12-30 02:08:46 +0800
commit7d33a95261ee71fb1ce39c987e8f653cbe1e0d4f (patch)
tree6ce8214ec1164af308fbd9c0fb7746c9c7c170cc /vietnamese/xvnkb/files
parent6a740a985d2b5cccf1c540e0dab6147ed37f7c19 (diff)
downloadfreebsd-ports-gnome-7d33a95261ee71fb1ce39c987e8f653cbe1e0d4f.tar.gz
freebsd-ports-gnome-7d33a95261ee71fb1ce39c987e8f653cbe1e0d4f.tar.zst
freebsd-ports-gnome-7d33a95261ee71fb1ce39c987e8f653cbe1e0d4f.zip
Add xvnkb 0.2.8, a Vietnamese input method for X-Window.
PR: 65207 Submitted by: Nguyen Tam Chinh.
Diffstat (limited to 'vietnamese/xvnkb/files')
-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
5 files changed, 237 insertions, 0 deletions
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 .