Sat Aug 2 04:54:07 2014 UTC ()
Update libchewing to 0.4.0.

What's New in libchewing 0.4.0 (Apr 11, 2014)
---------------------------------------------------------
* Add the following APIs:
  - Userphrase manipulation
    - chewing_userphrase_enumerate
    - chewing_userphrase_has_next
    - chewing_userphrase_get
    - chewing_userphrase_add
    - chewing_userphrase_remove
    - chewing_userphrase_lookup
  - Keyboardless action
    - chewing_cand_open
    - chewing_cand_close
    - chewing_cand_string_by_index_static
    - chewing_cand_choose_by_index
    - chewing_cand_list_first
    - chewing_cand_list_last
    - chewing_cand_list_has_next
    - chewing_cand_list_has_prev
    - chewing_cand_list_next
    - chewing_cand_list_prev
    - chewing_commit_preedit_buf
    - chewing_clean_preedit_buf
    - chewing_clean_bopomofo_buf
  - Bopomofo buffer
    - chewing_bopomofo_Check
    - chewing_bopomofo_String_static
  - Static API
    - chewing_aux_String_static
    - chewing_buffer_String_static
    - chewing_cand_String_static
    - chewing_commit_String_static
    - chewing_kbtype_String_static
  - Misc
    - chewing_new2
