Date: Monday, June 2, 2014 @ 09:50:53 Author: fyan Revision: 112446 upgpkg: ibus-table 1.7.0-1
- new upstream version - seems to break table engines, so goes in testing first Added: ibus-table/trunk/109872fdb45dc625906e0039efc0897dd9c64ca5.patch ibus-table/trunk/sgml_fix.patch Modified: ibus-table/trunk/PKGBUILD Deleted: ibus-table/trunk/fix-self-update_property.patch ------------------------------------------------+ 109872fdb45dc625906e0039efc0897dd9c64ca5.patch | 85 +++++++++++++++++++++++ PKGBUILD | 26 ++++--- fix-self-update_property.patch | 53 -------------- sgml_fix.patch | 24 ++++++ 4 files changed, 125 insertions(+), 63 deletions(-) Added: 109872fdb45dc625906e0039efc0897dd9c64ca5.patch =================================================================== --- 109872fdb45dc625906e0039efc0897dd9c64ca5.patch (rev 0) +++ 109872fdb45dc625906e0039efc0897dd9c64ca5.patch 2014-06-02 07:50:53 UTC (rev 112446) @@ -0,0 +1,85 @@ +diff --git a/engine/main.py b/engine/main.py +index 782ad51..dff0c27 100644 +--- a/engine/main.py ++++ b/engine/main.py +@@ -254,6 +254,9 @@ def main(): + _symbol = SubElement (_engine, 'symbol') + _symbol.text = _sq_db.ime_properties.get('symbol') + ++ _symbol = SubElement (_engine, 'symbol') ++ _symbol.text = _sq_db.get_ime_property ('symbol') ++ + _desc = SubElement (_engine, 'description') + _desc.text = _sq_db.ime_properties.get('description') + +diff --git a/engine/tabsqlitedb.py b/engine/tabsqlitedb.py +index b46d63a..d690cf8 100644 +--- a/engine/tabsqlitedb.py ++++ b/engine/tabsqlitedb.py +@@ -146,6 +146,7 @@ class tabsqlitedb: + print('Error while initializing database.') + # create IME property table + self.db.executescript('CREATE TABLE IF NOT EXISTS main.ime (attr TEXT, val TEXT);') ++<<<<<<< HEAD + # Initalize missing attributes in the ime table with some + # default values, they should be updated using the attributes + # found in the source when creating a system database with +@@ -208,6 +209,58 @@ class tabsqlitedb: + default_properties=self._default_ime_attributes) + # shared variables in this class: + self._mlen = int(self.ime_properties.get("max_key_length")) ++======= ++ # make sure we have values in ime table. ++ if not self.db.execute('SELECT val FROM main.ime \ ++ WHERE attr="name";').fetchall(): ++ ime_keys={'name':'', ++ 'name.zh_cn':'', ++ 'name.zh_hk':'', ++ 'name.zh_tw':'', ++ 'author':'somebody', ++ 'uuid':'%s' % uuid.uuid4(), ++ 'serial_number':'%s' % time.strftime('%Y%m%d'), ++ 'icon':'ibus-table.svg', ++ 'license':'LGPL', ++ 'languages':'', ++ 'language_filter':'', ++ 'valid_input_chars':'abcdefghijklmnopqrstuvwxyz', ++ 'max_key_length':'4', ++ # 'commit_keys':'space', ++ # 'forward_keys':'Return', ++ 'select_keys':'1,2,3,4,5,6,7,8,9,0', ++ 'page_up_keys':'Page_Up,minus', ++ 'page_down_keys':'Page_Down,equal', ++ 'status_prompt':'', ++ 'def_full_width_punct':'TRUE', ++ 'def_full_width_letter':'FALSE', ++ 'user_can_define_phrase':'FALSE', ++ 'pinyin_mode':'FALSE', ++ 'dynamic_adjust':'FALSE', ++ 'auto_select':'false', ++ 'auto_commit':'false', ++ #'no_check_chars':u'', ++ 'description':'A IME under IBus Table', ++ 'layout':'us', ++ 'symbol':'', ++ 'rules':'', ++ #'rules':'ce2:p11+p12+p21+p22;ce3:p11+p21+p22+p31;ca4:p11+p21+p31+p41'} ++ 'least_commit_length':'0', ++ 'start_chars':'', ++ 'orientation':'1', ++ 'always_show_lookup':'true' ++ # we use this entry for those IME, which don't ++ # have rules to build up phrase, but still need ++ # auto commit to preedit ++ } ++ # inital the attribute in ime table, which should be updated from mabiao ++ for _name in ime_keys: ++ sqlstr = 'INSERT INTO main.ime (attr,val) VALUES (?,?);' ++ self.db.execute( sqlstr, (_name,ime_keys[_name]) ) ++ # share variables in this class: ++ self._mlen = int ( self.get_ime_property ("max_key_length") ) ++ # for chinese ++>>>>>>> master + self._is_chinese = self.is_chinese() + self.user_can_define_phrase = self.ime_properties.get('user_can_define_phrase') + if self.user_can_define_phrase: Modified: PKGBUILD =================================================================== --- PKGBUILD 2014-06-02 07:49:36 UTC (rev 112445) +++ PKGBUILD 2014-06-02 07:50:53 UTC (rev 112446) @@ -5,27 +5,33 @@ # Contributor: Daniel J Griffiths <ghost1...@archlinux.us> pkgname=ibus-table -pkgver=1.5.0 -pkgrel=3 +pkgver=1.7.0 +pkgrel=1 pkgdesc='IM Engine framework for table-based input methods, such as ZhengMa, WuBi, ErBi, CangJie and so on' arch=('any') url="http://code.google.com/p/ibus/" license=('LGPL') -makedepends=('git') -depends=('python2-pyenchant' 'ibus' 'aspell-en') +makedepends=('git' 'docbook2x' 'docbook-sgml') +depends=('python-pyenchant' 'ibus' 'aspell-en') source=("git+https://github.com/kaio/ibus-table.git#tag=$pkgver" - fix-self-update_property.patch) + sgml_fix.patch + 109872fdb45dc625906e0039efc0897dd9c64ca5.patch) sha512sums=('SKIP' - 'ecb1f89ff946309314789aee4b5eb0749a18e881700482df64d1da30ddd438bb115c814fbd67c6c063c6cfdd28a3882aaf6dfdd291e651315ff6f7b58ce5f3ad') + '930cd45e9687295159c44d5d4133e99a2259fb8f2ed51675b55b18ca59acb410144689a2d51b052b7bbcbe061f8135ebd511898658d1c71e7004303df969c880' + '0f008848fcc59c91764c7b52d0e022a686c9980b317cd711d57fa1d7504b78fd1d71a1d61c18f88e045238541dfd152dd78605cd54337c511a8e0a3bf90c67c5') -build() { +prepare() { cd ${pkgname} - # python2 fix - find -type f -exec sed -i -e 's_exec python_exec python2_' -e 's_^#!.*/usr/bin/python_#!/usr/bin/python2_' -e 's_^#!.*/usr/bin/env.*python_#!/usr/bin/env python2_' {} \; + patch -p1 -i ../sgml_fix.patch - patch -p1 -i "$srcdir/fix-self-update_property.patch" + # Revert broken commit + patch -R -p1 -i ../109872fdb45dc625906e0039efc0897dd9c64ca5.patch +} +build() { + cd $pkgname + PYTHON=/usr/bin/python2 ./autogen.sh \ --prefix=/usr \ --libexecdir=/usr/lib/ibus Deleted: fix-self-update_property.patch =================================================================== --- fix-self-update_property.patch 2014-06-02 07:49:36 UTC (rev 112445) +++ fix-self-update_property.patch 2014-06-02 07:50:53 UTC (rev 112446) @@ -1,53 +0,0 @@ -From 573da2ededdb96dc4f6ef6b515a43f416b183e7a Mon Sep 17 00:00:00 2001 -From: Mike FABIAN <mfab...@redhat.com> -Date: Mon, 4 Feb 2013 19:00:08 +0100 -Subject: [PATCH] Call self.update_property(self._cmode_property) only when the - table is Chinese -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -If self.update_property(self._cmode_property) is called for tables -which are not Chinese, like translit.txt (LANGUAGES = ru_RU) -or ipa-x-sampa.txt (LANGUAGES=other), these input methods don’t work -because then there is no _cmode_property. Fails then with the error: - -fail to create engine ipa-x-sampa -Traceback (most recent call last): - File "/usr/share/ibus-table/engine/factory.py", line 90, in do_create_engine - + str(self.engine_id), self.dbdict[name]) - File "/usr/share/ibus-table/engine/table.py", line 1165, in __init__ - - File "/usr/share/ibus-table/engine/table.py", line 1173, in reset - self._update_ui () - File "/usr/share/ibus-table/engine/table.py", line 1235, in _init_properties - - File "/usr/share/ibus-table/engine/table.py", line 1291, in _refresh_properties - -AttributeError: 'tabengine' object has no attribute '_cmode_property' -Traceback (most recent call last): - File "/usr/share/ibus-table/engine/factory.py", line 98, in do_create_engine - raise Exception("Can not create engine %s" % engine_name) -Exception: Can not create engine ipa-x-sampa - -I caused this problem when porting to GObjectIntrospection. ---- - engine/table.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/engine/table.py b/engine/table.py -index e171949..6c2ef98 100644 ---- a/engine/table.py -+++ b/engine/table.py -@@ -1287,7 +1287,7 @@ def _refresh_properties (self): - self._set_property(self._cmode_property, 'tcb-mode.svg', _('Traditional Chinese First Big Charset Mode'), _('Switch to Big Charset Mode')) - elif self._editor._chinese_mode == 4: - self._set_property(self._cmode_property, 'cb-mode.svg', _('Big Chinese Mode'), _('Switch to Simplified Chinese Mode')) -- self.update_property(self._cmode_property) -+ self.update_property(self._cmode_property) - - def _set_property (self, property, icon, label, tooltip): - property.set_icon ( u'%s%s' % (self._icon_dir, icon ) ) --- -1.8.1.6 - Added: sgml_fix.patch =================================================================== --- sgml_fix.patch (rev 0) +++ sgml_fix.patch 2014-06-02 07:50:53 UTC (rev 112446) @@ -0,0 +1,24 @@ +diff --git a/engine/Makefile.am b/engine/Makefile.am +index 1334876..1836439 100644 +--- a/engine/Makefile.am ++++ b/engine/Makefile.am +@@ -21,6 +21,7 @@ + + DOC2MAN = docbook2man + SGML = ibus-table-createdb.sgml ++XML = ibus-table-createdb.xml + BUILT_MANS = ibus-table-createdb.1 + man_MANS = $(BUILT_MANS) + +@@ -65,8 +66,9 @@ MAINTAINERCLEANFILES = \ + + ${man_MANS}: ${SGML} + $(AM_V_GEN) $(RM) $@; \ +- $(DOC2MAN) ${SGML}; \ +- $(RM) manpage.* ++ SGML_CATALOG_FILES=/etc/sgml/catalog sgml2xml -xlower -xid ${SGML} > ${XML}; \ ++ $(DOC2MAN) ${XML}; \ ++ $(RM) manpage.* ${XML} + + table.xml: table.xml.in + ( \