Update libtabe to 1.2.6. While here, add DESTDIR support and relax bdb dependency from db3 to db2-4. 0.2.6: 2004/09/20 --------------------- 1. Remove the "-release" flag from libtool, such that the naming convention of libtabe/libbims is changed to be: libtabe.so.X.X.X/libbims.so.X.X.X. Add release number information into utilities. Thanks to Roger So <roger.so@sw-linux.com>. 2. Porting to DB3-3.3.11: DB->stat() only takes 3 arguements. Thanks to Pofeng Lee <informer@ns1.m2000.idv.tw> Rui-Xiang Guo <rxg@ms25.url.com.tw> 3. Change the "rm $(PACKDB)" from "make clean" to "make distclean". Thanks to Kuang-che Wu <kcwu@ck.tp.edu.tw>. 4. Fix several memory leakage problem. Thanks to Kuang-che Wu <kcwu@ck.tp.edu.tw>. 5. Add util/tsiguess.c. Add API: tabeChunkInfoFree(), tabeChunkInfoNew(), tabeTsiInfoNew(), tabeTsiInfoFree(). Thanks to Pofeng Lee <informer@ns1.m2000.idv.tw>. 6. Add bims facility: user add Tsi by hand and store to user DB files. Thanks to Eric Cheng <eric@fractal.myip.org>. 7. Add bims facility: simple algorithm to learn new phrase input by user. Thanks to Pofeng Lee <informer@ns1.m2000.idv.tw>. 8. A quick fix for segfault when there is no ~/.xcin/*.db Fixed by Geoffrey Lee <snailtalk@linux-mandrake.com> 9. Fixed the bug of signed/unsigned TsiInfo->refcount ( 亨�W 0 bug ) Found by FixeShao-yu Cheng <eric@netgenes.org> Fixed by Kuang-che Wu <kcwu@ck.tp.edu.tw> 10. By <thhsieh@linux.org.tw> Fix a bug in libtabe/util/tsiguess: Do not always try to open $HOME/.xcin/newdb. But one can use the flag "-u" to specify the path of user defined DB file. 11. Fix bug in tabe_tsi.c: tabeChunkSegmentationComplex(): the same floating point number precision problem found in bims.c. Speed up and clean up tsiguess.c and tabe_tsi.c By Kuang-che Wu <kcwu@ck.tp.edu.tw> 12. Set DB_FLAG_READONLY or DB_FLAG_NOUNPACK_YIN flags in tsidump, tsiguess, tsiyincheck, tsiyindump utilities when necessary. By Kuang-che Wu <kcwu@ck.tp.edu.tw> 13. Support Berkeley DB 4. Thansks to Cheng-Lung Sung <clsung@dragon2.net>. 14. Builds without libbims if configure --without-x Builds with specific BerkeleyDB lib name if configure --with-db-name tsipackdb.in try all db*_dump, don't check db version anymore 15. Add bimsToggleTsiGuess() and bimsToggleNoTsiGuess() functions. Update autotools files.diff -r1.17 -r1.18 pkgsrc/inputmethod/libtabe/Makefile
(obache)
@@ -1,35 +1,40 @@ | @@ -1,35 +1,40 @@ | |||
1 | # $NetBSD: Makefile,v 1.17 2009/06/30 00:07:17 joerg Exp $ | 1 | # $NetBSD: Makefile,v 1.18 2009/11/24 11:15:14 obache Exp $ | |
2 | # | 2 | # | |
3 | 3 | |||
4 | DISTNAME= libtabe-0.2.5 | 4 | DISTNAME= libtabe-0.2.6 | |
5 | PKGREVISION= 2 | |||
6 | CATEGORIES= chinese inputmethod | 5 | CATEGORIES= chinese inputmethod | |
7 | MASTER_SITES= ftp://xcin.linux.org.tw/pub/xcin/libtabe/devel/ | 6 | MASTER_SITES= ftp://cle.linux.org.tw/pub/xcin/cvs/ | |
8 | 7 | |||
9 | MAINTAINER= rxg@NetBSD.org | 8 | MAINTAINER= rxg@NetBSD.org | |
10 | HOMEPAGE= http://libtabe.sourceforge.net/ | 9 | HOMEPAGE= http://libtabe.sourceforge.net/ | |
11 | COMMENT= Library for Chinese language processing | 10 | COMMENT= Library for Chinese language processing | |
11 | LICENSE= modified-bsd | |||
12 | ||||
13 | PKG_DESTDIR_SUPPORT= user-destdir | |||
12 | 14 | |||
13 | MAKE_JOBS_SAFE= no | 15 | MAKE_JOBS_SAFE= no | |
14 | 16 | |||
15 | WRKSRC= ${WRKDIR}/libtabe | |||
16 | USE_LIBTOOL= yes | 17 | USE_LIBTOOL= yes | |
17 | 18 | |||
18 | GNU_CONFIGURE= yes | 19 | GNU_CONFIGURE= yes | |
19 | CONFIGURE_ARGS+= --with-db-inc=${BUILDLINK_PREFIX.db3}/include/db3 | 20 | CONFIGURE_ARGS+= --with-db-inc=${BDBBASE}/include/${BDB_TYPE} | |
20 | CONFIGURE_ARGS+= --with-db-lib=${BUILDLINK_PREFIX.db3}/lib | 21 | CONFIGURE_ARGS+= --with-db-lib=${BDBBASE}/lib | |
22 | ||||
23 | INSTALL_MAKE_FLAGS+= program_prefix=${DESTDIR} | |||
24 | ||||
25 | INSTALLATION_DIRS+= share/doc/tabe | |||
21 | 26 | |||
22 | post-install: | 27 | post-install: | |
23 | ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/tabe | 28 | ${INSTALL_DATA} ${WRKSRC}/doc/* ${DESTDIR}${PREFIX}/share/doc/tabe | |
24 | ${INSTALL_DATA} ${WRKSRC}/doc/* ${PREFIX}/share/doc/tabe | |||
25 | ${INSTALL_DATA} ${WRKSRC}/src/supports/bims/README \ | 29 | ${INSTALL_DATA} ${WRKSRC}/src/supports/bims/README \ | |
26 | ${PREFIX}/share/doc/tabe/README.bims | 30 | ${DESTDIR}${PREFIX}/share/doc/tabe/README.bims | |
27 | ${INSTALL_DATA} ${WRKSRC}/tsi-src/README \ | 31 | ${INSTALL_DATA} ${WRKSRC}/tsi-src/README \ | |
28 | ${PREFIX}/share/doc/tabe/README.tsi | 32 | ${DESTDIR}${PREFIX}/share/doc/tabe/README.tsi | |
29 | 33 | |||
30 | BUILDLINK_DEPMETHOD.libXt?= build | 34 | BUILDLINK_DEPMETHOD.libXt?= build | |
31 | 35 | |||
32 | .include "../../databases/db3/buildlink3.mk" | |||
33 | .include "../../x11/libX11/buildlink3.mk" | 36 | .include "../../x11/libX11/buildlink3.mk" | |
34 | .include "../../x11/libXt/buildlink3.mk" | 37 | .include "../../x11/libXt/buildlink3.mk" | |
38 | BDB_ACCEPTED= db2 db3 db4 | |||
39 | .include "../../mk/bdb.buildlink3.mk" | |||
35 | .include "../../mk/bsd.pkg.mk" | 40 | .include "../../mk/bsd.pkg.mk" |
@@ -1,17 +1,18 @@ | @@ -1,17 +1,18 @@ | |||
1 | @comment $NetBSD: PLIST,v 1.5 2009/06/14 18:01:31 joerg Exp $ | 1 | @comment $NetBSD: PLIST,v 1.6 2009/11/24 11:15:14 obache Exp $ | |
2 | bin/tsiadd | 2 | bin/tsiadd | |
3 | bin/tsidel | 3 | bin/tsidel | |
4 | bin/tsidump | 4 | bin/tsidump | |
5 | bin/tsiguess | |||
5 | bin/tsiyincheck | 6 | bin/tsiyincheck | |
6 | bin/tsiyindump | 7 | bin/tsiyindump | |
7 | include/bims.h | 8 | include/bims.h | |
8 | include/tabe.h | 9 | include/tabe.h | |
9 | lib/libbims.la | 10 | lib/libbims.la | |
10 | lib/libtabe.la | 11 | lib/libtabe.la | |
11 | lib/tabe/tsi.db | 12 | lib/tabe/tsi.db | |
12 | lib/tabe/yin.db | 13 | lib/tabe/yin.db | |
13 | share/doc/tabe/BoPoMoFo.shtml | 14 | share/doc/tabe/BoPoMoFo.shtml | |
14 | share/doc/tabe/Changes | 15 | share/doc/tabe/Changes | |
15 | share/doc/tabe/Changes.pre-0.1 | 16 | share/doc/tabe/Changes.pre-0.1 | |
16 | share/doc/tabe/README.bims | 17 | share/doc/tabe/README.bims | |
17 | share/doc/tabe/README.tsi | 18 | share/doc/tabe/README.tsi |
@@ -1,15 +1,15 @@ | @@ -1,15 +1,15 @@ | |||
1 | # $NetBSD: buildlink3.mk,v 1.8 2009/03/20 19:24:47 joerg Exp $ | 1 | # $NetBSD: buildlink3.mk,v 1.9 2009/11/24 11:15:14 obache Exp $ | |
2 | 2 | |||
3 | BUILDLINK_TREE+= libtabe | 3 | BUILDLINK_TREE+= libtabe | |
4 | 4 | |||
5 | .if !defined(LIBTABE_BUILDLINK3_MK) | 5 | .if !defined(LIBTABE_BUILDLINK3_MK) | |
6 | LIBTABE_BUILDLINK3_MK:= | 6 | LIBTABE_BUILDLINK3_MK:= | |
7 | 7 | |||
8 | BUILDLINK_API_DEPENDS.libtabe+= libtabe>=0.2.5 | 8 | BUILDLINK_API_DEPENDS.libtabe+= libtabe>=0.2.5 | |
9 | BUILDLINK_ABI_DEPENDS.libtabe+= libtabe>=0.2.5nb2 | 9 | BUILDLINK_ABI_DEPENDS.libtabe+= libtabe>=0.2.6 | |
10 | BUILDLINK_PKGSRCDIR.libtabe?= ../../inputmethod/libtabe | 10 | BUILDLINK_PKGSRCDIR.libtabe?= ../../inputmethod/libtabe | |
11 | 11 | |||
12 | .include "../../databases/db3/buildlink3.mk" | 12 | .include "../../mk/bdb.buildlink3.mk" | |
13 | .endif # LIBTABE_BUILDLINK3_MK | 13 | .endif # LIBTABE_BUILDLINK3_MK | |
14 | 14 | |||
15 | BUILDLINK_TREE+= -libtabe | 15 | BUILDLINK_TREE+= -libtabe |
@@ -1,11 +1,9 @@ | @@ -1,11 +1,9 @@ | |||
1 | $NetBSD: distinfo,v 1.4 2005/09/28 17:09:43 rillig Exp $ | 1 | $NetBSD: distinfo,v 1.5 2009/11/24 11:15:14 obache Exp $ | |
2 | 2 | |||
3 | SHA1 (libtabe-0.2.5.tar.gz) = 487f3b34fa6e560c4baad5ac37af509f2850bc82 | 3 | SHA1 (libtabe-0.2.6.tar.gz) = d0c6a8a82e22567fa47e897ba7141414c9b71431 | |
4 | RMD160 (libtabe-0.2.5.tar.gz) = da459dae44241d7d51fa94805eaca5a85ca1056d | 4 | RMD160 (libtabe-0.2.6.tar.gz) = 0d5d6d5cadb8d099ec77a28d54a0366efacc9ffd | |
5 | Size (libtabe-0.2.5.tar.gz) = 1615825 bytes | 5 | Size (libtabe-0.2.6.tar.gz) = 1788455 bytes | |
6 | SHA1 (patch-aa) = 051f5149580f57fa163a347545b8ba419383d932 | 6 | SHA1 (patch-aa) = 08687575e08a088a2b8d6325b6bafd698daf6161 | |
7 | SHA1 (patch-ab) = 516061f376622d70d116e7d9a24595adbac99a34 | 7 | SHA1 (patch-ad) = 474f0ff1a02d949d66f2802c25b81ed1722041d1 | |
8 | SHA1 (patch-ac) = 6e51271ca10b6cb1608ec31d471a1cd3a5e7ccd0 | 8 | SHA1 (patch-ae) = 52985fda50a11adce231122c87ddb060773a7707 | |
9 | SHA1 (patch-ad) = 2e78b153cde1d0f28a63a9c6c8a604372b88442e | 9 | SHA1 (patch-af) = 2b5efdddc1e2e4b40c8a8f1d5f9b66df004688cc | |
10 | SHA1 (patch-ae) = e8d64b941173dfd4a987cd33e0dbf66cdbd96ee9 | |||
11 | SHA1 (patch-af) = 80a645473bff5e3d526c246e0fac451a8905594f |
@@ -1,239 +1,15 @@ | @@ -1,239 +1,15 @@ | |||
1 | $NetBSD: patch-aa,v 1.3 2005/09/28 17:09:43 rillig Exp $ | 1 | $NetBSD: patch-aa,v 1.4 2009/11/24 11:15:14 obache Exp $ | |
2 | 2 | |||
3 | --- configure.orig Tue Dec 4 23:05:00 2001 | 3 | --- configure.orig 2004-09-20 06:16:48.000000000 +0000 | |
4 | +++ configure Fri Dec 7 23:17:32 2001 | 4 | +++ configure | |
5 | @@ -5477,6 +5477,37 @@ | 5 | @@ -19253,7 +19253,9 @@ errno = db_open("foo.db", DB_BTREE, DB_C | |
6 | done | 6 | #endif | |
7 | 7 | if(errno) return errno; | ||
8 | 8 | |||
9 | +echo $ac_n "checking DB3 API""... $ac_c" 1>&6 | 9 | -#if DB_VERSION >= 303011 | |
10 | +echo "configure:5482: checking DB3 API" >&5 | 10 | +#if DB_VERSION >= 403000 | |
11 | +if test x$USE_DB = xDB3; then | 11 | +errno = dbp->stat(dbp, NULL, &sp, 0); | |
12 | + cat > conftest.$ac_ext <<EOF | 12 | +#elif DB_VERSION >= 303011 | |
13 | +#line 5485 "configure" | 13 | errno = dbp->stat(dbp, &sp, 0); | |
14 | +#include "confdefs.h" | 14 | #else | |
15 | + | 15 | errno = dbp->stat(dbp, &sp, NULL, 0); | |
16 | +#include <stdlib.h> | |||
17 | +#include <db.h> | |||
18 | +int main() { | |||
19 | + | |||
20 | +DB dbs; | |||
21 | +dbs.stat(&dbs, NULL, 0); | |||
22 | +; return 0; } | |||
23 | +EOF | |||
24 | +if { (eval echo configure:5496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then | |||
25 | + rm -rf conftest* | |||
26 | + cat >> confdefs.h <<\EOF | |||
27 | +#define HAVE_DB3_STAT3 1 | |||
28 | +EOF | |||
29 | + | |||
30 | + echo "$ac_t""DB->stat() take 3 arguements." 1>&6 | |||
31 | +else | |||
32 | + echo "configure: failed program was:" >&5 | |||
33 | + cat conftest.$ac_ext >&5 | |||
34 | + rm -rf conftest* | |||
35 | + echo "$ac_t""DB->stat() take 4 arguements." 1>&6 | |||
36 | +fi | |||
37 | +rm -f conftest* | |||
38 | +fi | |||
39 | + | |||
40 | if test x$with_db_lib = x; then | |||
41 | with_db_lib="$test_db_lib" | |||
42 | else | |||
43 | @@ -5497,7 +5528,7 @@ | |||
44 | # Uses ac_ vars as temps to allow command line to override cache and checks. | |||
45 | # --without-x overrides everything else, but does not touch the cache. | |||
46 | echo $ac_n "checking for X""... $ac_c" 1>&6 | |||
47 | -echo "configure:5501: checking for X" >&5 | |||
48 | +echo "configure:5532: checking for X" >&5 | |||
49 | ||||
50 | # Check whether --with-x or --without-x was given. | |||
51 | if test "${with_x+set}" = set; then | |||
52 | @@ -5559,12 +5590,12 @@ | |||
53 | ||||
54 | # First, try using that file with no special directory specified. | |||
55 | cat > conftest.$ac_ext <<EOF | |||
56 | -#line 5563 "configure" | |||
57 | +#line 5594 "configure" | |||
58 | #include "confdefs.h" | |||
59 | #include <$x_direct_test_include> | |||
60 | EOF | |||
61 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |||
62 | -{ (eval echo configure:5568: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } | |||
63 | +{ (eval echo configure:5599: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } | |||
64 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` | |||
65 | if test -z "$ac_err"; then | |||
66 | rm -rf conftest* | |||
67 | @@ -5633,14 +5664,14 @@ | |||
68 | ac_save_LIBS="$LIBS" | |||
69 | LIBS="-l$x_direct_test_library $LIBS" | |||
70 | cat > conftest.$ac_ext <<EOF | |||
71 | -#line 5637 "configure" | |||
72 | +#line 5668 "configure" | |||
73 | #include "confdefs.h" | |||
74 | ||||
75 | int main() { | |||
76 | ${x_direct_test_function}() | |||
77 | ; return 0; } | |||
78 | EOF | |||
79 | -if { (eval echo configure:5644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then | |||
80 | +if { (eval echo configure:5675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then | |||
81 | rm -rf conftest* | |||
82 | LIBS="$ac_save_LIBS" | |||
83 | # We can link X programs with no special library path. | |||
84 | @@ -5735,12 +5766,12 @@ | |||
85 | ||||
86 | ||||
87 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 | |||
88 | -echo "configure:5739: checking for ANSI C header files" >&5 | |||
89 | +echo "configure:5770: checking for ANSI C header files" >&5 | |||
90 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then | |||
91 | echo $ac_n "(cached) $ac_c" 1>&6 | |||
92 | else | |||
93 | cat > conftest.$ac_ext <<EOF | |||
94 | -#line 5744 "configure" | |||
95 | +#line 5775 "configure" | |||
96 | #include "confdefs.h" | |||
97 | #include <stdlib.h> | |||
98 | #include <stdarg.h> | |||
99 | @@ -5748,7 +5779,7 @@ | |||
100 | #include <float.h> | |||
101 | EOF | |||
102 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |||
103 | -{ (eval echo configure:5752: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } | |||
104 | +{ (eval echo configure:5783: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } | |||
105 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` | |||
106 | if test -z "$ac_err"; then | |||
107 | rm -rf conftest* | |||
108 | @@ -5765,7 +5796,7 @@ | |||
109 | if test $ac_cv_header_stdc = yes; then | |||
110 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |||
111 | cat > conftest.$ac_ext <<EOF | |||
112 | -#line 5769 "configure" | |||
113 | +#line 5800 "configure" | |||
114 | #include "confdefs.h" | |||
115 | #include <string.h> | |||
116 | EOF | |||
117 | @@ -5783,7 +5814,7 @@ | |||
118 | if test $ac_cv_header_stdc = yes; then | |||
119 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |||
120 | cat > conftest.$ac_ext <<EOF | |||
121 | -#line 5787 "configure" | |||
122 | +#line 5818 "configure" | |||
123 | #include "confdefs.h" | |||
124 | #include <stdlib.h> | |||
125 | EOF | |||
126 | @@ -5804,7 +5835,7 @@ | |||
127 | : | |||
128 | else | |||
129 | cat > conftest.$ac_ext <<EOF | |||
130 | -#line 5808 "configure" | |||
131 | +#line 5839 "configure" | |||
132 | #include "confdefs.h" | |||
133 | #include <ctype.h> | |||
134 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |||
135 | @@ -5815,7 +5846,7 @@ | |||
136 | exit (0); } | |||
137 | ||||
138 | EOF | |||
139 | -if { (eval echo configure:5819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null | |||
140 | +if { (eval echo configure:5850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null | |||
141 | then | |||
142 | : | |||
143 | else | |||
144 | @@ -5842,17 +5873,17 @@ | |||
145 | do | |||
146 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |||
147 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |||
148 | -echo "configure:5846: checking for $ac_hdr" >&5 | |||
149 | +echo "configure:5877: checking for $ac_hdr" >&5 | |||
150 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then | |||
151 | echo $ac_n "(cached) $ac_c" 1>&6 | |||
152 | else | |||
153 | cat > conftest.$ac_ext <<EOF | |||
154 | -#line 5851 "configure" | |||
155 | +#line 5882 "configure" | |||
156 | #include "confdefs.h" | |||
157 | #include <$ac_hdr> | |||
158 | EOF | |||
159 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |||
160 | -{ (eval echo configure:5856: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } | |||
161 | +{ (eval echo configure:5887: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } | |||
162 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` | |||
163 | if test -z "$ac_err"; then | |||
164 | rm -rf conftest* | |||
165 | @@ -5880,12 +5911,12 @@ | |||
166 | ||||
167 | ||||
168 | echo $ac_n "checking for working const""... $ac_c" 1>&6 | |||
169 | -echo "configure:5884: checking for working const" >&5 | |||
170 | +echo "configure:5915: checking for working const" >&5 | |||
171 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then | |||
172 | echo $ac_n "(cached) $ac_c" 1>&6 | |||
173 | else | |||
174 | cat > conftest.$ac_ext <<EOF | |||
175 | -#line 5889 "configure" | |||
176 | +#line 5920 "configure" | |||
177 | #include "confdefs.h" | |||
178 | ||||
179 | int main() { | |||
180 | @@ -5934,7 +5965,7 @@ | |||
181 | ||||
182 | ; return 0; } | |||
183 | EOF | |||
184 | -if { (eval echo configure:5938: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then | |||
185 | +if { (eval echo configure:5969: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then | |||
186 | rm -rf conftest* | |||
187 | ac_cv_c_const=yes | |||
188 | else | |||
189 | @@ -5956,7 +5987,7 @@ | |||
190 | ||||
191 | ||||
192 | echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 | |||
193 | -echo "configure:5960: checking for 8-bit clean memcmp" >&5 | |||
194 | +echo "configure:5991: checking for 8-bit clean memcmp" >&5 | |||
195 | if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then | |||
196 | echo $ac_n "(cached) $ac_c" 1>&6 | |||
197 | else | |||
198 | @@ -5964,7 +5995,7 @@ | |||
199 | ac_cv_func_memcmp_clean=no | |||
200 | else | |||
201 | cat > conftest.$ac_ext <<EOF | |||
202 | -#line 5968 "configure" | |||
203 | +#line 5999 "configure" | |||
204 | #include "confdefs.h" | |||
205 | ||||
206 | main() | |||
207 | @@ -5974,7 +6005,7 @@ | |||
208 | } | |||
209 | ||||
210 | EOF | |||
211 | -if { (eval echo configure:5978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null | |||
212 | +if { (eval echo configure:6009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null | |||
213 | then | |||
214 | ac_cv_func_memcmp_clean=yes | |||
215 | else | |||
216 | @@ -5994,12 +6025,12 @@ | |||
217 | for ac_func in strdup strerror strstr | |||
218 | do | |||
219 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |||
220 | -echo "configure:5998: checking for $ac_func" >&5 | |||
221 | +echo "configure:6029: checking for $ac_func" >&5 | |||
222 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then | |||
223 | echo $ac_n "(cached) $ac_c" 1>&6 | |||
224 | else | |||
225 | cat > conftest.$ac_ext <<EOF | |||
226 | -#line 6003 "configure" | |||
227 | +#line 6034 "configure" | |||
228 | #include "confdefs.h" | |||
229 | /* System header to define __stub macros and hopefully few prototypes, | |||
230 | which can conflict with char $ac_func(); below. */ | |||
231 | @@ -6022,7 +6053,7 @@ | |||
232 | ||||
233 | ; return 0; } | |||
234 | EOF | |||
235 | -if { (eval echo configure:6026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then | |||
236 | +if { (eval echo configure:6057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then | |||
237 | rm -rf conftest* | |||
238 | eval "ac_cv_func_$ac_func=yes" | |||
239 | else |
@@ -1,23 +1,15 @@ | @@ -1,23 +1,15 @@ | |||
1 | $NetBSD: patch-ad,v 1.1 2005/09/28 17:09:43 rillig Exp $ | 1 | $NetBSD: patch-ad,v 1.2 2009/11/24 11:15:14 obache Exp $ | |
2 | 2 | |||
3 | --- script/configure.in.orig Tue Dec 4 23:05:00 2001 | 3 | --- script/configure.in.orig 2004-09-20 06:16:48.000000000 +0000 | |
4 | +++ script/configure.in Fri Dec 7 23:17:29 2001 | 4 | +++ script/configure.in | |
5 | @@ -178,6 +178,18 @@ | 5 | @@ -203,7 +203,9 @@ errno = db_open("foo.db", DB_BTREE, DB_C | |
6 | AC_MSG_RESULT([Please use --with-db-inc to configure.]) | 6 | #endif | |
7 | exit 1 ]) | 7 | if(errno) return errno; | |
8 | 8 | |||
9 | +AC_MSG_CHECKING([DB3 API]) | 9 | -#if DB_VERSION >= 303011 | |
10 | +if test x$USE_DB = xDB3; then | 10 | +#if DB_VERSION >= 403000 | |
11 | + AC_TRY_LINK([ | 11 | +errno = dbp->stat(dbp, NULL, &sp, 0); | |
12 | +#include <stdlib.h> | 12 | +#elif DB_VERSION >= 303011 | |
13 | +#include <db.h>], [ | 13 | errno = dbp->stat(dbp, &sp, 0); | |
14 | +DB dbs; | 14 | #else | |
15 | +dbs.stat(&dbs, NULL, 0); ], | 15 | errno = dbp->stat(dbp, &sp, NULL, 0); | |
16 | + [ AC_DEFINE(HAVE_DB3_STAT3) | |||
17 | + AC_MSG_RESULT([DB->stat() take 3 arguements.]) ], | |||
18 | + [ AC_MSG_RESULT([DB->stat() take 4 arguements.]) ]) | |||
19 | +fi | |||
20 | + | |||
21 | if test x$with_db_lib = x; then | |||
22 | with_db_lib="$test_db_lib" | |||
23 | else |
@@ -1,16 +1,15 @@ | @@ -1,16 +1,15 @@ | |||
1 | $NetBSD: patch-ae,v 1.1 2005/09/28 17:09:43 rillig Exp $ | 1 | $NetBSD: patch-ae,v 1.2 2009/11/24 11:15:14 obache Exp $ | |
2 | 2 | |||
3 | --- src/tabe_tsidbint.c.orig Sun Nov 11 19:15:46 2001 | 3 | --- src/tabe_tsidbint.c.orig 2004-01-24 20:14:55.000000000 +0000 | |
4 | +++ src/tabe_tsidbint.c Fri Dec 7 23:13:15 2001 | 4 | +++ src/tabe_tsidbint.c | |
5 | @@ -265,7 +265,11 @@ | 5 | @@ -272,7 +272,9 @@ tabeTsiDBRecordNumber(struct TsiDB *tsid | |
6 | switch(tsidb->type) { | 6 | switch(tsidb->type) { | |
7 | case DB_TYPE_DB: | 7 | case DB_TYPE_DB: | |
8 | dbp = (DB *)tsidb->dbp; | 8 | dbp = (DB *)tsidb->dbp; | |
9 | +#ifdef HAVE_DB3_STAT3 | 9 | -#if DB_VERSION >= 303011 | |
10 | + errno = dbp->stat(dbp, &sp, 0); | 10 | +#if DB_VERSION >= 403000 | |
11 | +#else | 11 | + errno = dbp->stat(dbp, NULL, &sp, 0); | |
12 | +#elif DB_VERSION >= 303011 | |||
13 | errno = dbp->stat(dbp, &sp, 0); | |||
14 | #else | |||
12 | errno = dbp->stat(dbp, &sp, NULL, 0); | 15 | errno = dbp->stat(dbp, &sp, NULL, 0); | |
13 | +#endif | |||
14 | if (!errno) { | |||
15 | #ifndef HAVE_DB3 | |||
16 | return(sp->bt_nrecs); |
@@ -1,16 +1,15 @@ | @@ -1,16 +1,15 @@ | |||
1 | $NetBSD: patch-af,v 1.1 2005/09/28 17:09:43 rillig Exp $ | 1 | $NetBSD: patch-af,v 1.2 2009/11/24 11:15:14 obache Exp $ | |
2 | 2 | |||
3 | --- src/tabe_tsiyindbint.c.orig Sun Nov 11 19:16:32 2001 | 3 | --- src/tabe_tsiyindbint.c.orig 2004-01-24 20:14:55.000000000 +0000 | |
4 | +++ src/tabe_tsiyindbint.c Fri Dec 7 23:15:21 2001 | 4 | +++ src/tabe_tsiyindbint.c | |
5 | @@ -268,7 +268,11 @@ | 5 | @@ -275,7 +275,9 @@ tabeTsiYinDBRecordNumber(struct TsiYinDB | |
6 | switch(tsiyindb->type) { | 6 | switch(tsiyindb->type) { | |
7 | case DB_TYPE_DB: | 7 | case DB_TYPE_DB: | |
8 | dbp = (DB *)tsiyindb->dbp; | 8 | dbp = (DB *)tsiyindb->dbp; | |
9 | +#ifdef HAVE_DB3_STAT3 | 9 | -#if DB_VERSION >= 303011 | |
10 | + errno = dbp->stat(dbp, &sp, 0); | 10 | +#if DB_VERSION >= 403000 | |
11 | +#else | 11 | + errno = dbp->stat(dbp, NULL, &sp, 0); | |
12 | +#elif DB_VERSION >= 303011 | |||
13 | errno = dbp->stat(dbp, &sp, 0); | |||
14 | #else | |||
12 | errno = dbp->stat(dbp, &sp, NULL, 0); | 15 | errno = dbp->stat(dbp, &sp, NULL, 0); | |
13 | +#endif | |||
14 | if (!errno) { | |||
15 | #ifndef HAVE_DB3 | |||
16 | return(sp->bt_nrecs); |