Hello community, here is the log from the commit of package libkkc for openSUSE:Factory checked in at 2018-02-07 18:42:45 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libkkc (Old) and /work/SRC/openSUSE:Factory/.libkkc.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libkkc" Wed Feb 7 18:42:45 2018 rev:9 rq:573707 version:0.3.5+git20171220.7d365e1 Changes: -------- --- /work/SRC/openSUSE:Factory/libkkc/libkkc.changes 2017-04-07 13:54:40.459887294 +0200 +++ /work/SRC/openSUSE:Factory/.libkkc.new/libkkc.changes 2018-02-07 18:42:48.572260448 +0100 @@ -1,0 +2,19 @@ +Wed Feb 07 01:26:36 UTC 2018 - [email protected] + +- Update to version 0.3.5+git20171220.7d365e1: + * fix the modifier static is not applicable to constants + * vala 0.32: use new operator to create new objects + * Revert "vala 0.32: use new operator to create new objects" + * build: Fix compile error with Vala 0.36 + * build: Migrate from intltool to gettext + * build: Require valadoc-0.40 + * build: Use xz-compressed archive tarball + * build: Set DIST_SUBDIRS for maintainer-clean target + * Fix memory leak caused by hacking strv length. +- drop vala-0.23.2+-static-const.patch, upstreamed +- drop vala-0.32-new-operator.patch, upstreamed +- add libkkc-gettext.patch, lower gettext version for Leap +- add libkkc-public.patch, public some classes to make vala + 0.38 happy + +------------------------------------------------------------------- Old: ---- libkkc-0.3.5+git20150522.650f0d6.tar.xz vala-0.23.2+-static-const.patch vala-0.32-new-operator.patch New: ---- libkkc-0.3.5+git20171220.7d365e1.tar.xz libkkc-gettext.patch libkkc-public.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libkkc.spec ++++++ --- /var/tmp/diff_new_pack.AN0Wtk/_old 2018-02-07 18:42:49.584213066 +0100 +++ /var/tmp/diff_new_pack.AN0Wtk/_new 2018-02-07 18:42:49.584213066 +0100 @@ -1,7 +1,7 @@ # # spec file for package libkkc # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,7 +19,7 @@ %define soname 2 %define data_version 0.2.7 Name: libkkc -Version: 0.3.5+git20150522.650f0d6 +Version: 0.3.5+git20171220.7d365e1 Release: 0 Summary: Japanese Kana-string to Kana-Kanji-mixed-string converter License: GPL-3.0 @@ -27,20 +27,19 @@ Url: https://github.com/ueno/libkkc Source: %{name}-%{version}.tar.xz # data: https://bitbucket.org/libkkc/libkkc-data/downloads/ -Source1: https://bitbucket.org/libkkc/libkkc-data/downloads/%{name}-data-%{data_version}.tar.xz +Source1: %{name}-data-%{data_version}.tar.xz Source99: baselibs.conf # PATCH-FIX-UPSTREAM [email protected] - use correct shared library for typelib generation Patch0: libkkc-typelib-sharelib.patch -# PATCH-FIX-UPSTREAM [email protected] - fix "the modifier 'static' is not applicable to constants" -Patch1: vala-0.23.2+-static-const.patch -# PATCH-FIX-UPSTREAM [email protected] - fix "use 'new' operator to create new objects" error -Patch2: vala-0.32-new-operator.patch +# PATCH-FIX-OPENSUSE [email protected] - lower gettext version +Patch1: libkkc-gettext.patch +# PATCH-FIX-UPSTREAM [email protected] - public some classes to make vala 0.38 happy +Patch2: libkkc-public.patch BuildRequires: fdupes BuildRequires: gcc-c++ # for autogen.sh BuildRequires: gnome-common BuildRequires: gobject-introspection-devel -BuildRequires: intltool # json_generator_set_pretty is not available in version below. BuildRequires: json-glib-devel >= 0.14.0 BuildRequires: libgee-devel >= 0.12.0 ++++++ libkkc-0.3.5+git20150522.650f0d6.tar.xz -> libkkc-0.3.5+git20171220.7d365e1.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkkc-0.3.5+git20150522.650f0d6/.travis.yml new/libkkc-0.3.5+git20171220.7d365e1/.travis.yml --- old/libkkc-0.3.5+git20150522.650f0d6/.travis.yml 2015-08-25 10:56:00.000000000 +0200 +++ new/libkkc-0.3.5+git20171220.7d365e1/.travis.yml 2017-12-20 08:09:09.000000000 +0100 @@ -1,29 +1,45 @@ +sudo: required + language: c env: - matrix: - - VALAC=valac-0.24 + - BUILD_OPTS="--prefix=/usr --libdir=/usr/lib64" + - BUILD_OPTS="--prefix=/usr --libdir=/usr/lib64 --enable-code-coverage" COVERAGE=yes + - BUILD_OPTS="--prefix=/usr --libdir=/usr/lib64 CFLAGS='-fsanitize=address -g -fno-common -U_FORTIFY_SOURCE' CXXFLAGS='-fsanitize=address -g -fno-common -U_FORTIFY_SOURCE' LDFLAGS='-fsanitize=address -g -fno-common -U_FORTIFY_SOURCE' LIBS='-ldl -lpthread'" + - BUILD_OPTS="--prefix=/usr --libdir=/usr/lib64 CFLAGS='-fsanitize=undefined -g -fno-common -U_FORTIFY_SOURCE' CXXFLAGS='-fsanitize=undefined -g -fno-common -U_FORTIFY_SOURCE' LDFLAGS='-fsanitize=undefined -g -fno-common -U_FORTIFY_SOURCE' LIBS='-ldl -lpthread'" + +matrix: + allow_failures: + - env: BUILD_OPTS="--prefix=/usr --libdir=/usr/lib64 CFLAGS='-fsanitize=address -g -fno-common -U_FORTIFY_SOURCE' CXXFLAGS='-fsanitize=address -g -fno-common -U_FORTIFY_SOURCE' LDFLAGS='-fsanitize=address -g -fno-common -U_FORTIFY_SOURCE' LIBS='-ldl -lpthread'" + +services: + - docker before_install: - - sudo pip install cpp-coveralls + - docker pull fedora + - export CONTAINER=$(docker run -d fedora sleep 1800) + - docker exec $CONTAINER dnf -y install 'dnf-command(builddep)' + - docker exec $CONTAINER dnf -y builddep libkkc + - docker exec $CONTAINER dnf -y install gettext-devel libtool make which + - docker exec $CONTAINER dnf -y install gcc-c++ redhat-rpm-config + - docker exec $CONTAINER dnf -y install libasan libubsan + - docker exec $CONTAINER dnf -y install vala vala-devel + - docker exec $CONTAINER dnf -y install gnome-common + - docker exec $CONTAINER dnf -y install python-pip + - docker exec $CONTAINER dnf -y install git + - docker exec $CONTAINER useradd user + install: - - if [ "$VALAC" = "valac-0.24" ]; then - sudo add-apt-repository -y ppa:vala-team && - sudo apt-get update -qq && - sudo apt-get install -qq autotools-dev gnome-common gobject-introspection intltool libgee-0.8-dev libgirepository1.0-dev libjson-glib-dev python-dev "$VALAC"; - fi + - docker cp . $CONTAINER:/srcdir + - docker exec $CONTAINER chown -R user /srcdir script: - - wget https://marisa-trie.googlecode.com/files/marisa-0.2.4.tar.gz && - tar xf marisa-0.2.4.tar.gz && - (cd marisa-0.2.4 && - ./configure --prefix=$PWD/../install && - make && make install && - cd bindings/python && - CFLAGS=-I$PWD/../../../install/include LDFLAGS=-L$PWD/../../../install/lib python setup.py build && - python setup.py install --user) - - export PKG_CONFIG_PATH=$PWD/install/lib/pkgconfig - - export LD_LIBRARY_PATH=$PWD/install/lib - - ./autogen.sh --enable-code-coverage && make && touch po/libkkc.pot && make check + - docker exec $CONTAINER su - user sh -c "cd /srcdir && NOCONFIGURE=1 ./autogen.sh" + - docker exec $CONTAINER su - user sh -c "cd /srcdir && ./configure --enable-code-coverage $BUILD_OPTS" + - docker exec $CONTAINER su - user sh -c "cd /srcdir && make V=1 && touch po/libkkc.pot && make check V=1" + +after_failure: + - docker exec $CONTAINER su - user sh -c "cd /srcdir && cat tests/test-suite.log" + after_success: - - coveralls --exclude lib --exclude tests --gcov-options '\-lp' + - if test x"$COVERAGE" = xyes; then docker exec $CONTAINER pip install cpp-coveralls; docker exec -e TRAVIS_JOB_ID="$TRAVIS_JOB_ID" -e TRAVIS_BRANCH="$TRAVIS_BRANCH" $CONTAINER sh -c "cd /srcdir && coveralls --exclude tools --exclude tests --gcov-options '\-lp'"; fi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkkc-0.3.5+git20150522.650f0d6/Makefile.am new/libkkc-0.3.5+git20171220.7d365e1/Makefile.am --- old/libkkc-0.3.5+git20150522.650f0d6/Makefile.am 2015-08-25 10:56:00.000000000 +0200 +++ new/libkkc-0.3.5+git20171220.7d365e1/Makefile.am 2017-12-20 08:09:09.000000000 +0100 @@ -22,7 +22,11 @@ SUBDIRS += docs endif +DIST_SUBDIRS = marisa-glib libkkc tools data tests po docs + GITIGNOREFILES = \ + ABOUT-NLS \ + config.rpath \ INSTALL \ aclocal.m4 \ compile \ @@ -37,6 +41,16 @@ `find "m4" -type f -name "*.m4" ! -name "vala.m4" -print` \ $(top_builddir)/lcov.html/* \ data/rules/*/*.pot \ + po/Makevars.template \ + po/Rules-quot \ + po/boldquot.sed \ + po/[email protected] \ + po/[email protected] \ + po/insert-header.sin \ + po/quot.sed \ + po/remove-potcdate.sed \ + po/remove-potcdate.sin \ + po/stamp-po \ test-driver \ $(NULL) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkkc-0.3.5+git20150522.650f0d6/autogen.sh new/libkkc-0.3.5+git20171220.7d365e1/autogen.sh --- old/libkkc-0.3.5+git20150522.650f0d6/autogen.sh 2015-08-25 10:56:00.000000000 +0200 +++ new/libkkc-0.3.5+git20171220.7d365e1/autogen.sh 2017-12-20 08:09:09.000000000 +0100 @@ -1,25 +1,38 @@ #!/bin/sh # Run this to generate all the initial makefiles, etc. +test -n "$srcdir" || srcdir=$(dirname "$0") +test -n "$srcdir" || srcdir=. -srcdir=`dirname $0` -test -z "$srcdir" && srcdir=. +olddir=$(pwd) -PKG_NAME="libkkc" +cd $srcdir -(test -f $srcdir/configure.ac \ - && test -f $srcdir/README ) || { - echo -n "**Error**: Directory "\`$srcdir\'" does not look like the" - echo " top-level $PKG_NAME directory" - exit 1 +(test -f configure.ac) || { + echo "*** ERROR: Directory '$srcdir' does not look like the top-level project directory ***" + exit 1 } -which gnome-autogen.sh || { - echo "You need to install gnome-common from the GNOME CVS" - exit 1 -} - -ACLOCAL_FLAGS="$ACLOCAL_FLAGS -I m4" -REQUIRED_AUTOMAKE_VERSION=1.11 -REQUIRED_AUTOCONF_VERSION=2.63 +# shellcheck disable=SC2016 +PKG_NAME=libkkc -. gnome-autogen.sh +if [ "$#" = 0 -a "x$NOCONFIGURE" = "x" ]; then + echo "*** WARNING: I am going to run 'configure' with no arguments." >&2 + echo "*** If you wish to pass any to it, please specify them on the" >&2 + echo "*** '$0' command line." >&2 + echo "" >&2 +fi + +autoreconf --verbose --force --install || exit 1 + +cd "$olddir" +if [ "$NOCONFIGURE" = "" ]; then + $srcdir/configure "$@" || exit 1 + + if [ "$1" = "--help" ]; then + exit 0 + else + echo "Now type 'make' to compile $PKG_NAME" || exit 1 + fi +else + echo "Skipping configure process." +fi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkkc-0.3.5+git20150522.650f0d6/configure.ac new/libkkc-0.3.5+git20171220.7d365e1/configure.ac --- old/libkkc-0.3.5+git20150522.650f0d6/configure.ac 2015-08-25 10:56:00.000000000 +0200 +++ new/libkkc-0.3.5+git20171220.7d365e1/configure.ac 2017-12-20 08:09:09.000000000 +0100 @@ -33,7 +33,7 @@ AC_SUBST([KKC_LIBRARY_SUFFIX_U],[AS_TR_SH([$KKC_LIBRARY_SUFFIX])]) dnl Init automake -AM_INIT_AUTOMAKE([1.11.1 parallel-tests]) +AM_INIT_AUTOMAKE([1.11.1 dist-xz no-dist-gzip]) AM_SILENT_RULES([yes]) AM_MAINTAINER_MODE([enable]) AC_GNU_SOURCE @@ -44,7 +44,8 @@ AC_PROG_CC_STDC AC_PROG_CXX AC_PROG_INSTALL -IT_PROG_INTLTOOL +AM_GNU_GETTEXT([external]) +AM_GNU_GETTEXT_VERSION([0.19.8]) dnl Check python for tests AM_PATH_PYTHON @@ -124,7 +125,7 @@ have_valadoc=no if test x$enable_docs = xyes; then # make sure the library is new enough and the program exists - PKG_CHECK_MODULES([VALADOC], [valadoc-1.0 >= $VALADOC_REQUIRED]) + PKG_CHECK_MODULES([VALADOC], [valadoc-0.40 >= $VALADOC_REQUIRED]) AC_PATH_PROG([VALADOC], [valadoc], [:]) AS_IF([test "$VALADOC" != :], have_valadoc=yes) fi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkkc-0.3.5+git20150522.650f0d6/data/rules/kana/rom-kana/default.json new/libkkc-0.3.5+git20171220.7d365e1/data/rules/kana/rom-kana/default.json --- old/libkkc-0.3.5+git20150522.650f0d6/data/rules/kana/rom-kana/default.json 2015-08-25 10:56:00.000000000 +0200 +++ new/libkkc-0.3.5+git20171220.7d365e1/data/rules/kana/rom-kana/default.json 2017-12-20 08:09:09.000000000 +0100 @@ -29,40 +29,70 @@ "^@": ["", "べ"], "^[": ["", "ぺ"], "q": ["", "た", "タ", "た", "タ"], + "Q": ["", "た", "タ", "た", "タ"], "q@": ["", "だ"], + "Q@": ["", "だ"], "w": ["", "て", "テ", "て", "テ"], + "W": ["", "て", "テ", "て", "テ"], "w@": ["", "で"], + "W@": ["", "で"], "e": ["", "い"], "E": ["", "ぃ"], "r": ["", "す", "ス", "す", "ス"], + "R": ["", "す", "ス", "す", "ス"], "r@": ["", "ず"], + "R@": ["", "ず"], "t": ["", "か", "カ", "か", "カ"], + "T": ["", "か", "カ", "か", "カ"], "t@": ["", "が"], + "T@": ["", "が"], "y": ["", "ん"], + "Y": ["", "ん"], "u": ["", "な"], + "U": ["", "な"], "i": ["", "に"], + "I": ["", "に"], "o": ["", "ら"], + "O": ["", "ら"], "p": ["", "せ", "セ", "せ", "セ"], + "P": ["", "せ", "セ", "せ", "セ"], "p@": ["", "ぜ"], + "P@": ["", "ぜ"], "@": ["", "゛"], "[": ["", "゜"], "{": ["", "「"], "a": ["", "ち", "チ", "ち", "チ"], + "A": ["", "ち", "チ", "ち", "チ"], "a@": ["", "ぢ"], + "A@": ["", "ぢ"], "s": ["", "と", "ト", "と", "ト"], + "S": ["", "と", "ト", "と", "ト"], "s@": ["", "ど"], + "S@": ["", "ど"], "d": ["", "し", "シ", "し", "シ"], + "D": ["", "し", "シ", "し", "シ"], "d@": ["", "じ"], + "D@": ["", "じ"], "f": ["", "は", "ハ", "は", "ハ"], + "F": ["", "は", "ハ", "は", "ハ"], "f@": ["", "ば"], + "F@": ["", "ば"], "f[": ["", "ぱ"], + "F[": ["", "ぱ"], "g": ["", "き", "キ", "き", "キ"], + "G": ["", "き", "キ", "き", "キ"], "g@": ["", "ぎ"], + "G@": ["", "ぎ"], "h": ["", "く", "ク", "く", "ク"], + "H": ["", "く", "ク", "く", "ク"], "h@": ["", "ぐ"], + "H@": ["", "ぐ"], "j": ["", "ま"], + "J": ["", "ま"], "k": ["", "の"], + "K": ["", "の"], "l": ["", "り"], + "L": ["", "り"], ";": ["", "れ"], ":": ["", "け", "ケ", "け", "ケ"], ":@": ["", "げ"], @@ -70,18 +100,30 @@ "}": ["", "」"], "z": ["", "つ", "ツ", "つ", "ツ"], "z@": ["", "づ"], + "Z@": ["", "づ"], "Z": ["", "っ"], "x": ["", "さ", "サ", "さ", "サ"], + "X": ["", "さ", "サ", "さ", "サ"], "x@": ["", "ざ"], + "X@": ["", "ざ"], "c": ["", "そ", "ソ", "そ", "ソ"], + "C": ["", "そ", "ソ", "そ", "ソ"], "c@": ["", "ぞ"], + "C@": ["", "ぞ"], "v": ["", "ひ", "ヒ", "ひ", "ヒ"], + "V": ["", "ひ", "ヒ", "ひ", "ヒ"], "v@": ["", "び"], + "V@": ["", "び"], "v[": ["", "ぴ"], + "V[": ["", "ぴ"], "b": ["", "こ", "コ", "こ", "コ"], + "B": ["", "こ", "コ", "こ", "コ"], "b@": ["", "ご"], + "B@": ["", "ご"], "n": ["", "み"], + "N": ["", "み"], "m": ["", "も"], + "M": ["", "も"], ",": ["", "ね"], "<": ["", "、"], ".": ["", "る"], diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkkc-0.3.5+git20150522.650f0d6/libkkc/candidate-list.vala new/libkkc-0.3.5+git20171220.7d365e1/libkkc/candidate-list.vala --- old/libkkc-0.3.5+git20150522.650f0d6/libkkc/candidate-list.vala 2015-08-25 10:56:00.000000000 +0200 +++ new/libkkc-0.3.5+git20171220.7d365e1/libkkc/candidate-list.vala 2017-12-20 08:09:09.000000000 +0100 @@ -122,7 +122,8 @@ } uint get_page_start_cursor_pos (uint pos) { - return (pos / page_size) * page_size; + var page_index = (pos - page_start) / page_size; + return page_index * page_size + page_start; } /** @@ -210,23 +211,33 @@ } } + bool update_cursor_pos (uint pos) { + if (0 <= pos && pos < _candidates.size && pos != _cursor_pos) { + _cursor_pos = (int) pos; + notify_property ("cursor-pos"); + return true; + } + return false; + } + bool cursor_move (int step) { if (_candidates.is_empty || step == 0) return false; + int start = _cursor_pos - (int) page_start; + int total = (int) _candidates.size - (int) page_start; + if (round) { - var pos = (_cursor_pos + step) % _candidates.size; + int pos = (start + step) % total; if (pos < 0) - pos += _candidates.size; - _cursor_pos = pos; - notify_property ("cursor-pos"); - return true; - } else { - var pos = _cursor_pos + step; - if (0 <= pos && pos < _candidates.size) { - _cursor_pos = pos; - notify_property ("cursor-pos"); + pos += total; + if (update_cursor_pos (pos + page_start)) return true; + } else { + var pos = start + step; + if (0 <= pos && pos < total) { + if (update_cursor_pos (pos + page_start)) + return true; } } @@ -239,7 +250,11 @@ * @return `true` if cursor position has changed, `false` otherwise. */ public bool cursor_up () { - return cursor_move (-1); + if (_cursor_pos >= page_start) + return cursor_move (-1); + else if (update_cursor_pos (_cursor_pos - 1)) + return true; + return false; } /** @@ -248,32 +263,35 @@ * @return `true` if cursor position has changed, `false` otherwise */ public bool cursor_down () { - return cursor_move (1); + if (_cursor_pos >= page_start) + return cursor_move (1); + else if (update_cursor_pos (_cursor_pos + 1)) + return true; + return false; } bool page_move (int step) { if (_candidates.is_empty || step == 0) return false; + int start = _cursor_pos - (int) page_start; + int total = (int) _candidates.size - (int) page_start; + if (round) { - var pos = (_cursor_pos + page_size * step) % _candidates.size; + int pos = (start + (int) page_size * step) % total; if (pos < 0) - pos += _candidates.size; - pos = get_page_start_cursor_pos (pos); - if (pos != _cursor_pos) { - _cursor_pos = (int) pos; - notify_property ("cursor-pos"); - return true; + pos += total; + if (pos + (int) page_start < _candidates.size) { + var new_pos = get_page_start_cursor_pos (pos + page_start); + if (update_cursor_pos (new_pos)) + return true; } } else { - var pos = _cursor_pos + page_size * step; - if (0 <= pos && pos < _candidates.size) { - pos = get_page_start_cursor_pos (pos); - if (pos != _cursor_pos) { - _cursor_pos = (int) pos; - notify_property ("cursor-pos"); + var pos = start + (int) page_size * step; + if (0 <= pos && pos < total) { + var new_pos = get_page_start_cursor_pos (pos + page_start); + if (update_cursor_pos (new_pos)) return true; - } } } return false; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkkc-0.3.5+git20150522.650f0d6/libkkc/encoding.vala new/libkkc-0.3.5+git20171220.7d365e1/libkkc/encoding.vala --- old/libkkc-0.3.5+git20150522.650f0d6/libkkc/encoding.vala 2015-08-25 10:56:00.000000000 +0200 +++ new/libkkc-0.3.5+git20171220.7d365e1/libkkc/encoding.vala 2017-12-20 08:09:09.000000000 +0100 @@ -19,15 +19,15 @@ // XXX: we use Vala string to represent byte array, assuming that // it does not contain null element class EncodingConverter : Object, Initable { - static const int BUFSIZ = 4096; - static const string INTERNAL_ENCODING = "UTF-8"; + const int BUFSIZ = 4096; + const string INTERNAL_ENCODING = "UTF-8"; struct EncodingCodingSystemEntry { string key; string value; } - static const EncodingCodingSystemEntry ENCODING_TO_CODING_SYSTEM_RULE[] = { + const EncodingCodingSystemEntry ENCODING_TO_CODING_SYSTEM_RULE[] = { { "UTF-8", "utf-8" }, { "EUC-JP", "euc-jp" }, { "Shift_JIS", "shift_jis" }, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkkc-0.3.5+git20150522.650f0d6/libkkc/key-event-filter.vala new/libkkc-0.3.5+git20171220.7d365e1/libkkc/key-event-filter.vala --- old/libkkc-0.3.5+git20150522.650f0d6/libkkc/key-event-filter.vala 2015-08-25 10:56:00.000000000 +0200 +++ new/libkkc-0.3.5+git20171220.7d365e1/libkkc/key-event-filter.vala 2017-12-20 08:09:09.000000000 +0100 @@ -53,7 +53,7 @@ * @see Rule */ class SimpleKeyEventFilter : KeyEventFilter { - static const uint[] modifier_keyvals = { + const uint[] modifier_keyvals = { Keysyms.Shift_L, Keysyms.Shift_R, Keysyms.Control_L, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkkc-0.3.5+git20150522.650f0d6/libkkc/key-event.vala new/libkkc-0.3.5+git20171220.7d365e1/libkkc/key-event.vala --- old/libkkc-0.3.5+git20150522.650f0d6/libkkc/key-event.vala 2015-08-25 10:56:00.000000000 +0200 +++ new/libkkc-0.3.5+git20171220.7d365e1/libkkc/key-event.vala 2017-12-20 08:09:09.000000000 +0100 @@ -148,7 +148,7 @@ throw new KeyEventFormatError.PARSE_FAILED ( "unknown keyval %s", _name); } - from_x_event (_keyval, 0, _modifiers); + this.from_x_event (_keyval, 0, _modifiers); } /** @@ -192,8 +192,13 @@ // newer valac thinks null in a fixed length array as // an empty string var array = elements.to_array (); + // Change length of strv may make vala no able to free it + // correctly. Save the length and restore it later. + var old_length = array.length; array.length = -1; - return "(" + string.joinv (" ", array) + ")"; + var key_string = "(" + string.joinv (" ", array) + ")"; + array.length = old_length; + return key_string; } else { return _base; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkkc-0.3.5+git20150522.650f0d6/libkkc/keymap.vala new/libkkc-0.3.5+git20171220.7d365e1/libkkc/keymap.vala --- old/libkkc-0.3.5+git20150522.650f0d6/libkkc/keymap.vala 2015-08-25 10:56:00.000000000 +0200 +++ new/libkkc-0.3.5+git20171220.7d365e1/libkkc/keymap.vala 2017-12-20 08:09:09.000000000 +0100 @@ -32,7 +32,7 @@ * Object representing a keymap. */ public class Keymap : Object { - static const KeymapCommandEntry Commands[] = { + const KeymapCommandEntry Commands[] = { { "abort", N_("Abort") }, { "first-segment", N_("First Segment") }, { "last-segment", N_("Last Segment") }, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkkc-0.3.5+git20150522.650f0d6/libkkc/rom-kana-utils.vala new/libkkc-0.3.5+git20171220.7d365e1/libkkc/rom-kana-utils.vala --- old/libkkc-0.3.5+git20150522.650f0d6/libkkc/rom-kana-utils.vala 2015-08-25 10:56:00.000000000 +0200 +++ new/libkkc-0.3.5+git20171220.7d365e1/libkkc/rom-kana-utils.vala 2017-12-20 08:09:09.000000000 +0100 @@ -38,7 +38,7 @@ string? hankaku_katakana; } - static const KanaTableEntry[] KanaTable = { + const KanaTableEntry[] KanaTable = { {'ア', "あ", "ア"}, {'イ', "い", "イ"}, {'ウ', "う", "ウ"}, {'エ', "え", "エ"}, {'オ', "お", "オ"}, {'カ', "か", "カ"}, {'キ', "き", "キ"}, {'ク', "く", "ク"}, {'ケ', "け", "ケ"}, @@ -73,13 +73,13 @@ {'、', "、", "、"}, {'・', "・", "・"}, {'ー', "ー", "ー"} }; - static const KanaTableEntry[] HankakuKatakanaSubstitute = { + const KanaTableEntry[] HankakuKatakanaSubstitute = { {'ヮ', null, "ワ"}, {'ヵ', null, "カ"}, {'ヶ', null, "ケ"} }; - static const string[] WideLatinTable = { + const string[] WideLatinTable = { " ", "!", "”", "#", "$", "%", "&", "’", "(", ")", "*", "+", ",", "−", ".", "/", "0", "1", "2", "3", "4", "5", "6", "7", @@ -94,7 +94,7 @@ "x", "y", "z", "{", "|", "}", "〜" }; - static const string[] KanaRomTable = { + const string[] KanaRomTable = { "x", "a", "x", "i", "x", "u", "x", "e", "x", "o", "k", "g", "k", "g", "k", "g", "k", "g", "k", "g", "s", "z", "s", "z", "s", "z", "s", "z", "s", "z", "t", "d", "t", @@ -126,20 +126,20 @@ return get_okurigana_prefix_for_char (head); } - static const string[] KanjiNumericTable = { + const string[] KanjiNumericTable = { "〇", "一", "二", "三", "四", "五", "六", "七", "八", "九" }; - static const string[] DaijiNumericTable = { + const string[] DaijiNumericTable = { "零", "壱", "弐", "参", "四", "伍", "六", "七", "八", "九" }; - static const string?[] KanjiNumericalPositionTable = { + const string?[] KanjiNumericalPositionTable = { null, "十", "百", "千", "万", null, null, null, "億", null, null, null, "兆", null, null, null, null, "京" }; - static const string?[] DaijiNumericalPositionTable = { + const string?[] DaijiNumericalPositionTable = { null, "拾", "百", "阡", "萬", null, null, null, "億", null, null, null, "兆", null, null, null, null, "京" }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkkc-0.3.5+git20150522.650f0d6/libkkc/rom-kana.vala new/libkkc-0.3.5+git20171220.7d365e1/libkkc/rom-kana.vala --- old/libkkc-0.3.5+git20150522.650f0d6/libkkc/rom-kana.vala 2015-08-25 10:56:00.000000000 +0200 +++ new/libkkc-0.3.5+git20171220.7d365e1/libkkc/rom-kana.vala 2017-12-20 08:09:09.000000000 +0100 @@ -41,7 +41,7 @@ } } - static const string[] PUNCTUATION_RULE = {"。、", ".,", "。,", ".、"}; + const string[] PUNCTUATION_RULE = {"。、", ".,", "。,", ".、"}; class RomKanaNode : Object { internal RomKanaEntry? entry; @@ -410,7 +410,7 @@ * @return `true` if uc is in a valid range, `false` otherwise */ public bool is_valid (unichar uc) { - if (uc > 256) + if (uc >= 256) return false; uint8 mask = (uint8) (1 << (uc % 8)); return (current_node.valid[uc / 8] & mask) != 0 || diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkkc-0.3.5+git20150522.650f0d6/po/Makevars new/libkkc-0.3.5+git20171220.7d365e1/po/Makevars --- old/libkkc-0.3.5+git20150522.650f0d6/po/Makevars 1970-01-01 01:00:00.000000000 +0100 +++ new/libkkc-0.3.5+git20171220.7d365e1/po/Makevars 2017-12-20 08:09:09.000000000 +0100 @@ -0,0 +1,78 @@ +# Makefile variables for PO directory in any package using GNU gettext. + +# Usually the message domain is the same as the package name. +DOMAIN = $(PACKAGE) + +# These two variables depend on the location of this directory. +subdir = po +top_builddir = .. + +# These options get passed to xgettext. +XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ + +# This is the copyright holder that gets inserted into the header of the +# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding +# package. (Note that the msgstr strings, extracted from the package's +# sources, belong to the copyright holder of the package.) Translators are +# expected to transfer the copyright for their translations to this person +# or entity, or to disclaim their copyright. The empty string stands for +# the public domain; in this case the translators are expected to disclaim +# their copyright. +COPYRIGHT_HOLDER = Daiki Ueno + +# This tells whether or not to prepend "GNU " prefix to the package +# name that gets inserted into the header of the $(DOMAIN).pot file. +# Possible values are "yes", "no", or empty. If it is empty, try to +# detect it automatically by scanning the files in $(top_srcdir) for +# "GNU packagename" string. +PACKAGE_GNU = no + +# This is the email address or URL to which the translators shall report +# bugs in the untranslated strings: +# - Strings which are not entire sentences, see the maintainer guidelines +# in the GNU gettext documentation, section 'Preparing Strings'. +# - Strings which use unclear terms or require additional context to be +# understood. +# - Strings which make invalid assumptions about notation of date, time or +# money. +# - Pluralisation problems. +# - Incorrect English spelling. +# - Incorrect formatting. +# It can be your email address, or a mailing list address where translators +# can write to without being subscribed, or the URL of a web page through +# which the translators can contact you. +MSGID_BUGS_ADDRESS = + +# This is the list of locale categories, beyond LC_MESSAGES, for which the +# message catalogs shall be used. It is usually empty. +EXTRA_LOCALE_CATEGORIES = + +# This tells whether the $(DOMAIN).pot file contains messages with an 'msgctxt' +# context. Possible values are "yes" and "no". Set this to yes if the +# package uses functions taking also a message context, like pgettext(), or +# if in $(XGETTEXT_OPTIONS) you define keywords with a context argument. +USE_MSGCTXT = no + +# These options get passed to msgmerge. +# Useful options are in particular: +# --previous to keep previous msgids of translated messages, +# --quiet to reduce the verbosity. +MSGMERGE_OPTIONS = + +# These options get passed to msginit. +# If you want to disable line wrapping when writing PO files, add +# --no-wrap to MSGMERGE_OPTIONS, XGETTEXT_OPTIONS, and +# MSGINIT_OPTIONS. +MSGINIT_OPTIONS = + +# This tells whether or not to regenerate a PO file when $(DOMAIN).pot +# has changed. Possible values are "yes" and "no". Set this to no if +# the POT file is checked in the repository and the version control +# program ignores timestamps. +PO_DEPENDS_ON_POT = no + +# This tells whether or not to forcibly update $(DOMAIN).pot and +# regenerate PO files on "make dist". Possible values are "yes" and +# "no". Set this to no if the POT file and PO files are maintained +# externally. +DIST_DEPENDS_ON_UPDATE_PO = no diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkkc-0.3.5+git20150522.650f0d6/po/POTFILES.skip new/libkkc-0.3.5+git20171220.7d365e1/po/POTFILES.skip --- old/libkkc-0.3.5+git20150522.650f0d6/po/POTFILES.skip 2015-08-25 10:56:00.000000000 +0200 +++ new/libkkc-0.3.5+git20171220.7d365e1/po/POTFILES.skip 1970-01-01 01:00:00.000000000 +0100 @@ -1,2 +0,0 @@ -tools/kkc.c -tools/server.c diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkkc-0.3.5+git20150522.650f0d6/tests/candidate-list.vala new/libkkc-0.3.5+git20171220.7d365e1/tests/candidate-list.vala --- old/libkkc-0.3.5+git20150522.650f0d6/tests/candidate-list.vala 2015-08-25 10:56:00.000000000 +0200 +++ new/libkkc-0.3.5+git20171220.7d365e1/tests/candidate-list.vala 2017-12-20 08:09:09.000000000 +0100 @@ -35,9 +35,9 @@ candidates.page_start = 2; candidates.page_size = 3; + candidates.add (new Kkc.Candidate ("a", false, "0")); candidates.add (new Kkc.Candidate ("a", false, "1")); candidates.add (new Kkc.Candidate ("a", false, "2")); - candidates.add (new Kkc.Candidate ("a", false, "3")); assert (!candidates.page_visible); candidates.cursor_down (); @@ -45,21 +45,25 @@ candidates.cursor_down (); assert (candidates.page_visible); + candidates.add (new Kkc.Candidate ("a", false, "3")); candidates.add (new Kkc.Candidate ("a", false, "4")); - candidates.add (new Kkc.Candidate ("a", false, "5")); candidates.round = false; assert (!candidates.page_down ()); assert (!candidates.page_up ()); + candidates.add (new Kkc.Candidate ("a", false, "5")); + candidates.add (new Kkc.Candidate ("a", false, "6")); + candidates.add (new Kkc.Candidate ("a", false, "7")); + candidates.round = true; assert (candidates.page_down ()); - assert (candidates.cursor_pos == 0); + assert (candidates.cursor_pos == 5); assert (candidates.page_up ()); - assert (candidates.cursor_pos == 3); + assert (candidates.cursor_pos == 2); assert (candidates.select_at (1)); - assert (candidates.cursor_pos == 4); + assert (candidates.cursor_pos == 3); candidates.first (); assert (candidates.next ()); @@ -68,8 +72,9 @@ assert (candidates.cursor_pos == 0); assert (candidates.next ()); assert (candidates.next ()); + assert (candidates.cursor_pos == 2); assert (candidates.next ()); - assert (candidates.cursor_pos == 0); + assert (candidates.cursor_pos == 5); } } ++++++ libkkc-gettext.patch ++++++ Index: libkkc/configure.ac =================================================================== --- libkkc.orig/configure.ac +++ libkkc/configure.ac @@ -45,7 +45,7 @@ AC_PROG_CC_STDC AC_PROG_CXX AC_PROG_INSTALL AM_GNU_GETTEXT([external]) -AM_GNU_GETTEXT_VERSION([0.19.8]) +AM_GNU_GETTEXT_VERSION([0.18.3]) dnl Check python for tests AM_PATH_PYTHON ++++++ libkkc-public.patch ++++++ Index: libkkc/libkkc/state.vala =================================================================== --- libkkc.orig/libkkc/state.vala +++ libkkc/libkkc/state.vala @@ -24,7 +24,7 @@ namespace Kkc { const double DECODER_MIN_PATH_COST = -3.0; const int DECODER_NBEST = 20; - class State : Object { + public class State : Object { internal Type handler_type; InputMode _input_mode; [CCode(notify = false)] @@ -211,7 +211,7 @@ namespace Kkc { return keymap.lookup_key (key); } - internal State (LanguageModel model, DictionaryList dictionaries) { + public State (LanguageModel model, DictionaryList dictionaries) { this.model = model; this.decoder = Decoder.create (model); this.dictionaries = dictionaries; Index: libkkc/libkkc/encoding.vala =================================================================== --- libkkc.orig/libkkc/encoding.vala +++ libkkc/libkkc/encoding.vala @@ -18,7 +18,7 @@ namespace Kkc { // XXX: we use Vala string to represent byte array, assuming that // it does not contain null element - class EncodingConverter : Object, Initable { + public class EncodingConverter : Object, Initable { const int BUFSIZ = 4096; const string INTERNAL_ENCODING = "UTF-8"; @@ -67,7 +67,7 @@ namespace Kkc { return true; } - internal EncodingConverter (string encoding) throws Error { + public EncodingConverter (string encoding) throws Error { Object (encoding: encoding); init (null); } Index: libkkc/libkkc/key-event-filter.vala =================================================================== --- libkkc.orig/libkkc/key-event-filter.vala +++ libkkc/libkkc/key-event-filter.vala @@ -52,7 +52,7 @@ namespace Kkc { * * @see Rule */ - class SimpleKeyEventFilter : KeyEventFilter { + public class SimpleKeyEventFilter : KeyEventFilter { const uint[] modifier_keyvals = { Keysyms.Shift_L, Keysyms.Shift_R, @@ -90,7 +90,7 @@ namespace Kkc { * * @see Rule */ - class KanaKeyEventFilter : SimpleKeyEventFilter { + public class KanaKeyEventFilter : SimpleKeyEventFilter { /** * {@inheritDoc} */ Index: libkkc/libkkc/utils.vala =================================================================== --- libkkc.orig/libkkc/utils.vala +++ libkkc/libkkc/utils.vala @@ -101,7 +101,7 @@ namespace Kkc { } } - abstract class KeyEventUtils : Object { + public abstract class KeyEventUtils : Object { static KeysymEntry *bsearch_keysyms ( KeysymEntry *memory, long start_offset, Index: libkkc/libkkc/template.vala =================================================================== --- libkkc.orig/libkkc/template.vala +++ libkkc/libkkc/template.vala @@ -16,13 +16,13 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ namespace Kkc { - internal interface Template : Object { + public interface Template : Object { public abstract string source { get; construct set; } public abstract bool okuri { get; construct set; } public abstract string expand (string text); } - class SimpleTemplate : Object, Template { + public class SimpleTemplate : Object, Template { public string source { get; construct set; } public bool okuri { get; construct set; } @@ -36,7 +36,7 @@ namespace Kkc { } } - class OkuriganaTemplate : Object, Template { + public class OkuriganaTemplate : Object, Template { public string source { get; construct set; } public bool okuri { get; construct set; } @@ -60,4 +60,4 @@ namespace Kkc { return text; } } -} \ No newline at end of file +} Index: libkkc/libkkc/numeric-template.vala =================================================================== --- libkkc.orig/libkkc/numeric-template.vala +++ libkkc/libkkc/numeric-template.vala @@ -18,7 +18,7 @@ using Gee; namespace Kkc { - class NumericTemplate : Object, Template { + public class NumericTemplate : Object, Template { ArrayList<int> numerics = new ArrayList<int> (); public string source { get; construct set; } Index: libkkc/libkkc/expression.vala =================================================================== --- libkkc.orig/libkkc/expression.vala +++ libkkc/libkkc/expression.vala @@ -191,7 +191,7 @@ namespace Kkc { } } - abstract class Expression : Object { + public abstract class Expression : Object { public static string eval (string text) { if (text.has_prefix ("(")) { var reader = new ExpressionReader ();
