diff options
author | Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org> | 2020-09-04 00:00:00 +0000 |
---|---|---|
committer | Mike Gilbert <floppym@gentoo.org> | 2020-09-04 22:02:38 -0400 |
commit | 8db33aa98fdfe4b898c2a07f19aba69c1832d977 (patch) | |
tree | 9dad3cbcc5a20fd2ba4c75d61bb7a8251563a2e9 /app-i18n | |
parent | net-mail/smtptools: Stabilize 0.2.3-r1 amd64, #739564 (diff) | |
download | gentoo-8db33aa98fdfe4b898c2a07f19aba69c1832d977.tar.gz gentoo-8db33aa98fdfe4b898c2a07f19aba69c1832d977.tar.bz2 gentoo-8db33aa98fdfe4b898c2a07f19aba69c1832d977.zip |
app-i18n/ibus-sunpinyin: Version bump (2.0.4_pre20200306162733).
Bug: https://bugs.gentoo.org/695010
Bug: https://bugs.gentoo.org/695022
Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Diffstat (limited to 'app-i18n')
4 files changed, 178 insertions, 0 deletions
diff --git a/app-i18n/ibus-sunpinyin/Manifest b/app-i18n/ibus-sunpinyin/Manifest index 016fef2a7157..910333931280 100644 --- a/app-i18n/ibus-sunpinyin/Manifest +++ b/app-i18n/ibus-sunpinyin/Manifest @@ -1 +1,2 @@ +DIST sunpinyin-2.0.4_pre20200306162733.tar.gz 547519 BLAKE2B 6e0e4457217d7b85221cab15173f588a5c7c039208a8f6cd48ed5fb21c5b5eae2f4616d6fddbf6eff8a006193097de26c866d5385d4602f41059ee8d7e52a2d5 SHA512 e8cf73aeca8dcbc7dd6f51f034a9a0363201bc14a814800e071c987933935b0e8039aa84178a6bd1cba1c7dee4b25b2d5546e78ea683e68e8981afea48fdab33 DIST sunpinyin-3.0.0_rc1.tar.gz 547138 BLAKE2B 682e733241d690d1fef8ce452c497a894c5ab61bf5298c1f292ce3a25a681d594744db43ebd51b3e59274cce0e47a1bce15a793f2c20e2998915c3432f2a7c32 SHA512 c9d4936de5835a7f02e52c5b32bf1a42d76bf7588449aaa813f3df7ab2d72f3ca0f4e18f74a60be4860f0724b5e05cbe567c67e6f3150b0e71b23b3a9002fc5e diff --git a/app-i18n/ibus-sunpinyin/files/ibus-sunpinyin-2.0.4_pre20200306162733-python-3.patch b/app-i18n/ibus-sunpinyin/files/ibus-sunpinyin-2.0.4_pre20200306162733-python-3.patch new file mode 100644 index 000000000000..25b11f0a8009 --- /dev/null +++ b/app-i18n/ibus-sunpinyin/files/ibus-sunpinyin-2.0.4_pre20200306162733-python-3.patch @@ -0,0 +1,85 @@ +https://github.com/sunpinyin/sunpinyin/issues/111 + +--- /wrapper/ibus/setup/main.py ++++ /wrapper/ibus/setup/main.py +@@ -63,7 +63,7 @@ + class Logger: + @staticmethod + def pr(message): +- print >> sys.stderr, message ++ print(message, file=sys.stderr) + + + class Option(object): +@@ -73,10 +73,10 @@ + """ + config = ibus.Bus().get_config() + __wrappers = { +- type(True): glib.Variant.new_boolean, +- type(1): glib.Variant.new_int32, +- type('str'): glib.Variant.new_string, +- type([]): glib.Variant.new_strv, ++ bool: glib.Variant.new_boolean, ++ int: glib.Variant.new_int32, ++ str: glib.Variant.new_string, ++ list: glib.Variant.new_strv, + } + + def __init__(self, name, default): +@@ -258,7 +258,7 @@ + def read_config(self): + if not self.saved_pairs: + self.saved_pairs = self.read() +- keys = set([pair.split(':')[0] for pair in self.saved_pairs]) ++ keys = {pair.split(':')[0] for pair in self.saved_pairs} + for opt in self.options: + opt.is_enabled = (opt.key() in keys) + # throw away unknown pair +@@ -445,28 +445,28 @@ + # TODO: the UI should looks like a virtual keyboard, + # user are allowed to choose the mappings to all punctuation keys. + def __init__(self): +- mappings = [MappingInfo('togglebutton1', [('`',None), ('~',u'~')]), ++ mappings = [MappingInfo('togglebutton1', [('`', None), ('~', '~')]), + MappingInfo('togglebutton2', []), +- MappingInfo('togglebutton3', [('2',None), ('@',u'@')]), +- MappingInfo('togglebutton4', [('3',None), ('#',u'#')]), +- MappingInfo('togglebutton5', [('4',None), ('$',u'¥' )]), +- MappingInfo('togglebutton6', [('5',None), ('%',u'%')]), +- MappingInfo('togglebutton7', [('6',None), ('^',u'…')]), +- MappingInfo('togglebutton8', [('7',None), ('&',u'&')]), +- MappingInfo('togglebutton9', [('8',None), ('*',u'*')]), +- MappingInfo('togglebutton10', [('9',None), ('*',u'(')]), +- MappingInfo('togglebutton11', [('0',None), ('*',u')')]), +- MappingInfo('togglebutton12', [('-',u'-'), ('_',u'——')]), +- MappingInfo('togglebutton13', [('=',u'='), ('+',u'+')]), +- MappingInfo('togglebutton14', [('\\',None), ('|',u'‖')]), +- MappingInfo('togglebutton27', [('[',u'〔'), ('{',u'{')]), +- MappingInfo('togglebutton28', [(']',u'〕'), ('}',u'}')]), ++ MappingInfo('togglebutton3', [('2', None), ('@', '@')]), ++ MappingInfo('togglebutton4', [('3', None), ('#', '#')]), ++ MappingInfo('togglebutton5', [('4', None), ('$', '¥' )]), ++ MappingInfo('togglebutton6', [('5', None), ('%', '%')]), ++ MappingInfo('togglebutton7', [('6', None), ('^', '…')]), ++ MappingInfo('togglebutton8', [('7', None), ('&', '&')]), ++ MappingInfo('togglebutton9', [('8', None), ('*', '*')]), ++ MappingInfo('togglebutton10', [('9', None), ('*', '(')]), ++ MappingInfo('togglebutton11', [('0', None), ('*', ')')]), ++ MappingInfo('togglebutton12', [('-', '-'), ('_', '——')]), ++ MappingInfo('togglebutton13', [('=', '='), ('+', '+')]), ++ MappingInfo('togglebutton14', [('\\', None), ('|', '‖')]), ++ MappingInfo('togglebutton27', [('[', '〔'), ('{', '{')]), ++ MappingInfo('togglebutton28', [(']', '〕'), ('}', '}')]), + MappingInfo('togglebutton39', []), + MappingInfo('togglebutton40', []), +- MappingInfo('togglebutton50', [(',',None), ('<',u'〈')]), +- MappingInfo('togglebutton51', [('.',u'·'), ('>',u'〉')]), +- MappingInfo('togglebutton52', [('/',u'/'), ('?',None)])] +- #'\'',(u'‘',u'’'), ++ MappingInfo('togglebutton50', [(',', None), ('<', '〈')]), ++ MappingInfo('togglebutton51', [('.', '·'), ('>', '〉')]), ++ MappingInfo('togglebutton52', [('/', '/'), ('?', None)])] ++ #'\'', ('‘', '’'), + MultiCheckDialog.__init__(self, ui_name="punctmapping", + config_name="General/PunctMapping/Mappings", + mappings=mappings, diff --git a/app-i18n/ibus-sunpinyin/ibus-sunpinyin-2.0.4_pre20200306162733.ebuild b/app-i18n/ibus-sunpinyin/ibus-sunpinyin-2.0.4_pre20200306162733.ebuild new file mode 100644 index 000000000000..a73dd516a5ce --- /dev/null +++ b/app-i18n/ibus-sunpinyin/ibus-sunpinyin-2.0.4_pre20200306162733.ebuild @@ -0,0 +1,89 @@ +# Copyright 2009-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" +PYTHON_COMPAT=(python{3_6,3_7,3_8}) + +inherit python-single-r1 scons-utils toolchain-funcs + +MY_PN="sunpinyin" +MY_P="${MY_PN}-${PV}" + +if [[ "${PV}" == "9999" ]]; then + inherit git-r3 + + EGIT_REPO_URI="https://github.com/sunpinyin/sunpinyin" +elif [[ "${PV}" == *_pre* ]]; then + SUNPINYIN_GIT_REVISION="f39c195db08661e894017507842991a1ef70bedf" +fi + +DESCRIPTION="Chinese SunPinyin engine for IBus" +HOMEPAGE="https://github.com/sunpinyin/sunpinyin" +if [[ "${PV}" == "9999" ]]; then + SRC_URI="" +elif [[ "${PV}" == *_pre* ]]; then + SRC_URI="https://github.com/sunpinyin/${MY_PN}/archive/${SUNPINYIN_GIT_REVISION}.tar.gz -> ${MY_P}.tar.gz" +else + SRC_URI="https://github.com/sunpinyin/${MY_PN}/archive/v${PV/_/-}.tar.gz -> ${MY_P}.tar.gz" +fi + +LICENSE="|| ( CDDL LGPL-2.1 )" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="+gui" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +BDEPEND="sys-devel/gettext + virtual/pkgconfig" +DEPEND="app-i18n/ibus + ~app-i18n/sunpinyin-${PV} + dev-libs/glib:2 + virtual/libintl" +RDEPEND="${DEPEND} + app-i18n/sunpinyin-data + gui? ( + ${PYTHON_DEPS} + $(python_gen_cond_dep ' + app-i18n/ibus[introspection,python,${PYTHON_MULTI_USEDEP}] + dev-python/pygobject[${PYTHON_MULTI_USEDEP}] + ') + x11-libs/gtk+:3[introspection] + )" + +if [[ "${PV}" == *_pre* ]]; then + S="${WORKDIR}/${MY_PN}-${SUNPINYIN_GIT_REVISION}" +elif [[ "${PV}" != "9999" ]]; then + S="${WORKDIR}/${MY_PN}-${PV/_/-}" +fi + +PATCHES=( + "${FILESDIR}/${PN}-2.0.4_pre20200306162733-python-3.patch" +) + +src_prepare() { + default + sed -e "/^exec python /s/python/${EPYTHON}/" -i wrapper/ibus/setup/ibus-setup-sunpinyin.in || die + + if ! use gui; then + sed \ + -e "s:'setup/ibus-setup-sunpinyin'::" \ + -e "/env\.Alias('install-libexec'/s:, setup_target::" \ + -i wrapper/ibus/SConstruct || die + fi +} + +src_configure() { + tc-export CXX +} + +src_compile() { + escons -C wrapper/ibus \ + --prefix="${EPREFIX}/usr" \ + --libdir="${EPREFIX}/usr/$(get_libdir)" \ + --libexecdir="${EPREFIX}/usr/libexec" \ + --datadir="${EPREFIX}/usr/share" +} + +src_install() { + escons -C wrapper/ibus --install-sandbox="${D}" install +} diff --git a/app-i18n/ibus-sunpinyin/metadata.xml b/app-i18n/ibus-sunpinyin/metadata.xml index 271ef4abaa80..db1b8135a9fd 100644 --- a/app-i18n/ibus-sunpinyin/metadata.xml +++ b/app-i18n/ibus-sunpinyin/metadata.xml @@ -5,6 +5,9 @@ <email>cjk@gentoo.org</email> <name>Cjk</name> </maintainer> + <use> + <flag name="gui">Install graphical user interface tool (ibus-setup-sunpinyin)</flag> + </use> <upstream> <remote-id type="github">sunpinyin/sunpinyin</remote-id> </upstream> |