From baf93d562f41e0478cbf7c860623daa0a7e2d69a5b078b2a22abb57dd994a85a Mon Sep 17 00:00:00 2001 From: Marguerite Su Date: Mon, 6 Aug 2012 15:49:17 +0000 Subject: [PATCH 1/5] Accepting request 130122 from home:MargueriteSu:branches:M17N add Dependency: libpresage-devel, which is already in Factory OBS-URL: https://build.opensuse.org/request/show/130122 OBS-URL: https://build.opensuse.org/package/show/M17N/fcitx?expand=0&rev=39 --- fcitx-4.2.4.1.tar.bz2 | 3 --- fcitx.spec | 1 + fix-fcitx-4.2.4.1-memory-overflow.patch | 25 ------------------------- 3 files changed, 1 insertion(+), 28 deletions(-) delete mode 100644 fcitx-4.2.4.1.tar.bz2 delete mode 100644 fix-fcitx-4.2.4.1-memory-overflow.patch diff --git a/fcitx-4.2.4.1.tar.bz2 b/fcitx-4.2.4.1.tar.bz2 deleted file mode 100644 index 97300b7..0000000 --- a/fcitx-4.2.4.1.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:27d21fc2a37255219b0ff643be72614f3a3314b46c9d7a263e965b096efded52 -size 904487 diff --git a/fcitx.spec b/fcitx.spec index 9eac68b..5686ac5 100644 --- a/fcitx.spec +++ b/fcitx.spec @@ -50,6 +50,7 @@ BuildRequires: desktop-file-utils BuildRequires: libxkbfile-devel %endif BuildRequires: enchant-devel +BuildRequires: libpresage-devel BuildRequires: iso-codes-devel BuildRequires: pango-devel %if 0%{?suse_version} >= 1110 || 0%{?fedora_version} diff --git a/fix-fcitx-4.2.4.1-memory-overflow.patch b/fix-fcitx-4.2.4.1-memory-overflow.patch deleted file mode 100644 index 7f2a092..0000000 --- a/fix-fcitx-4.2.4.1-memory-overflow.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff -urN fcitx-4.2.4.1.orig/src/module/xkb/xkb.c fcitx-4.2.4.1/src/module/xkb/xkb.c ---- fcitx-4.2.4.1.orig/src/module/xkb/xkb.c 2012-06-16 22:27:00.087029656 +0800 -+++ fcitx-4.2.4.1/src/module/xkb/xkb.c 2012-06-16 22:29:18.941293740 +0800 -@@ -197,8 +197,7 @@ - xkbParentDir = strdup("/usr/share/X11"); - } - -- rulesFile = fcitx_utils_malloc0(sizeof(char) * (1 + strlen(xkbParentDir) + strlen(rulesName) + strlen("/xkb/rules/"))); -- sprintf(rulesFile, "%s/xkb/rules/%s.xml", xkbParentDir, rulesName); -+ asprintf(&rulesFile, "%s/xkb/rules/%s.xml", xkbParentDir, rulesName); - fcitx_utils_free(xkbParentDir); - } - -diff -urN fcitx-4.2.4.1.orig/src/ui/classic/skin.c fcitx-4.2.4.1/src/ui/classic/skin.c ---- fcitx-4.2.4.1.orig/src/ui/classic/skin.c 2012-06-16 22:27:00.090029620 +0800 -+++ fcitx-4.2.4.1/src/ui/classic/skin.c 2012-06-16 22:30:39.775283176 +0800 -@@ -216,7 +216,7 @@ - const char* fallbackChainNoFallback[] = { buf }; - const char* fallbackChainPanel[] = { buf, "skin/default" }; - const char* fallbackChainTray[] = { "imicon" }; -- const char* fallbackChainPanelIMIcon[] = { buf, "imicon" }; -+ const char* fallbackChainPanelIMIcon[] = { buf, "imicon", "skin/default" }; - - HASH_FIND_STR(*imageTable, name, image); - if (image != NULL) { From cbe42e10c003f73810d4c941cbedc9552803bb19a84abd3e1a502e73ac0e0e47 Mon Sep 17 00:00:00 2001 From: Marguerite Su Date: Thu, 16 Aug 2012 14:35:09 +0000 Subject: [PATCH 2/5] OBS-URL: https://build.opensuse.org/package/show/M17N/fcitx?expand=0&rev=40 --- fcitx.changes | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/fcitx.changes b/fcitx.changes index c664926..e4045f6 100644 --- a/fcitx.changes +++ b/fcitx.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Aug 16 22:34:07 UTC 2012 - i@marguerite.su + +- add Dependency: libpresage-devel, which will provide word prediction + for keyboard users. + ------------------------------------------------------------------- Sun Jul 22 00:13:01 UTC 2012 - i@marguerite.su From 2dc512b0b5bce2877e8d8be9d4da12e1201448b28cdea7c47a37d96bd66b1007 Mon Sep 17 00:00:00 2001 From: Marguerite Su Date: Sat, 25 Aug 2012 19:29:35 +0000 Subject: [PATCH 3/5] Accepting request 131604 from home:MargueriteSu:branches:M17N OBS-URL: https://build.opensuse.org/request/show/131604 OBS-URL: https://build.opensuse.org/package/show/M17N/fcitx?expand=0&rev=41 --- fcitx.changes | 5 +++++ fcitx.spec | 47 +++++++++++++++++++++++++++++++++++++++++ openSUSE-default.tar.gz | 3 +++ 3 files changed, 55 insertions(+) create mode 100644 openSUSE-default.tar.gz diff --git a/fcitx.changes b/fcitx.changes index e4045f6..fb4a19f 100644 --- a/fcitx.changes +++ b/fcitx.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sun Aug 26 01:15:41 UTC 2012 - i@marguerite.su + +- add openSUSE-branding theme for 12.2 + ------------------------------------------------------------------- Thu Aug 16 22:34:07 UTC 2012 - i@marguerite.su diff --git a/fcitx.spec b/fcitx.spec index 5686ac5..6696cf4 100644 --- a/fcitx.spec +++ b/fcitx.spec @@ -35,6 +35,7 @@ Source5: pinyin.tar.gz Source6: table.tar.gz # for fedora auto-start Source7: xinput-fcitx +SOurce8: openSUSE-default.tar.gz #FIX-FOR-UPSTREAM i@marguerite.su - dont download online Patch1: fix_fcitx_googlecode_resolv_error.patch BuildRequires: cairo-devel @@ -86,6 +87,7 @@ Requires: %{name}-qt4 = %{version}-%{release} %if 0%{?suse_version} Recommends: %{name}-pinyin = %{version}-%{release} Recommends: %{name}-table = %{version}-%{release} +Recommends: %{name}-branding-openSUSE = %{version} %endif %if 0%{?fedora_version} Requires(post): %{_sbindir}/alternatives @@ -306,6 +308,36 @@ Requires: lib%{name}%{libver} = %{version}-%{release} %description pinyin-tools Tools to convert txt or scel(sougou pinyin data format) pinyin sheets to fcitx match lists. +%package branding-openSUSE +Summary: openSUSE default Skin for Fcitx +Group: System/I18n/Chinese +Requires: %{name} = %{version}-%{release} +%if 0%{?suse_version} >= 1140 || 0%{?fedora_version} +BuildArch: noarch +%endif +Provides: fcitx-branding = %{version} +Conflicts: otherproviders(fcitx-branding) + +%description branding-openSUSE +openSUSE default skin for Fcitx + +You can either use this package or download from kde-look.org using knewstaff in fcitx-config-kde4. + +%package branding-upstream +Summary: Fcitx Upstream default Skin +Group: System/I18n/Chinese +Requires: %{name} = %{version}-%{release} +%if 0%{?suse_version} >= 1140 || 0%{?fedora_version} +BuildArch: noarch +%endif +Provides: fcitx-branding = %{version} +Conflicts: otherproviders(fcitx-branding) + +%description branding-upstream +Fcitx default skin. + +You can either use this package or download from kde-look.org using knewstaff in fcitx-config-kde4. + %package skin-classic Summary: Fcitx Classic Skin Group: System/I18n/Chinese @@ -373,6 +405,11 @@ make DESTDIR=%{buildroot} install cd .. +# install openSUSE branding +pushd %{buildroot}%{_datadir}/%{name}/skin/ +tar -xzf %{SOURCE8} +popd + # fix desktop file sed -i "s/x-fskin/x-fskin;/" %{buildroot}%{_datadir}/applications/fcitx-skin-installer.desktop @@ -555,6 +592,8 @@ update-desktop-database %{_datadir}/applications &>/dev/null || %exclude %{_libdir}/%{name}/fcitx-pinyin.so %exclude %{_libdir}/%{name}/fcitx-table.so %exclude %{_libdir}/%{name}/fcitx-qw.so +%exclude %{_datadir}/%{name}/skin/openSUSE-default +%exclude %{_datadir}/%{name}/skin/default %exclude %{_datadir}/%{name}/skin/classic %exclude %{_datadir}/%{name}/skin/dark @@ -668,6 +707,14 @@ update-desktop-database %{_datadir}/applications &>/dev/null || %{_mandir}/man1/mb2org.1.gz %{_mandir}/man1/scel2org.1.gz +%files branding-openSUSE +%defattr(-,root,root) +%{_datadir}/%{name}/skin/openSUSE-default + +%files branding-upstream +%defattr(-,root,root) +%{_datadir}/%{name}/skin/default + %files skin-classic %defattr(-,root,root) %{_datadir}/%{name}/skin/classic diff --git a/openSUSE-default.tar.gz b/openSUSE-default.tar.gz new file mode 100644 index 0000000..b374be2 --- /dev/null +++ b/openSUSE-default.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:730a6968fa9eaf88e5ec14be5f66a2d3a3c94835ac00c8bd3e49af3e2c914a1c +size 358500 From f607a353927cd055a7d38bf13e5fc9790c33b018a2a71d26277f56b82bb77939 Mon Sep 17 00:00:00 2001 From: Marguerite Su Date: Sun, 26 Aug 2012 14:18:01 +0000 Subject: [PATCH 4/5] Accepting request 131703 from home:MargueriteSu:branches:M17N OBS-URL: https://build.opensuse.org/request/show/131703 OBS-URL: https://build.opensuse.org/package/show/M17N/fcitx?expand=0&rev=42 --- fcitx.spec | 2 +- openSUSE-default.tar.gz | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fcitx.spec b/fcitx.spec index 6696cf4..21695af 100644 --- a/fcitx.spec +++ b/fcitx.spec @@ -35,7 +35,7 @@ Source5: pinyin.tar.gz Source6: table.tar.gz # for fedora auto-start Source7: xinput-fcitx -SOurce8: openSUSE-default.tar.gz +Source8: openSUSE-default.tar.gz #FIX-FOR-UPSTREAM i@marguerite.su - dont download online Patch1: fix_fcitx_googlecode_resolv_error.patch BuildRequires: cairo-devel diff --git a/openSUSE-default.tar.gz b/openSUSE-default.tar.gz index b374be2..ba09ce7 100644 --- a/openSUSE-default.tar.gz +++ b/openSUSE-default.tar.gz @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:730a6968fa9eaf88e5ec14be5f66a2d3a3c94835ac00c8bd3e49af3e2c914a1c -size 358500 +oid sha256:214eece3d83697699542b4f9c8324b3193019c9f2e8eb27223065fe586766551 +size 1838938 From c71108c2e48c1424fa2e787249fb46f02e3fe55736d8546747962780a688f8c2 Mon Sep 17 00:00:00 2001 From: Marguerite Su Date: Mon, 27 Aug 2012 13:38:04 +0000 Subject: [PATCH 5/5] Accepting request 131766 from home:MargueriteSu:branches:M17N OBS-URL: https://build.opensuse.org/request/show/131766 OBS-URL: https://build.opensuse.org/package/show/M17N/fcitx?expand=0&rev=43 --- fcitx-README.suse | 32 ++++++++++++++-------------- fcitx.spec | 46 ++++++++++++++++++++--------------------- xim.fcitx.suse.template | 23 +++++++++++---------- 3 files changed, 51 insertions(+), 50 deletions(-) diff --git a/fcitx-README.suse b/fcitx-README.suse index eac011c..938c954 100644 --- a/fcitx-README.suse +++ b/fcitx-README.suse @@ -9,7 +9,7 @@ The number "30" makes fcitx have priority over other input-method (e.g 50-scim o If you prefer not using fcitx, mv 30-fcitx to 80-fcitx (for example). Or see 2. 2.If for some reason can't start fcitx when login Xwindow -There is another input-method who has higher priority then fcitx (e.g 10-oxim) +There is another input-method who has higher priority than fcitx (e.g 10-oxim) You can edit ~/.xim, see ~/.xim.template for more informations. Or edit ~/.profile, add export INPUT_METHOD="fcitx" @@ -18,32 +18,32 @@ copy this file to ~/.xim, then you can use fcitx next login X. 3.You want to use your own input-method other than system setting (1)System setting: -Edit /etc/sysconfig/language , set INPUT_METHOD="scim-bridge", or whatever you want,Make sure your start-up script is put in /etc/X11/xim.d/ with same name ypu mention. +Edit /etc/sysconfig/language , set INPUT_METHOD="fcitx", or whatever you want,Make sure your start-up script is put in /etc/X11/xim.d/ with same name ypu mention. (2)For specific language setting: Link a start-up script in /etc/X11/xim.d/ to your locale with a higher priority (smaller number), eg -ln -s /etc/X11/xim.d/scim-bridge /etc/X11/xim.d/zh_CN/20-scim-bridge +ln -s /etc/X11/xim.d/fcitx /etc/X11/xim.d/zh_CN/20-fcitx (3)Personal setting: Edit ~/.profile add -export INPUT_METHOD="scim-bridge" or whatever script in /etc/X11/xim.d/ +export INPUT_METHOD="fcitx" or whatever script in /etc/X11/xim.d/ or white your own ~/.xim, see ~/.xim.template for more informations. 4.Bug report or any suggestion to -http://code.google.com/p/fcitx/ +https://github.com/fcitx/ Chinese: -1.当您使用的语系是en 或zh_CN时,SuSE 会自动启动fcitx -启动的script是/etc/X11/xim.d/YOUR-LOCALE/30-fcitx,这是一个到上层目录fcitx的连结 -"30"这个数字使他的优先顺序高于90-xcin及50-scim +1.当您使用的语系是 en 或 zh_CN 时,SuSE 会自动启动 fcitx +启动的脚本是 /etc/X11/xim.d/YOUR-LOCALE/30-fcitx,这是一个到上层目录 fcitx 的连结 +"30"这个数字使他的优先顺序高于 90-xcin 及 50-scim 如果您不喜欢这个顺序,修改连结的名称为(例如:80-fcitx),或参考2. -2.重新登入X后,如果不能用fcitx...可能是: -有别的输入法的优先顺序高于fcitx(例如:10-oxim) -您可以编辑~/.xim,请参考~/.xim.template -安装fcitx后,会有一个范本:/usr/share/doc/packages/fcitx/xim.fcitx.suse.template -将这个档案复制到您的~/.xim,当您下次登入X时就可以使用fcitx了 -或编辑~/.profile,加入 +2.重新登入 X 后,如果不能用 fcitx...可能是: +有别的输入法的优先顺序高于 fcitx (例如:10-oxim) +您可以编辑 ~/.xim,请参考 ~/.xim.template +安装 fcitx 后,会有一个范本:/usr/share/doc/packages/fcitx/xim.fcitx.suse.template +将这个档案复制到您的 ~/.xim,当您下次登入X时就可以使用 fcitx 了 +或编辑 ~/.profile,加入 export INPUT_METHOD="fcitx" 3.如果您想要自己选择输入法而非使用系统设定 @@ -52,11 +52,11 @@ export INPUT_METHOD="fcitx" 请注意你的启动程序必须位于 /etc/X11/xim.d/,并和您指定的名称相同 (2)针对特定语言: 将您的启动程序连结到你的语系中,并前置较高的优先顺序(较小数字),例如 -ln -s /etc/X11/xim.d/fcitx /etc/X11/xim.d/zh_CN/20-scim-bridge +ln -s /etc/X11/xim.d/fcitx /etc/X11/xim.d/zh_CN/30-fcitx (3)个人设定: 编辑 ~/.profile 加入 export INPUT_METHOD="fcitx" 或其他在 /etc/X11/xim.d/ 的启动程序 或自行编写启动程序 ~/.xim,请参考 ~/.xim.template 5.臭虫回报或建议请至 -http://code.google.com/p/fcitx/ +https://github.com/fcitx/ diff --git a/fcitx.spec b/fcitx.spec index 21695af..a0369fe 100644 --- a/fcitx.spec +++ b/fcitx.spec @@ -87,7 +87,7 @@ Requires: %{name}-qt4 = %{version}-%{release} %if 0%{?suse_version} Recommends: %{name}-pinyin = %{version}-%{release} Recommends: %{name}-table = %{version}-%{release} -Recommends: %{name}-branding-openSUSE = %{version} +Requires: %{name}-branding = %{version} %endif %if 0%{?fedora_version} Requires(post): %{_sbindir}/alternatives @@ -308,35 +308,25 @@ Requires: lib%{name}%{libver} = %{version}-%{release} %description pinyin-tools Tools to convert txt or scel(sougou pinyin data format) pinyin sheets to fcitx match lists. +%if 0%{?suse_version} + %package branding-openSUSE Summary: openSUSE default Skin for Fcitx Group: System/I18n/Chinese Requires: %{name} = %{version}-%{release} -%if 0%{?suse_version} >= 1140 || 0%{?fedora_version} +%if 0%{?suse_version} >= 1140 BuildArch: noarch %endif -Provides: fcitx-branding = %{version} -Conflicts: otherproviders(fcitx-branding) +Provides: %{name}-branding = %{version} +Conflicts: otherproviders(%{name}-branding) +Supplements: packageand(%{name}:branding-openSUSE) %description branding-openSUSE openSUSE default skin for Fcitx You can either use this package or download from kde-look.org using knewstaff in fcitx-config-kde4. -%package branding-upstream -Summary: Fcitx Upstream default Skin -Group: System/I18n/Chinese -Requires: %{name} = %{version}-%{release} -%if 0%{?suse_version} >= 1140 || 0%{?fedora_version} -BuildArch: noarch %endif -Provides: fcitx-branding = %{version} -Conflicts: otherproviders(fcitx-branding) - -%description branding-upstream -Fcitx default skin. - -You can either use this package or download from kde-look.org using knewstaff in fcitx-config-kde4. %package skin-classic Summary: Fcitx Classic Skin @@ -405,10 +395,15 @@ make DESTDIR=%{buildroot} install cd .. +%if 0%{?suse_version} # install openSUSE branding pushd %{buildroot}%{_datadir}/%{name}/skin/ tar -xzf %{SOURCE8} popd +pushd %{buildroot}%{_datadir}/%{name}/configdesc +sed -i 's/DefaultValue=default/DefaultValue=openSUSE-default/' %{buildroot}%{_datadir}/%{name}/configdesc/fcitx-classic-ui.desc +popd +%endif # fix desktop file sed -i "s/x-fskin/x-fskin;/" %{buildroot}%{_datadir}/applications/fcitx-skin-installer.desktop @@ -432,14 +427,18 @@ desktop-file-install --add-category="System" --delete-original --dir=%{buildroot %if 0%{?suse_version} mkdir %{buildroot}%{_docdir} mv %{buildroot}%{_datadir}/doc/%{name}/ %{buildroot}%{_docdir} +cp -r %{SOURCE2} %{buildroot}%{_docdir}/%{name}/ +cp -r %{SOURCE3} %{buildroot}%{_docdir}/%{name}/ cp -r AUTHORS %{buildroot}%{_docdir}/%{name}/ cp -r ChangeLog %{buildroot}%{_docdir}/%{name}/ %endif %if 0%{?fedora_version} mkdir %{buildroot}%{_docdir}/packages/ mv %{buildroot}%{_datadir}/doc/%{name}/ %{buildroot}%{_docdir}/packages/ -cp -r AUTHORS %{buildroot}%{_docdir}/packages/%{name}/ -cp -r ChangeLog %{buildroot}%{_docdir}/packages/%{name}/ +cp -r %{SOURCE2} %{buildroot}%{_docdir}/packages/%{name}/ +cp -r %{SOURCE3} %{buildroot}%{_docdir}/packages/%{name}/ +cp -r AUTHORS %{buildroot}%{_docdir}/%{name}/ +cp -r ChangeLog %{buildroot}%{_docdir}/%{name}/ %endif # create autostart @@ -592,8 +591,9 @@ update-desktop-database %{_datadir}/applications &>/dev/null || %exclude %{_libdir}/%{name}/fcitx-pinyin.so %exclude %{_libdir}/%{name}/fcitx-table.so %exclude %{_libdir}/%{name}/fcitx-qw.so +%if 0%{?suse_version} %exclude %{_datadir}/%{name}/skin/openSUSE-default -%exclude %{_datadir}/%{name}/skin/default +%endif %exclude %{_datadir}/%{name}/skin/classic %exclude %{_datadir}/%{name}/skin/dark @@ -707,13 +707,13 @@ update-desktop-database %{_datadir}/applications &>/dev/null || %{_mandir}/man1/mb2org.1.gz %{_mandir}/man1/scel2org.1.gz +%if 0%{?suse_version} + %files branding-openSUSE %defattr(-,root,root) %{_datadir}/%{name}/skin/openSUSE-default -%files branding-upstream -%defattr(-,root,root) -%{_datadir}/%{name}/skin/default +%endif %files skin-classic %defattr(-,root,root) diff --git a/xim.fcitx.suse.template b/xim.fcitx.suse.template index 265320d..11a3d70 100644 --- a/xim.fcitx.suse.template +++ b/xim.fcitx.suse.template @@ -6,17 +6,18 @@ #if any program can't input Chinese, try export LC_CTYPE=zh_CN.UTF-8, e.g #export LC_CTYPE=zh_CN.UTF-8 -export XMODIFIERS="@im=fcitx" -export GTK_IM_MODULE=xim -export QT_IM_SWITCHER=imsw-multi -export QT_IM_MODULE=xim -fcitx -d -## Note for FCITX version >= 4.1 +## For FCITX 3 series and 4.0 Only +#export XMODIFIERS="@im=fcitx" +#export GTK_IM_MODULE=xim +#export QT_IM_SWITCHER=imsw-multi +#export QT_IM_MODULE=xim +#fcitx -d + +## For FCITX version >= 4.1 #Since FCITX 4.1, you can use fcitx itself (besides xim) as the immodule,so the following code might work better (fcitx-gtk2/3, fcitx-qt must be installed), especially when you are using gnome3. -#export XMODIFIERS="@im=fcitx" -#export GTK_IM_MODULE=fcitx -#export QT_IM_MODULE=fcitx -#fcitx -d -# +export XMODIFIERS="@im=fcitx" +export GTK_IM_MODULE=fcitx +export QT_IM_MODULE=fcitx +fcitx -d \ No newline at end of file