* Dictionary format:
  - Remove text data support
  - Introduce platform independent binary data representation
  - Move binary data to share/libchewing/*
* Userphrase format:
  - Support SQLite-based user phrase storage and manipulation
* New coding style:
  - Use scripts/indent.sh to change coding style
* Bug fixed:
  - Fix chewing_zuin_Check wrong return value #62
  - Fix numlock key cannot output number #45
  - Fix negative frequency problem #75
  - Fix cannot select candidate when symbol exists #79
  - Avoid clearing the buffer when Up arrow key is pressed and escCleanAllBuf is 1.
  - Fix cannot handle numlock 9 correctly #88
  - Fix invalid characters are committed when pre-edit buffer is full
  - Fix AutoLearnPhrase cannot fill correct wordSeq #108
  - Fix wrong auto learn when symbol in between #112
  - Fix missing rpl_malloc for cross compilation #118
  - Fix '\n' appear in symbol table #126
  - Reopen candidate list for symbols with down key #127 #135
  - Let up key close candidate list of symbols #131 #138
* Misc:
  - Add `make check' in cmake build
  - Change MAX_UTF8_SIZE to 4
  - Update official website URL
  - Use CreateFileA() instead of CreateFile() to stick with the ANSI API
  - Do not check phrase longer than MAX_PHRASE_LEN
  - Implement dynamic programming phrasing algorithm #73
  - Clean bopomofo buffer when mode change to English mode #89 #97
  - Update README to GFM.
  - Replace 'INCLUDE' with 'AM_CPPFLAGS' #68 #114 #116
  - Use [Shift]+[-] to input EM DASH (u+2014) as default #113 #124
  - Use Backspace to close candidate window #128
  - Use PgUp/PgDn to turn pages of candidates #129
  - Update Windows default search path #78
  - The word "zuin", "Zhuyin" are obsolete terms for "Bopomofo"
  - Add const whenever possible in several APIs
  - Toggle shape mode with shift-space #141 #142
* Successful stories:
  - chewing-windows-tsf project provides Text Services Framework
    support for Microsoft Windows.


(obache)
diff -r1.8 -r1.9 pkgsrc/inputmethod/libchewing/Makefile
diff -r1.4 -r1.5 pkgsrc/inputmethod/libchewing/PLIST
diff -r1.7 -r1.8 pkgsrc/inputmethod/libchewing/buildlink3.mk
diff -r1.7 -r1.8 pkgsrc/inputmethod/libchewing/distinfo
diff -r1.1 -r1.2 pkgsrc/inputmethod/libchewing/patches/patch-configure
diff -r1.1 -r1.2 pkgsrc/inputmethod/libchewing/patches/patch-configure.ac

cvs diff -r1.8 -r1.9 pkgsrc/inputmethod/libchewing/Makefile (expand / switch to context diff)
--- pkgsrc/inputmethod/libchewing/Makefile 2013/08/10 09:14:22 1.8
+++ pkgsrc/inputmethod/libchewing/Makefile 2014/08/02 04:54:07 1.9
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.8 2013/08/10 09:14:22 obache Exp $
+# $NetBSD: Makefile,v 1.9 2014/08/02 04:54:07 obache Exp $
 #
 
-DISTNAME=	libchewing-0.3.5
+DISTNAME=	libchewing-0.4.0
 CATEGORIES=	chinese inputmethod
-MASTER_SITES=	http://chewing.googlecode.com/files/
+MASTER_SITES=	https://github.com/chewing/libchewing/releases/download/v${PKGVERSION_NOREV}/
 EXTRACT_SUFX=	.tar.bz2
 
 MAINTAINER=	obache@NetBSD.org
@@ -17,4 +17,7 @@
 
 PKGCONFIG_OVERRIDE=	chewing.pc.in
 
+TEST_TARGET=	check
+
+.include "../../databases/sqlite3/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"

cvs diff -r1.4 -r1.5 pkgsrc/inputmethod/libchewing/PLIST (expand / switch to context diff)
--- pkgsrc/inputmethod/libchewing/PLIST 2013/08/10 09:14:22 1.4
+++ pkgsrc/inputmethod/libchewing/PLIST 2014/08/02 04:54:07 1.5
@@ -1,17 +1,14 @@
-@comment $NetBSD: PLIST,v 1.4 2013/08/10 09:14:22 obache Exp $
+@comment $NetBSD: PLIST,v 1.5 2014/08/02 04:54:07 obache Exp $
+include/chewing/chewing-compat.h
 include/chewing/chewing.h
 include/chewing/chewingio.h
 include/chewing/global.h
 include/chewing/mod_aux.h
 info/libchewing.info
 lib/libchewing.la
-lib/libchewing/ch_index_begin.dat
-lib/libchewing/ch_index_phone.dat
-lib/libchewing/dict.dat
-lib/libchewing/fonetree.dat
-lib/libchewing/ph_index.dat
-lib/libchewing/pinyin.tab
-lib/libchewing/swkb.dat
-lib/libchewing/symbols.dat
-lib/libchewing/us_freq.dat
 lib/pkgconfig/chewing.pc
+share/libchewing/dictionary.dat
+share/libchewing/index_tree.dat
+share/libchewing/pinyin.tab
+share/libchewing/swkb.dat
+share/libchewing/symbols.dat

cvs diff -r1.7 -r1.8 pkgsrc/inputmethod/libchewing/buildlink3.mk (expand / switch to context diff)
--- pkgsrc/inputmethod/libchewing/buildlink3.mk 2009/11/24 11:31:04 1.7
+++ pkgsrc/inputmethod/libchewing/buildlink3.mk 2014/08/02 04:54:07 1.8
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink3.mk,v 1.7 2009/11/24 11:31:04 obache Exp $
+# $NetBSD: buildlink3.mk,v 1.8 2014/08/02 04:54:07 obache Exp $
 
 BUILDLINK_TREE+=	libchewing
 
@@ -6,8 +6,10 @@
 LIBCHEWING_BUILDLINK3_MK:=
 
 BUILDLINK_API_DEPENDS.libchewing+=		libchewing>=0.3.2
-BUILDLINK_ABI_DEPENDS.libchewing+=	libchewing>=0.3.2
+BUILDLINK_ABI_DEPENDS.libchewing+=	libchewing>=0.4.0
 BUILDLINK_PKGSRCDIR.libchewing?=	../../inputmethod/libchewing
+
+.include "../../databases/sqlite3/buildlink3.mk"
 .endif # LIBCHEWING_BUILDLINK3_MK
 
 BUILDLINK_TREE+=	-libchewing

cvs diff -r1.7 -r1.8 pkgsrc/inputmethod/libchewing/distinfo (expand / switch to context diff)
--- pkgsrc/inputmethod/libchewing/distinfo 2013/08/10 09:14:22 1.7
+++ pkgsrc/inputmethod/libchewing/distinfo 2014/08/02 04:54:07 1.8
@@ -1,7 +1,7 @@
-$NetBSD: distinfo,v 1.7 2013/08/10 09:14:22 obache Exp $
+$NetBSD: distinfo,v 1.8 2014/08/02 04:54:07 obache Exp $
 
-SHA1 (libchewing-0.3.5.tar.bz2) = 5ee3941f0f62fa14fbda53e1032970b04a7a88b7
+SHA1 (libchewing-0.4.0.tar.bz2) = 7409b0a6753e14510c96574714dcec86c7b10138
-RMD160 (libchewing-0.3.5.tar.bz2) = 02e571d1441f6397efe815d3812acc0f70c2d203
+RMD160 (libchewing-0.4.0.tar.bz2) = 7abc4191e0295d566b1409c12d593ee0e4b50637
-Size (libchewing-0.3.5.tar.bz2) = 1978489 bytes
+Size (libchewing-0.4.0.tar.bz2) = 3014558 bytes
-SHA1 (patch-configure) = 1dac333234433e9cc52dbe1625271eccf3e631ba
+SHA1 (patch-configure) = 2f855e174fa486932dea90d013e525c1c5ef24a1
-SHA1 (patch-configure.ac) = bb1d458d4f32c461a746dc88fb5019e790240af9
+SHA1 (patch-configure.ac) = 2a47e597f14cf363055f5b8409289f6edbc544e2

cvs diff -r1.1 -r1.2 pkgsrc/inputmethod/libchewing/patches/Attic/patch-configure (expand / switch to context diff)
--- pkgsrc/inputmethod/libchewing/patches/Attic/patch-configure 2013/08/10 09:14:22 1.1
+++ pkgsrc/inputmethod/libchewing/patches/Attic/patch-configure 2014/08/02 04:54:07 1.2
@@ -1,15 +1,49 @@
-$NetBSD: patch-configure,v 1.1 2013/08/10 09:14:22 obache Exp $
+$NetBSD: patch-configure,v 1.2 2014/08/02 04:54:07 obache Exp $
 
 * test(1) portability fix
+  https://github.com/chewing/libchewing/pull/158
 
---- configure.orig	2013-08-10 08:57:00.000000000 +0000
+--- configure.orig	2014-04-11 01:49:45.000000000 +0000
 +++ configure
-@@ -13368,7 +13368,7 @@ CC_FOR_BUILD=${CC_FOR_BUILD-${CC}}
+@@ -13212,7 +13212,7 @@ else
+   with_sqlite3=yes
+ fi
  
- # Default CFLAGS
- AM_CFLAGS="$CFLAGS -Wall"
+- if test x"$with_sqlite3" == x"yes"; then
++ if test x"$with_sqlite3" = x"yes"; then
+   WITH_SQLITE3_TRUE=
+   WITH_SQLITE3_FALSE='#'
+ else
+@@ -13229,7 +13229,7 @@ else
+   with_internal_sqlite3=no
+ fi
+ 
+- if test x"$with_internal_sqlite3" == x"yes"; then
++ if test x"$with_internal_sqlite3" = x"yes"; then
+   WITH_INTERNAL_SQLITE3_TRUE=
+   WITH_INTERNAL_SQLITE3_FALSE='#'
+ else
+@@ -13239,12 +13239,12 @@ fi
+ 
+ 
+ # for sqlite
+-if test x"$with_sqlite3" == x"yes"; then :
++if test x"$with_sqlite3" = x"yes"; then :
+ 
+ 
+ $as_echo "#define WITH_SQLITE3 1" >>confdefs.h
+ 
+-       if test x"$with_internal_sqlite3" == x"no"; then :
++       if test x"$with_internal_sqlite3" = x"no"; then :
+ 
+               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sqlite3_open" >&5
+ $as_echo_n "checking for library containing sqlite3_open... " >&6; }
+@@ -14065,7 +14065,7 @@ CC_FOR_BUILD=${CC_FOR_BUILD-${CC}}
+ AM_CFLAGS="$AM_CFLAGS -Wall $CFLAGS"
+ 
+ # Add '_GNU_SOURCE' for asprintf
 -if test x$ac_cv_func_asprintf == xyes; then :
 +if test x$ac_cv_func_asprintf = xyes; then :
-   AM_CPPFLAGS="$AM_CPPFLAGS -D_GNU_SOURCE"
+   DEFAULT_CPPFLAGS="$DEFAULT_CPPFLAGS -D_GNU_SOURCE"
  fi
  

cvs diff -r1.1 -r1.2 pkgsrc/inputmethod/libchewing/patches/Attic/patch-configure.ac (expand / switch to context diff)
--- pkgsrc/inputmethod/libchewing/patches/Attic/patch-configure.ac 2013/08/10 09:14:22 1.1
+++ pkgsrc/inputmethod/libchewing/patches/Attic/patch-configure.ac 2014/08/02 04:54:07 1.2
@@ -1,15 +1,39 @@
-$NetBSD: patch-configure.ac,v 1.1 2013/08/10 09:14:22 obache Exp $
+$NetBSD: patch-configure.ac,v 1.2 2014/08/02 04:54:07 obache Exp $
 
 * test(1) portability fix
+  https://github.com/chewing/libchewing/pull/158
 
---- configure.ac.orig	2013-07-28 07:30:39.000000000 +0000
+--- configure.ac.orig	2014-04-11 01:24:52.000000000 +0000
 +++ configure.ac
-@@ -87,7 +87,7 @@ AC_SUBST(CC_FOR_BUILD)
+@@ -79,18 +79,18 @@ AC_ARG_WITH([sqlite3],
+             AS_HELP_STRING([--with-sqlite3], [Use sqlite3 to store userphrase @<:@default=yes@:>@]),
+             [],
+             [with_sqlite3=yes])
+-AM_CONDITIONAL([WITH_SQLITE3], [test x"$with_sqlite3" == x"yes"])
++AM_CONDITIONAL([WITH_SQLITE3], [test x"$with_sqlite3" = x"yes"])
  
- # Default CFLAGS
- AM_CFLAGS="$CFLAGS -Wall"
+ AC_ARG_WITH([internal-sqlite3],
+             AS_HELP_STRING([--with-internal-sqlite3], [Use internal sqlite3 instead of system-wide @<:@default=no@:>@]),
+             [],
+             [with_internal_sqlite3=no])
+-AM_CONDITIONAL([WITH_INTERNAL_SQLITE3], [test x"$with_internal_sqlite3" == x"yes"])
++AM_CONDITIONAL([WITH_INTERNAL_SQLITE3], [test x"$with_internal_sqlite3" = x"yes"])
+ 
+ # for sqlite
+-AS_IF([test x"$with_sqlite3" == x"yes"], [
++AS_IF([test x"$with_sqlite3" = x"yes"], [
+        AC_DEFINE([WITH_SQLITE3], [1], [Use sqlite3 to store userphrase])
+-       AS_IF([test x"$with_internal_sqlite3" == x"no"],
++       AS_IF([test x"$with_internal_sqlite3" = x"no"],
+              [
+               AC_SEARCH_LIBS([sqlite3_open], [sqlite3],
+                              [AS_IF([test x$ac_cv_search_sqlite3_open != x"none required"],
+@@ -126,7 +126,7 @@ AC_SUBST(CC_FOR_BUILD)
+ AM_CFLAGS="$AM_CFLAGS -Wall $CFLAGS"
+ 
+ # Add '_GNU_SOURCE' for asprintf
 -AS_IF([test x$ac_cv_func_asprintf == xyes],
 +AS_IF([test x$ac_cv_func_asprintf = xyes],
-       [AM_CPPFLAGS="$AM_CPPFLAGS -D_GNU_SOURCE"])
+       [DEFAULT_CPPFLAGS="$DEFAULT_CPPFLAGS -D_GNU_SOURCE"])
  
  AX_WITH_CURSES