debian/0000775000000000000000000000000012247400002007157 5ustar debian/source/0000775000000000000000000000000012216623065010473 5ustar debian/source/format0000664000000000000000000000001412216623065011701 0ustar 3.0 (quilt) debian/libpinyin4.symbols0000664000000000000000000000436612216626765012711 0ustar libpinyin.so.4 libpinyin4 #MINVER# LIBPINYIN@LIBPINYIN 0.9.93 pinyin_alloc_instance@LIBPINYIN 0.9.93 pinyin_begin_add_phrases@LIBPINYIN 0.9.93 pinyin_choose_candidate@LIBPINYIN 0.9.93 pinyin_clear_constraint@LIBPINYIN 0.9.93 pinyin_end_add_phrases@LIBPINYIN 0.9.93 pinyin_fini@LIBPINYIN 0.9.93 pinyin_free_instance@LIBPINYIN 0.9.93 pinyin_get_candidate@LIBPINYIN 0.9.93 pinyin_get_candidate_string@LIBPINYIN 0.9.93 pinyin_get_candidate_type@LIBPINYIN 0.9.93 pinyin_get_chewing_string@LIBPINYIN 0.9.93 pinyin_get_n_candidate@LIBPINYIN 0.9.93 pinyin_get_n_phrase@LIBPINYIN 0.9.93 pinyin_get_n_pinyin@LIBPINYIN 0.9.93 pinyin_get_phrase_token@LIBPINYIN 0.9.93 pinyin_get_pinyin_key@LIBPINYIN 0.9.93 pinyin_get_pinyin_key_rest@LIBPINYIN 0.9.93 pinyin_get_pinyin_key_rest_length@LIBPINYIN 0.9.93 pinyin_get_pinyin_key_rest_positions@LIBPINYIN 0.9.93 pinyin_get_pinyin_string@LIBPINYIN 0.9.93 pinyin_get_pinyin_strings@LIBPINYIN 0.9.93 pinyin_get_raw_full_pinyin@LIBPINYIN 0.9.93 pinyin_get_sentence@LIBPINYIN 0.9.93 pinyin_guess_candidates@LIBPINYIN 0.9.93 pinyin_guess_full_pinyin_candidates@LIBPINYIN 0.9.93 pinyin_guess_sentence@LIBPINYIN 0.9.93 pinyin_guess_sentence_with_prefix@LIBPINYIN 0.9.93 pinyin_in_chewing_keyboard@LIBPINYIN 0.9.93 pinyin_init@LIBPINYIN 0.9.93 pinyin_iterator_add_phrase@LIBPINYIN 0.9.93 pinyin_load_phrase_library@LIBPINYIN 0.9.93 pinyin_lookup_tokens@LIBPINYIN 0.9.93 pinyin_mask_out@LIBPINYIN 0.9.93 pinyin_parse_chewing@LIBPINYIN 0.9.93 pinyin_parse_double_pinyin@LIBPINYIN 0.9.93 pinyin_parse_full_pinyin@LIBPINYIN 0.9.93 pinyin_parse_more_chewings@LIBPINYIN 0.9.93 pinyin_parse_more_double_pinyins@LIBPINYIN 0.9.93 pinyin_parse_more_full_pinyins@LIBPINYIN 0.9.93 pinyin_phrase_segment@LIBPINYIN 0.9.93 pinyin_reset@LIBPINYIN 0.9.93 pinyin_save@LIBPINYIN 0.9.93 pinyin_set_chewing_scheme@LIBPINYIN 0.9.93 pinyin_set_double_pinyin_scheme@LIBPINYIN 0.9.93 pinyin_set_options@LIBPINYIN 0.9.93 pinyin_token_add_unigram_frequency@LIBPINYIN 0.9.93 pinyin_token_get_n_pronunciation@LIBPINYIN 0.9.93 pinyin_token_get_nth_pronunciation@LIBPINYIN 0.9.93 pinyin_token_get_phrase@LIBPINYIN 0.9.93 pinyin_token_get_unigram_frequency@LIBPINYIN 0.9.93 pinyin_train@LIBPINYIN 0.9.93 pinyin_unload_phrase_library@LIBPINYIN 0.9.93 debian/copyright0000664000000000000000000000224312216624666011137 0ustar Format: http://dep.debian.net/deps/dep5/ Upstream-Name: libpinyin Upstream-Contact: Peng Wu Source: http://github.com/libpinyin Files: * Copyright: 2006, 2007, 2010, 2011 Peng Wu 2002, 2003, 2006 James Su License: GPL-2+ Files: debian/* Copyright: 2011, Aron Xu License: GPL-2+ License: GPL-2+ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. . This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. . You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. . On Debian systems, the full text of GPL-2 could be found at /usr/share/common-licenses/GPL-2 . debian/libpinyin4.install0000664000000000000000000000005712216624666012656 0ustar usr/lib/*/lib*.so.* usr/lib/*/libpinyin/data/* debian/libpinyin4-dev.install0000664000000000000000000000010712216624666013426 0ustar usr/include/* usr/lib/*/lib*.a usr/lib/*/lib*.so usr/lib/*/pkgconfig/* debian/libpinyin-utils.install0000664000000000000000000000004112216624666013721 0ustar usr/bin/* usr/share/man/man1/*.1 debian/changelog0000664000000000000000000000435312247377776011075 0ustar libpinyin (0.9.93+repack1-1ubuntu1) trusty; urgency=low * Cherrypick from upstream to force C locale when loading table.conf (LP: #1255999) -- Dmitrijs Ledkovs Tue, 03 Dec 2013 15:59:58 +0000 libpinyin (0.9.93+repack1-1) unstable; urgency=low * Upload to unstable. -- Aron Xu Mon, 30 Sep 2013 19:59:38 +0800 libpinyin (0.9.93+repack1-0exp2) experimental; urgency=low * Team upload. * Update Breaks/Replaces (Closes: #723958) -- Aron Xu Mon, 23 Sep 2013 01:15:49 +0800 libpinyin (0.9.93+repack1-0exp1) experimental; urgency=low * Team upload. * New upstream release. -- Aron Xu Fri, 20 Sep 2013 00:40:15 +0800 libpinyin (0.8.0-2) unstable; urgency=low * Bump standard version to 3.9.4: no modification needed. * Remove DMUA tag. * Upload to unstable. * Add symbols for libpinyin2. -- YunQiang Su Sat, 16 Feb 2013 13:08:01 +0800 libpinyin (0.8.0-1) experimental; urgency=low * New upstream release -- Aron Xu Fri, 30 Nov 2012 21:46:09 +0800 libpinyin (0.7.92-1) experimental; urgency=low * New upstream release -- Asias He Tue, 16 Oct 2012 19:40:17 +0800 libpinyin (0.7.91-1) experimental; urgency=low * New upstream release -- Asias He Fri, 05 Oct 2012 21:42:29 +0800 libpinyin (0.7.0-2) experimental; urgency=low * Add Breaks/Replaces entry for libpinyin0 (Closes: #684032). -- Aron Xu Wed, 08 Aug 2012 16:53:44 +0000 libpinyin (0.7.0-1) experimental; urgency=low * New upstream release * Rename to libpinyin2, because upstream SONAME bump. * Remove 0002-fixes_test_flexible_ngram.cpp_kfreebsd_build.patch, applied upstream. * Remove README.Debian, not needed anymore. -- Aron Xu Sun, 29 Jul 2012 23:34:56 +0800 libpinyin (0.6.91-1) unstable; urgency=low * Imported Upstream version 0.6.91 * Add upstream patch: - fixes test_flexible_ngram.cpp - fixes kfreebsd build -- YunQiang Su Sat, 26 May 2012 09:43:35 +0800 libpinyin (0.5.92-1) unstable; urgency=low * Initial release (Closes: #658144) -- Aron Xu Fri, 04 May 2012 01:35:31 +0800 debian/control0000664000000000000000000000445112247400000010564 0ustar Source: libpinyin Priority: optional Maintainer: Ubuntu Developers XSBC-Original-Maintainer: IME Packaging Team Uploaders: Aron Xu , YunQiang Su , Asias He Build-Depends: autotools-dev, debhelper (>= 9), dh-autoreconf, libdb-dev, libglib2.0-dev, libltdl-dev Standards-Version: 3.9.4 Section: libs Homepage: http://github.com/libpinyin Vcs-Git: git://anonscm.debian.org/pkg-ime/libpinyin.git Vcs-Browser: http://anonscm.debian.org/git/pkg-ime/libpinyin.git Package: libpinyin4-dev Section: libdevel Architecture: any Multi-Arch: same Depends: libpinyin4 (= ${binary:Version}), ${misc:Depends} Recommends: libpinyin-utils Provides: libpinyin-dev Conflicts: libpinyin-dev Description: library to deal with PinYin - development files libpinyin is a set of core algorithms designed for intelligent sentence-based Chinese PinYin input methods. . This package provides the library development files. Package: libpinyin4 Architecture: any Multi-Arch: same Pre-Depends: ${misc:Pre-Depends} Depends: ${misc:Depends}, ${shlibs:Depends} Breaks: fcitx-libpinyin (<< 0.2.0), libpinyin0, libpinyin2 Replaces: libpinyin0, libpinyin2 Provides: libpinyin Suggests: libpinyin-utils Description: library to deal with PinYin libpinyin is a set of core algorithms designed for intelligent sentence-based Chinese PinYin input methods. . This package provides the library files. Package: libpinyin-utils Section: utils Architecture: any Multi-Arch: foreign Depends: ${misc:Depends}, ${shlibs:Depends} Description: library to deal with PinYin - utilities libpinyin is a set of core algorithms designed for intelligent sentence-based Chinese PinYin input methods. . This package provides the utilities for manipulating dict files. Package: libpinyin-dbg Section: debug Priority: extra Architecture: any Multi-Arch: same Depends: libpinyin4 (= ${binary:Version}), ${misc:Depends} Description: library to deal with PinYin - debug symbols libpinyin is a set of core algorithms designed for intelligent sentence-based Chinese PinYin input methods. . This package provides the debug symbols of the library and executables. debian/rules0000775000000000000000000000112412216626445010256 0ustar #!/usr/bin/make -f DEB_HOST_MULTIARCH?=$(shell dpkg-architecture -qDEB_HOST_MULTIARCH) LDFLAGS+=-Wl,--as-needed # Parallel build. ifeq ($(DEB_HOST_ARCH_OS),linux) export DEB_BUILD_OPTIONS+=parallel=$(shell getconf _NPROCESSORS_ONLN) endif %: dh $@ --parallel --with autoreconf override_dh_auto_configure: dh_auto_configure -Sautoconf -- \ --libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) \ --datarootdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) override_dh_strip: dh_strip --dbg-package=libpinyin-dbg override_dh_install: find debian/ -name *.la -delete dh_install --fail-missing debian/watch0000664000000000000000000000012012216623065010215 0ustar version=3 http://githubredir.debian.net/github/libpinyin/libpinyin/ (.*).tar.gz debian/patches/0000775000000000000000000000000012247377713010634 5ustar debian/patches/8abc8cfd97cfe63c8e26e0838d4c825283b30630.patch0000664000000000000000000000465512247377706017347 0ustar From 8abc8cfd97cfe63c8e26e0838d4c825283b30630 Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Fri, 26 Jul 2013 12:35:46 +0800 Subject: [PATCH] Force to use C locale to load table.conf --- src/storage/table_info.cpp | 14 ++++++++++++++ tests/storage/test_table_info.cpp | 3 +++ 2 files changed, 17 insertions(+) diff --git a/src/storage/table_info.cpp b/src/storage/table_info.cpp index 795d93d..63af8e0 100644 --- a/src/storage/table_info.cpp +++ b/src/storage/table_info.cpp @@ -23,6 +23,7 @@ #include #include #include +#include using namespace pinyin; @@ -121,6 +122,8 @@ static PHRASE_FILE_TYPE to_file_type(const char * str) { bool SystemTableInfo::load(const char * filename) { reset(); + char * locale = setlocale(LC_NUMERIC, "C"); + FILE * input = fopen(filename, "r"); if (NULL == input) { fprintf(stderr, "open %s failed.\n", filename); @@ -183,6 +186,9 @@ bool SystemTableInfo::load(const char * filename) { /* postfix reserved tables. */ postfix_tables(); + + setlocale(LC_NUMERIC, locale); + return true; } @@ -208,6 +214,8 @@ void UserTableInfo::reset() { bool UserTableInfo::load(const char * filename) { reset(); + char * locale = setlocale(LC_NUMERIC, "C"); + FILE * input = fopen(filename, "r"); if (NULL == input) { fprintf(stderr, "open %s failed.", filename); @@ -237,10 +245,14 @@ bool UserTableInfo::load(const char * filename) { fclose(input); + setlocale(LC_NUMERIC, locale); + return true; } bool UserTableInfo::save(const char * filename) { + char * locale = setlocale(LC_NUMERIC, "C"); + FILE * output = fopen(filename, "w"); if (NULL == output) { fprintf(stderr, "write %s failed.\n", filename); @@ -252,6 +264,8 @@ bool UserTableInfo::save(const char * filename) { fclose(output); + setlocale(LC_NUMERIC, locale); + return true; } diff --git a/tests/storage/test_table_info.cpp b/tests/storage/test_table_info.cpp index 68b4735..5781c97 100644 --- a/tests/storage/test_table_info.cpp +++ b/tests/storage/test_table_info.cpp @@ -20,10 +20,13 @@ */ #include +#include #include "pinyin_internal.h" int main(int argc, char * argv[]) { + setlocale(LC_ALL, ""); + SystemTableInfo system_table_info; bool retval = system_table_info.load("../../data/table.conf"); -- 1.8.5-rc3 debian/patches/series0000664000000000000000000000005712247377713012053 0ustar 8abc8cfd97cfe63c8e26e0838d4c825283b30630.patch debian/compat0000664000000000000000000000000212216623065010371 0ustar 9