summaryrefslogtreecommitdiff
path: root/inputmethod
diff options
context:
space:
mode:
authoruebayasi <uebayasi@pkgsrc.org>2002-06-04 08:31:10 +0000
committeruebayasi <uebayasi@pkgsrc.org>2002-06-04 08:31:10 +0000
commit4c13ecc3c7990fb09e3dd5d69bfbf146713a20f7 (patch)
treeedc890099282cd816e9f0cc8e2c3d458330b2bc7 /inputmethod
parenta42a50631ad2e4bca72f7a6763e1f81f4c42932b (diff)
downloadpkgsrc-4c13ecc3c7990fb09e3dd5d69bfbf146713a20f7.tar.gz
Initial import of libtabe, submitted by Rui-Xiang Guo in pkg/12171.
After its pioneering work on Chinese i18n/l10n issues, TaBE Project extends its goal to more general Chinese language processing issues on computer systems. libtabe, the latest work made available by the Project, is a library which provides useful Chinese functions/routines that deal with many fundamental elements such as pronunciation(BoPoMoFo), character frequency, word identification, word frequency. It also comes with a free word database consists of more than 130,000 words.
Diffstat (limited to 'inputmethod')
-rw-r--r--inputmethod/libtabe/DESCR8
-rw-r--r--inputmethod/libtabe/Makefile33
-rw-r--r--inputmethod/libtabe/PLIST33
-rw-r--r--inputmethod/libtabe/buildlink.mk36
-rw-r--r--inputmethod/libtabe/distinfo5
-rw-r--r--inputmethod/libtabe/patches/patch-aa310
6 files changed, 425 insertions, 0 deletions
diff --git a/inputmethod/libtabe/DESCR b/inputmethod/libtabe/DESCR
new file mode 100644
index 00000000000..e801fda56f0
--- /dev/null
+++ b/inputmethod/libtabe/DESCR
@@ -0,0 +1,8 @@
+After its pioneering work on Chinese i18n/l10n issues, TaBE Project extends its
+goal to more general Chinese language processing issues on computer systems.
+
+libtabe, the latest work made available by the Project, is a library which
+provides useful Chinese functions/routines that deal with many fundamental
+elements such as pronunciation(BoPoMoFo), character frequency, word
+identification, word frequency. It also comes with a free word database
+consists of more than 130,000 words.
diff --git a/inputmethod/libtabe/Makefile b/inputmethod/libtabe/Makefile
new file mode 100644
index 00000000000..ca51ca55d9b
--- /dev/null
+++ b/inputmethod/libtabe/Makefile
@@ -0,0 +1,33 @@
+# $NetBSD: Makefile,v 1.1.1.1 2002/06/04 08:31:10 uebayasi Exp $
+#
+
+DISTNAME= libtabe-0.2.5
+CATEGORIES= chinese inputmethod
+MASTER_SITES= ftp://xcin.linux.org.tw/pub/xcin/libtabe/devel/
+
+MAINTAINER= rxg@netbsd.org
+HOMEPAGE= http://libtabe.sourceforge.net/
+COMMENT= library for Chinese language processing
+
+USE_LIBTOOL= yes
+LTCONFIG_OVERRIDE= ${WRKSRC}/script/ltmain.sh
+GNU_CONFIGURE= yes
+CONFIGURE_ARGS+=--with-db-inc=${LOCALBASE}/include/db3 \
+ --with-db-lib=${LOCALBASE}/lib
+
+WRKSRC= ${WRKDIR}/libtabe
+
+post-configure:
+ # this pkg generates libtool script from configure file
+ cd ${WRKSRC} && script/ltmain.sh
+
+post-install:
+ ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/tabe
+ ${INSTALL_DATA} ${WRKSRC}/doc/* ${PREFIX}/share/doc/tabe
+ ${INSTALL_DATA} ${WRKSRC}/src/supports/bims/README \
+ ${PREFIX}/share/doc/tabe/README.bims
+ ${INSTALL_DATA} ${WRKSRC}/tsi-src/README \
+ ${PREFIX}/share/doc/tabe/README.tsi
+
+.include "../../databases/db3/buildlink.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/inputmethod/libtabe/PLIST b/inputmethod/libtabe/PLIST
new file mode 100644
index 00000000000..b120a0c1046
--- /dev/null
+++ b/inputmethod/libtabe/PLIST
@@ -0,0 +1,33 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2002/06/04 08:31:10 uebayasi Exp $
+bin/tsiadd
+bin/tsidel
+bin/tsidump
+bin/tsiyincheck
+bin/tsiyindump
+include/bims.h
+include/tabe.h
+lib/libbims-${PKGVERSION}.so
+lib/libbims-${PKGVERSION}.so.2
+lib/libbims-${PKGVERSION}.so.2.1
+lib/libbims.a
+lib/libbims.la
+lib/libbims.so
+lib/${PKGNAME}.so
+lib/${PKGNAME}.so.2
+lib/${PKGNAME}.so.2.1
+lib/libtabe.a
+lib/libtabe.la
+lib/libtabe.so
+lib/tabe/tsi.db
+lib/tabe/yin.db
+share/doc/tabe/BoPoMoFo.shtml
+share/doc/tabe/Changes
+share/doc/tabe/Changes.pre-0.1
+share/doc/tabe/README.bims
+share/doc/tabe/README.tsi
+share/doc/tabe/TODO
+share/doc/tabe/ZuYinCode.txt
+share/doc/tabe/et26.txt
+share/doc/tabe/libtabe.sgml
+@dirrm share/doc/tabe
+@dirrm lib/tabe
diff --git a/inputmethod/libtabe/buildlink.mk b/inputmethod/libtabe/buildlink.mk
new file mode 100644
index 00000000000..1cf5f4f8592
--- /dev/null
+++ b/inputmethod/libtabe/buildlink.mk
@@ -0,0 +1,36 @@
+# $NetBSD: buildlink.mk,v 1.1.1.1 2002/06/04 08:31:10 uebayasi Exp $
+#
+# This Makefile fragment is included by packages that use libtabe.
+#
+# To use this Makefile fragment, simply:
+#
+# (1) Optionally define BUILDLINK_DEPENDS.libtabe to the dependency pattern
+# for the version of libtabe desired.
+# (2) Include this Makefile fragment in the package Makefile,
+# (3) Add ${BUILDLINK_DIR}/include to the front of the C preprocessor's header
+# search path, and
+# (4) Add ${BUILDLINK_DIR}/lib to the front of the linker's library search
+# path.
+
+.if !defined(LIBTABE_BUILDLINK_MK)
+LIBTABE_BUILDLINK_MK= # defined
+
+.include "../../mk/bsd.buildlink.mk"
+
+BUILDLINK_DEPENDS.libtabe?= libtabe>=0.2.5
+DEPENDS+= ${BUILDLINK_DEPENDS.libtabe}:../../chinese/libtabe
+
+EVAL_PREFIX+= BUILDLINK_PREFIX.libtabe=libtabe
+BUILDLINK_PREFIX.libtabe_DEFAULT= ${LOCALBASE}
+BUILDLINK_FILES.libtabe= include/bims.h
+BUILDLINK_FILES.libtabe+= include/tabe.h
+BUILDLINK_FILES.libtabe+= lib/libbims.*
+BUILDLINK_FILES.libtabe+= lib/libtabe.*
+
+BUILDLINK_TARGETS.libtabe= libtabe-buildlink
+BUILDLINK_TARGETS+= ${BUILDLINK_TARGETS.libtabe}
+
+pre-configure: ${BUILDLINK_TARGETS.libtabe}
+libtabe-buildlink: _BUILDLINK_USE
+
+.endif # LIBTABE_BUILDLINK_MK
diff --git a/inputmethod/libtabe/distinfo b/inputmethod/libtabe/distinfo
new file mode 100644
index 00000000000..e101c3f74fd
--- /dev/null
+++ b/inputmethod/libtabe/distinfo
@@ -0,0 +1,5 @@
+$NetBSD: distinfo,v 1.1.1.1 2002/06/04 08:31:10 uebayasi Exp $
+
+SHA1 (libtabe-0.2.5.tar.gz) = 487f3b34fa6e560c4baad5ac37af509f2850bc82
+Size (libtabe-0.2.5.tar.gz) = 1615825 bytes
+SHA1 (patch-aa) = b9c996a2aa9d78a64486836fd7baab1fd3d81411
diff --git a/inputmethod/libtabe/patches/patch-aa b/inputmethod/libtabe/patches/patch-aa
new file mode 100644
index 00000000000..929701f77bc
--- /dev/null
+++ b/inputmethod/libtabe/patches/patch-aa
@@ -0,0 +1,310 @@
+$NetBSD: patch-aa,v 1.1.1.1 2002/06/04 08:31:11 uebayasi Exp $
+
+--- configure.orig Tue Dec 4 23:05:00 2001
++++ configure Fri Dec 7 23:17:32 2001
+@@ -5477,6 +5477,37 @@
+ done
+
+
++echo $ac_n "checking DB3 API""... $ac_c" 1>&6
++echo "configure:5482: checking DB3 API" >&5
++if test x$USE_DB = xDB3; then
++ cat > conftest.$ac_ext <<EOF
++#line 5485 "configure"
++#include "confdefs.h"
++
++#include <stdlib.h>
++#include <db.h>
++int main() {
++
++DB dbs;
++dbs.stat(&dbs, NULL, 0);
++; return 0; }
++EOF
++if { (eval echo configure:5496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++ rm -rf conftest*
++ cat >> confdefs.h <<\EOF
++#define HAVE_DB3_STAT3 1
++EOF
++
++ echo "$ac_t""DB->stat() take 3 arguements." 1>&6
++else
++ echo "configure: failed program was:" >&5
++ cat conftest.$ac_ext >&5
++ rm -rf conftest*
++ echo "$ac_t""DB->stat() take 4 arguements." 1>&6
++fi
++rm -f conftest*
++fi
++
+ if test x$with_db_lib = x; then
+ with_db_lib="$test_db_lib"
+ else
+@@ -5497,7 +5528,7 @@
+ # Uses ac_ vars as temps to allow command line to override cache and checks.
+ # --without-x overrides everything else, but does not touch the cache.
+ echo $ac_n "checking for X""... $ac_c" 1>&6
+-echo "configure:5501: checking for X" >&5
++echo "configure:5532: checking for X" >&5
+
+ # Check whether --with-x or --without-x was given.
+ if test "${with_x+set}" = set; then
+@@ -5559,12 +5590,12 @@
+
+ # First, try using that file with no special directory specified.
+ cat > conftest.$ac_ext <<EOF
+-#line 5563 "configure"
++#line 5594 "configure"
+ #include "confdefs.h"
+ #include <$x_direct_test_include>
+ EOF
+ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+-{ (eval echo configure:5568: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++{ (eval echo configure:5599: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+ if test -z "$ac_err"; then
+ rm -rf conftest*
+@@ -5633,14 +5664,14 @@
+ ac_save_LIBS="$LIBS"
+ LIBS="-l$x_direct_test_library $LIBS"
+ cat > conftest.$ac_ext <<EOF
+-#line 5637 "configure"
++#line 5668 "configure"
+ #include "confdefs.h"
+
+ int main() {
+ ${x_direct_test_function}()
+ ; return 0; }
+ EOF
+-if { (eval echo configure:5644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:5675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ LIBS="$ac_save_LIBS"
+ # We can link X programs with no special library path.
+@@ -5735,12 +5766,12 @@
+
+
+ echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
+-echo "configure:5739: checking for ANSI C header files" >&5
++echo "configure:5770: checking for ANSI C header files" >&5
+ if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+ cat > conftest.$ac_ext <<EOF
+-#line 5744 "configure"
++#line 5775 "configure"
+ #include "confdefs.h"
+ #include <stdlib.h>
+ #include <stdarg.h>
+@@ -5748,7 +5779,7 @@
+ #include <float.h>
+ EOF
+ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+-{ (eval echo configure:5752: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++{ (eval echo configure:5783: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+ if test -z "$ac_err"; then
+ rm -rf conftest*
+@@ -5765,7 +5796,7 @@
+ if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+ cat > conftest.$ac_ext <<EOF
+-#line 5769 "configure"
++#line 5800 "configure"
+ #include "confdefs.h"
+ #include <string.h>
+ EOF
+@@ -5783,7 +5814,7 @@
+ if test $ac_cv_header_stdc = yes; then
+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+ cat > conftest.$ac_ext <<EOF
+-#line 5787 "configure"
++#line 5818 "configure"
+ #include "confdefs.h"
+ #include <stdlib.h>
+ EOF
+@@ -5804,7 +5835,7 @@
+ :
+ else
+ cat > conftest.$ac_ext <<EOF
+-#line 5808 "configure"
++#line 5839 "configure"
+ #include "confdefs.h"
+ #include <ctype.h>
+ #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+@@ -5815,7 +5846,7 @@
+ exit (0); }
+
+ EOF
+-if { (eval echo configure:5819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
++if { (eval echo configure:5850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+ then
+ :
+ else
+@@ -5842,17 +5873,17 @@
+ do
+ ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+ echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+-echo "configure:5846: checking for $ac_hdr" >&5
++echo "configure:5877: checking for $ac_hdr" >&5
+ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+ cat > conftest.$ac_ext <<EOF
+-#line 5851 "configure"
++#line 5882 "configure"
+ #include "confdefs.h"
+ #include <$ac_hdr>
+ EOF
+ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+-{ (eval echo configure:5856: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++{ (eval echo configure:5887: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+ if test -z "$ac_err"; then
+ rm -rf conftest*
+@@ -5880,12 +5911,12 @@
+
+
+ echo $ac_n "checking for working const""... $ac_c" 1>&6
+-echo "configure:5884: checking for working const" >&5
++echo "configure:5915: checking for working const" >&5
+ if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+ cat > conftest.$ac_ext <<EOF
+-#line 5889 "configure"
++#line 5920 "configure"
+ #include "confdefs.h"
+
+ int main() {
+@@ -5934,7 +5965,7 @@
+
+ ; return 0; }
+ EOF
+-if { (eval echo configure:5938: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:5969: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_c_const=yes
+ else
+@@ -5956,7 +5987,7 @@
+
+
+ echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
+-echo "configure:5960: checking for 8-bit clean memcmp" >&5
++echo "configure:5991: checking for 8-bit clean memcmp" >&5
+ if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -5964,7 +5995,7 @@
+ ac_cv_func_memcmp_clean=no
+ else
+ cat > conftest.$ac_ext <<EOF
+-#line 5968 "configure"
++#line 5999 "configure"
+ #include "confdefs.h"
+
+ main()
+@@ -5974,7 +6005,7 @@
+ }
+
+ EOF
+-if { (eval echo configure:5978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
++if { (eval echo configure:6009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+ then
+ ac_cv_func_memcmp_clean=yes
+ else
+@@ -5994,12 +6025,12 @@
+ for ac_func in strdup strerror strstr
+ do
+ echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+-echo "configure:5998: checking for $ac_func" >&5
++echo "configure:6029: checking for $ac_func" >&5
+ if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+ cat > conftest.$ac_ext <<EOF
+-#line 6003 "configure"
++#line 6034 "configure"
+ #include "confdefs.h"
+ /* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+@@ -6022,7 +6053,7 @@
+
+ ; return 0; }
+ EOF
+-if { (eval echo configure:6026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:6057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=yes"
+ else
+--- script/acconfig.h.orig Mon Aug 20 11:53:03 2001
++++ script/acconfig.h Fri Dec 7 23:13:28 2001
+@@ -21,6 +21,8 @@
+
+ #undef HAVE_DB3
+
++#undef HAVE_DB3_STAT3
++
+ #undef LINUX
+
+ #undef FREEBSD
+--- script/config.h.in.orig Sat Oct 20 19:22:07 2001
++++ script/config.h.in Fri Dec 7 23:17:32 2001
+@@ -13,6 +13,8 @@
+
+ #undef HAVE_DB3
+
++#undef HAVE_DB3_STAT3
++
+ #undef LINUX
+
+ #undef FREEBSD
+--- script/configure.in.orig Tue Dec 4 23:05:00 2001
++++ script/configure.in Fri Dec 7 23:17:29 2001
+@@ -178,6 +178,18 @@
+ AC_MSG_RESULT([Please use --with-db-inc to configure.])
+ exit 1 ])
+
++AC_MSG_CHECKING([DB3 API])
++if test x$USE_DB = xDB3; then
++ AC_TRY_LINK([
++#include <stdlib.h>
++#include <db.h>], [
++DB dbs;
++dbs.stat(&dbs, NULL, 0); ],
++ [ AC_DEFINE(HAVE_DB3_STAT3)
++ AC_MSG_RESULT([DB->stat() take 3 arguements.]) ],
++ [ AC_MSG_RESULT([DB->stat() take 4 arguements.]) ])
++fi
++
+ if test x$with_db_lib = x; then
+ with_db_lib="$test_db_lib"
+ else
+--- src/tabe_tsidbint.c.orig Sun Nov 11 19:15:46 2001
++++ src/tabe_tsidbint.c Fri Dec 7 23:13:15 2001
+@@ -265,7 +265,11 @@
+ switch(tsidb->type) {
+ case DB_TYPE_DB:
+ dbp = (DB *)tsidb->dbp;
++#ifdef HAVE_DB3_STAT3
++ errno = dbp->stat(dbp, &sp, 0);
++#else
+ errno = dbp->stat(dbp, &sp, NULL, 0);
++#endif
+ if (!errno) {
+ #ifndef HAVE_DB3
+ return(sp->bt_nrecs);
+--- src/tabe_tsiyindbint.c.orig Sun Nov 11 19:16:32 2001
++++ src/tabe_tsiyindbint.c Fri Dec 7 23:15:21 2001
+@@ -268,7 +268,11 @@
+ switch(tsiyindb->type) {
+ case DB_TYPE_DB:
+ dbp = (DB *)tsiyindb->dbp;
++#ifdef HAVE_DB3_STAT3
++ errno = dbp->stat(dbp, &sp, 0);
++#else
+ errno = dbp->stat(dbp, &sp, NULL, 0);
++#endif
+ if (!errno) {
+ #ifndef HAVE_DB3
+ return(sp->bt_nrecs);