Hello community, here is the log from the commit of package ibus-libzhuyin for openSUSE:Factory checked in at 2015-02-27 10:59:25 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ibus-libzhuyin (Old) and /work/SRC/openSUSE:Factory/.ibus-libzhuyin.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "ibus-libzhuyin" Changes: -------- --- /work/SRC/openSUSE:Factory/ibus-libzhuyin/ibus-libzhuyin.changes 2014-11-26 10:33:03.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.ibus-libzhuyin.new/ibus-libzhuyin.changes 2015-02-27 10:59:37.000000000 +0100 @@ -1,0 +2,6 @@ +Wed Feb 25 06:57:23 UTC 2015 - hillwood@linuxfans.org + +- Use opencc 1.0.2 + * add ibus-libzhuyin-opencc-1_0_2-build.patch + +------------------------------------------------------------------- New: ---- ibus-libzhuyin-opencc-1_0_2-build.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ibus-libzhuyin.spec ++++++ --- /var/tmp/diff_new_pack.RCN7Nx/_old 2015-02-27 10:59:38.000000000 +0100 +++ /var/tmp/diff_new_pack.RCN7Nx/_new 2015-02-27 10:59:38.000000000 +0100 @@ -1,7 +1,7 @@ # # spec file for package ibus-libzhuyin # -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -24,13 +24,15 @@ Group: System/I18n/Chinese Url: https://github.com/libzhuyin/ibus-libzhuyin Source: %{name}-%{version}.tar.gz +# PATCH-FIX-UPSTREAM ibus-libzhuyin-opencc-1_0_2-build.patch hillwood@opensuse.org Use -- opencc 1.0.2 +Patch0: ibus-libzhuyin-opencc-1_0_2-build.patch BuildRequires: fdupes BuildRequires: gcc-c++ BuildRequires: gnome-common BuildRequires: ibus-devel BuildRequires: intltool BuildRequires: libzhuyin-devel -BuildRequires: opencc-devel +BuildRequires: opencc-devel >= 1.0.2 Provides: locale(ibus:zh_TW;zh_HK) BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -39,6 +41,7 @@ %prep %setup -q +%patch0 -p1 %build ./autogen.sh ++++++ ibus-libzhuyin-opencc-1_0_2-build.patch ++++++ Index: ibus-libzhuyin-1.6.99.20140929/src/ZYTradSimpConverter.cc =================================================================== --- ibus-libzhuyin-1.6.99.20140929.orig/src/ZYTradSimpConverter.cc +++ ibus-libzhuyin-1.6.99.20140929/src/ZYTradSimpConverter.cc @@ -33,7 +33,6 @@ namespace ZY { class opencc { - static const int BUFFER_SIZE = 64; public: opencc (void) { @@ -48,30 +47,14 @@ public: void convert (const gchar *in, String &out) { - glong n_char; - gunichar *in_ucs4 = g_utf8_to_ucs4_fast (in, -1, &n_char); - - ucs4_t *pinbuf = (ucs4_t *)in_ucs4; - size_t inbuf_left = n_char; - while (inbuf_left != 0) { - ucs4_t *poutbuf = (ucs4_t *)m_buffer; - size_t outbuf_left = BUFFER_SIZE; - size_t retval = opencc_convert(m_cc, &pinbuf, &inbuf_left, &poutbuf, &outbuf_left); - if (retval == (size_t) -1) { - /* append left chars in pinbuf */ - g_warning ("opencc_convert return failed"); - out << (gunichar *) pinbuf; - break; - } - *poutbuf = L'\0'; - out << m_buffer; - } - g_free (in_ucs4); + char * converted = opencc_convert_utf8 (m_cc, in, -1); + g_assert (converted != NULL); + out = converted; + opencc_convert_utf8_free (converted); } private: opencc_t m_cc; - gunichar m_buffer[BUFFER_SIZE + 1]; }; void -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org