Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package mozc for openSUSE:Factory checked in at 2022-03-04 00:17:23 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/mozc (Old) and /work/SRC/openSUSE:Factory/.mozc.new.1958 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "mozc" Fri Mar 4 00:17:23 2022 rev:40 rq:958594 version:2.26.4660.102 Changes: -------- --- /work/SRC/openSUSE:Factory/mozc/mozc.changes 2022-02-13 19:51:14.510244524 +0100 +++ /work/SRC/openSUSE:Factory/.mozc.new.1958/mozc.changes 2022-03-04 00:17:52.740288235 +0100 @@ -1,0 +2,27 @@ +Sat Feb 26 13:36:19 UTC 2022 - Fuminobu Takeyama <[email protected]> + +- Upstream update to 2.26.4660.102 + * Fix the description of half-width tilde + * New feature to customize the initial input mode + * Qt5 based candidate window (renderer) + * Add larger size PNG and SVG icons + * Fixed issues on the Emacs client #421, #497 +- Update Fcitx4/5 mozc to the latest +- Add Fcitx5 mo files +- Update README.SUSE +- Switch the build system to Bazel +- Update bundled protobuf to v3.19.3 lined statically +- Update abseil-cpp to 20211102.0 +- Add icons from material-design-icons +- Add fcitx-mozc-bazel-build.patch +- Use gcc8 for Leap 15 because <filesystem> is now required +- Drop patches due to build system change + * mozc-ninja-verbose-build.patch + * mozc-build-gcc.patch + * build-with-libstdc++.patch +- Add add-sha256sum-for-zipcode-archives.patch + * to allow offline build +- Drop ibus-qt5-hide_preedit_text-workaround.patch + * fixed in Qt side + +------------------------------------------------------------------- Old: ---- abseil-cpp-20200923.3.zip build-with-libstdc++.patch fcitx-mozc.tar.xz gyp-e87d37d.tar.xz ibus-qt5-hide_preedit_text-workaround.patch mozc-2.26.4276.102.tar.xz mozc-build-gcc.patch mozc-ninja-verbose-build.patch protobuf-v3.5.2.tar.gz New: ---- abseil-cpp-20211102.0.tar.gz add-sha256sum-for-zipcode-archives.patch add-sha256sum-for-zipcode-archives.patch.in fcitx-mozc-b423557b.tar.xz fcitx-mozc-bazel-build.patch material-design-icons.tar.xz mozc-2.26.4660.102.tar.xz protobuf-v3.19.3.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ mozc.spec ++++++ --- /var/tmp/diff_new_pack.XDFzXA/_old 2022-03-04 00:17:54.628288633 +0100 +++ /var/tmp/diff_new_pack.XDFzXA/_new 2022-03-04 00:17:54.632288634 +0100 @@ -46,79 +46,87 @@ %define ibus_mozc_path %{_libdir}/ibus-mozc/ibus-engine-mozc %define ibus_mozc_icon_path %{_datadir}/ibus-mozc/product_icon.png %define document_dir %{_docdir}/ibus-mozc -%define use_libprotobuf 1 +%define use_libprotobuf 0 +%define bz_cachdir %{_sourcedir}/BAZEL_CACHE +%define makebazelcache() mkdir -p %{bz_cachdir}/content_addressable/sha256/%{?2:%2}%{?!2:$(sha256sum %1 | cut -f 1 -d ' ')}/; cp %1 %{bz_cachdir}/content_addressable/sha256/%{?2:%2}%{?!2:$(sha256sum %1 | cut -f 1 -d ' ')}/file ; Name: mozc -Version: 2.26.4276.102 +Version: 2.26.4660.102 Release: 0 Summary: Mozc - Japanese Input Method for Chromium OS, Mac and Linux -License: BSD-3-Clause AND SUSE-Public-Domain AND Apache-2.0 +License: Apache-2.0 AND BSD-3-Clause AND SUSE-Public-Domain Group: System/I18n/Japanese ExcludeArch: ppc ppc64 s390 s390x URL: https://github.com/google/mozc # Run ./make_archive.sh to make tar.xz removing third party files Source0: %{name}-%{version}.tar.xz Source1: README.SUSE - -# gyp is not included from 1.11.1522.102 -# License: BSD-3-Clause -# git clone https://chromium.googlesource.com/external/gyp -Source3: gyp-e87d37d.tar.xz -# Source4: ibus-setup-mozc-jp.desktop.in # # svn export http://japanese-usage-dictionary.googlecode.com/svn/trunk/@r10 # japanese-usage-dictionary # License: BSD-2-Clause Source5: japanese_usage_dictionary-r10.tar.xz -# protobuf +# protobuf (without third party code) # License: BSD-3-Clause # -# Use static protobuf, which is recommended when protobuf is used from a C++ application -# Using protobuf >= 3.6 requires to update Mozc source -# https://github.com/protocolbuffers/protobuf/archive/v3.5.2.tar.gz -Source6: protobuf-v3.5.2.tar.gz +# Bazel requires static protobuf +# https://github.com/protocolbuffers/protobuf/archive/refs/tags/v3.19.3.tar.gz +Source6: protobuf-v3.19.3.tar.gz # abseil cpp # License: Apache-2.0 -# https://github.com/abseil/abseil-cpp/archive/20200923.3.zip -Source7: abseil-cpp-20200923.3.zip +# https://github.com/abseil/abseil-cpp/archive/refs/tags/20211102.0.tar.gz +Source7: abseil-cpp-20211102.0.tar.gz # # jigyosyo.zip and ken_all.zip are zip-code--address data provided by # Japan Post Co., Ltd. # License: SUSE-Public-Domain +# Run ./make_archive.sh to download the latest files Source10: jigyosyo.zip Source11: ken_all.zip +# material design icons +# License: Apache-2.0 +Source12: material-design-icons.tar.xz # # add fcitx as mozc module # License: BSD-3-Clause # https://github.com/fcitx/mozc/tree/fcitx/src/unix/fcitx{,5} -Source20: fcitx-mozc.tar.xz +# Run ./make_archive.sh to make tar.xz +%if %{with_fcitx4} || %{with_fcitx5} +Source20: fcitx-mozc-b423557b.tar.xz Source21: fcitx-mozc-icons.tar.gz +Patch20: fcitx-mozc-bazel-build.patch +%endif # A script for making a source tar.xz archive -Source99: make_archive.sh +Source100: make_archive.sh +Source101: add-sha256sum-for-zipcode-archives.patch.in # PATCH-FEATURE-OPENSUSE [email protected] Patch1: ibus-provide-layout-variations.patch -# PATCH-FIX-UPSTREAM [email protected] -Patch2: mozc-ninja-verbose-build.patch - -# PATCH-FIX-OPENSUSE [email protected] -# workaround for the Qt5 bug (boo#947013) -Patch6: ibus-qt5-hide_preedit_text-workaround.patch - -# PATCH-FIX-OPENSUSE mozc-build-gcc.patch bsc#990844 [email protected] -- Portng mozc-build-gcc.patch to force mozc build with gcc. -Patch7: mozc-build-gcc.patch -# PATCH-FIX-OPENSUSE build-with-libstdc++.patch [email protected] -- Use libstdc++ instead of libc++ -Patch8: build-with-libstdc++.patch # PATCH-FIX-OPENSUSE fcitx5-mozc-fix.patch [email protected] -- Fix config of fcitx5-mozc Patch9: fcitx5-mozc-fix.patch - -BuildRequires: ninja >= 1.4 +# PATCH-FIX-OPENSUSE add-sha256sum-for-zipcode-archives.patch [email protected] -- to avoid download +# generated by ./make_archive.sh +Patch10: add-sha256sum-for-zipcode-archives.patch + +BuildRequires: bazel +BuildRequires: bazel-apple-support-source +BuildRequires: bazel-rules-apple-source +BuildRequires: bazel-rules-cc-source +BuildRequires: bazel-rules-java-source +BuildRequires: bazel-rules-proto-source +BuildRequires: bazel-rules-python-source +BuildRequires: bazel-rules-swift-source +BuildRequires: bazel-skylib-source +BuildRequires: bazel-workspaces +%if 0%{?suse_version} == 1500 +BuildRequires: gcc8-c++ +%endif %if %{use_libprotobuf} BuildRequires: protobuf-devel %endif -BuildRequires: python3 -BuildRequires: python3-six +#BuildRequires: python3 +#BuildRequires: python3-six BuildRequires: unzip BuildRequires: update-desktop-files BuildRequires: zlib-devel @@ -145,8 +153,9 @@ %package -n ibus-mozc-candidate-window Summary: An optional candidate window for ibus-mozc Group: System/I18n/Japanese -BuildRequires: gtk2-devel -BuildRequires: libglib-2_0-0 +BuildRequires: pkgconfig(Qt5Core) +BuildRequires: pkgconfig(Qt5Gui) +BuildRequires: pkgconfig(Qt5Widgets) Requires: ibus-mozc = %{version} Provides: locale(ibus:ja) @@ -200,23 +209,16 @@ # extract fcitx-mozc %if %{with_fcitx4} || %{with_fcitx5} tar xvf %{SOURCE20} -%if !%{with_fcitx4} -rm -rf src/unix/fcitx -%endif -%if !%{with_fcitx5} -rm -rf src/unix/fcitx5 -%endif +%patch20 -p1 +#patch21 -p1 %endif %patch1 -p1 -%patch2 -p1 cp %{SOURCE1} . # install third_party files cd src/third_party -# gyp -tar xvf %{SOURCE3} # japanese_usage_dictionary tar xvf %{SOURCE5} # protobuf @@ -225,79 +227,103 @@ tar xvf %{SOURCE6} -C protobuf --strip-components 1 %endif # abseil -unzip %{SOURCE7} -mv abseil-cpp-20200923.3 abseil-cpp +tar xvf %{SOURCE7} +mv abseil-cpp-20211102.0 abseil-cpp cd ../.. -cd src -%patch6 -p1 -%patch7 -p1 -cd .. - -%patch8 -p1 %if %{with_fcitx5} %patch9 -p1 %endif +%patch10 -p1 -# fix installation path +# fix installation, library and header path sed -e 's|@libdir@|%{_libdir}|g' %{SOURCE4} > ibus-setup-mozc-jp.desktop +sed -i -e 's|lib/x86_64-linux-gnu|%{_lib}|g' src/BUILD.ibus.bazel + +sed -i -e 's|^\(LINUX_MOZC_DOCUMENT_DIR = \).*|\1 "%{_docdir}/%{name}"|' src/config.bzl +sed -i -e 's|^\(LINUX_MOZC_SERVER_DIR = \).*|\1 "%{_libdir}/mozc"|' src/config.bzl +sed -i -e 's|^\(IBUS_MOZC_PATH = \).*|\1 "%{_libdir}/ibus-mozc/ibus-engine-mozc"|' src/config.bzl +sed -i -e 's|^\(QT_BASE_PATH = \).*|\1 "/usr/include/qt5"|' src/config.bzl +sed -i -e 's|^\(QT_BIN_PATH = \).*|\1 "%{_libdir}/qt5/bin/"|' src/config.bzl # prepare zip code dictionary -unzip -d src/data/dictionary_oss %{SOURCE10} -unzip -d src/data/dictionary_oss %{SOURCE11} +%makebazelcache %{SOURCE10} +%makebazelcache %{SOURCE11} -cd src/data/dictionary_oss -PYTHONPATH="${PYTHONPATH}:../../" \ - python3 ../../dictionary/gen_zip_code_seed.py \ - --zip_code=KEN_ALL.CSV --jigyosyo=JIGYOSYO.CSV >> dictionary09.txt -cd ../../../ +# icons +tar xvf %{SOURCE12} +%makebazelcache material-design-icons/dictionary.png +%makebazelcache material-design-icons/dictionary.svg +%makebazelcache material-design-icons/properties.png +%makebazelcache material-design-icons/properties.svg +%makebazelcache material-design-icons/tool.png +%makebazelcache material-design-icons/tool.svg %build -%define target Release -export PATH=%{_builddir}/bin:$PATH -export QTDIR=%{_libdir}/qt5 - -# -Wall from RPM_OPT_FLAGS overrides -Wno-* options from gyp. -# gyp inserts -Wall to the head of release_extra_flags. -flags=${RPM_OPT_FLAGS/-Wall/} - -export GYP_DEFINES='ibus_mozc_path=%{ibus_mozc_path} ibus_mozc_icon_path=%{ibus_mozc_icon_path} use_libprotobuf=%{use_libprotobuf} document_dir=%{document_dir} release_extra_cflags="'$flags'"' cd src -python3 build_mozc.py gyp --server_dir=%{server_dir} -python3 build_mozc.py build -c %{target} \ - unix/ibus/ibus.gyp:ibus_mozc \ + +%if 0%{?suse_version} == 1500 +export CC=gcc-8 +export CXX=g++-8 +%endif + +for f in %{optflags}; do + dist_opt_flags="$dist_opt_flags --copt $f" +done + +# Be careful bazel cache is not cleared by `obs build` +# --output_base might help + +bazel build package \ %if %{with_fcitx4} - unix/fcitx/fcitx.gyp:fcitx-mozc \ + "//unix/fcitx:fcitx-mozc.so" \ %endif %if %{with_fcitx5} - unix/fcitx5/fcitx5.gyp:fcitx5-mozc \ + "//unix/fcitx5:fcitx5-mozc.so" \ %endif - server/server.gyp:mozc_server \ - unix/emacs/emacs.gyp:mozc_emacs_helper \ - gui/gui.gyp:mozc_tool \ - renderer/renderer.gyp:mozc_renderer + --repository_cache=%{bz_cachdir} \ + --config oss_linux \ + -c opt \ + $dist_opt_flags \ + --force_pic \ + --jobs %{?jobs} \ + --strip=never \ + --sandbox_debug \ + --verbose_failures \ + -s \ + --override_repository="rules_cc=/usr/src/bazel-rules-cc" \ + --override_repository="rules_java=/usr/src/bazel-rules-java" \ + --override_repository="rules_python=/usr/src/bazel-rules-python" \ + --override_repository="rules_proto=/usr/src/bazel-rules-proto" \ + --override_repository="build_bazel_rules_apple=/usr/src/bazel-rules-apple" \ + --override_repository="build_bazel_apple_support=/usr/src/bazel-apple-support" \ + --override_repository="build_bazel_rules_swift=/usr/src/bazel-rules-swift" \ + --override_repository="bazel_skylib=/usr/src/bazel-skylib" \ + --override_repository="zlib=/usr/share/bazel-workspaces/zlib" \ + +bazel shutdown -%define output_dir src/out_linux/%{target} +%define output_dir src/bazel-bin + +%if %{with_fcitx4} +cd unix/fcitx +./gen_fcitx_mozc_i18n.sh ../../../%{output_dir}/unix/fcitx/po +%endif +%if %{with_fcitx5} +cd unix/fcitx5 +../fcitx/gen_fcitx_mozc_i18n.sh ../../../%{output_dir}/unix/fcitx5/po +%endif %install %if %{install_mozc} install -m755 -d %{buildroot}%{_libdir}/ibus-mozc -install -m755 %{output_dir}/ibus_mozc %{buildroot}%{_libdir}/ibus-mozc/ibus-engine-mozc +install -m755 %{output_dir}/unix/ibus/ibus_mozc %{buildroot}%{_libdir}/ibus-mozc/ibus-engine-mozc install -m755 -d %{buildroot}%{_datadir}/ibus/component -install -m644 %{output_dir}/gen/unix/ibus/mozc.xml %{buildroot}%{_datadir}/ibus/component/mozc.xml +install -m644 %{output_dir}/unix/ibus/mozc.xml %{buildroot}%{_datadir}/ibus/component/mozc.xml install -m755 -d %{buildroot}%{_datadir}/ibus-mozc -install -m644 src/data/images/unix/ime_product_icon_opensource-32.png %{buildroot}%{_datadir}/ibus-mozc/product_icon.png -install -m644 src/data/images/unix/ui-tool.png %{buildroot}%{_datadir}/ibus-mozc/tool.png -install -m644 src/data/images/unix/ui-properties.png %{buildroot}%{_datadir}/ibus-mozc/properties.png -install -m644 src/data/images/unix/ui-dictionary.png %{buildroot}%{_datadir}/ibus-mozc/dictionary.png -install -m644 src/data/images/unix/ui-direct.png %{buildroot}%{_datadir}/ibus-mozc/direct.png -install -m644 src/data/images/unix/ui-hiragana.png %{buildroot}%{_datadir}/ibus-mozc/hiragana.png -install -m644 src/data/images/unix/ui-katakana_half.png %{buildroot}%{_datadir}/ibus-mozc/katakana_half.png -install -m644 src/data/images/unix/ui-katakana_full.png %{buildroot}%{_datadir}/ibus-mozc/katakana_full.png -install -m644 src/data/images/unix/ui-alpha_half.png %{buildroot}%{_datadir}/ibus-mozc/alpha_half.png -install -m644 src/data/images/unix/ui-alpha_full.png %{buildroot}%{_datadir}/ibus-mozc/alpha_full.png +unzip %{output_dir}/unix/icons.zip -d %{buildroot}%{_datadir}/ibus-mozc/ install -m755 -d %{buildroot}%{_datadir}/applications install -m644 ibus-setup-mozc-jp.desktop %{buildroot}%{_datadir}/applications/ibus-setup-mozc-jp.desktop @@ -314,7 +340,7 @@ %if %{with_fcitx4} # Install Fcitx module -for mofile in %{output_dir}/gen/unix/fcitx/po/*.mo +for mofile in %{output_dir}/unix/fcitx/po/*.mo do filename=`basename $mofile` lang=${filename/.mo/} @@ -324,7 +350,7 @@ install -m755 -d %{buildroot}%{fcitx_inputmethod_dir} install -m755 -d %{buildroot}%{fcitx_icon_dir} install -m755 -d %{buildroot}%{fcitx_lib_dir} -install -m 755 %{output_dir}/fcitx-mozc.so %{buildroot}%{fcitx_lib_dir} +install -m 755 %{output_dir}/unix/fcitx/fcitx-mozc.so %{buildroot}%{fcitx_lib_dir}/fcitx-mozc.so install -m 644 src/unix/fcitx/fcitx-mozc.conf %{buildroot}%{fcitx_addon_dir} install -m 644 src/unix/fcitx/mozc.conf %{buildroot}%{fcitx_inputmethod_dir} install -m 644 src/data/images/product_icon_32bpp-128.png %{buildroot}%{fcitx_icon_dir}/mozc.png @@ -348,17 +374,17 @@ %if %{with_fcitx5} # Install Fcitx5 module -# for mofile in %{output_dir}/gen/unix/fcitx5/po/*.mo -# do -# filename=`basename $mofile` -# lang=${filename/.mo/} -# install -D -m 644 "$mofile" "%{buildroot}%{_datadir}/locale/$lang/LC_MESSAGES/fcitx5-mozc.mo" -# done +for mofile in %{output_dir}/unix/fcitx5/po/*.mo +do + filename=`basename $mofile` + lang=${filename/.mo/} + install -D -m 644 "$mofile" "%{buildroot}%{_datadir}/locale/$lang/LC_MESSAGES/fcitx5-mozc.mo" +done install -m755 -d %{buildroot}%{fcitx5_addon_dir} install -m755 -d %{buildroot}%{fcitx5_inputmethod_dir} install -m755 -d %{buildroot}%{fcitx5_icon_dir} install -m755 -d %{buildroot}%{fcitx5_lib_dir} -install -m 755 %{output_dir}/fcitx5-mozc.so %{buildroot}%{fcitx5_lib_dir}/mozc.so +install -m 755 %{output_dir}/unix/fcitx5/fcitx5-mozc.so %{buildroot}%{fcitx5_lib_dir}/mozc.so install -m 644 src/unix/fcitx5/mozc-addon.conf %{buildroot}%{fcitx5_addon_dir}/mozc.conf install -m 644 src/unix/fcitx5/mozc.conf %{buildroot}%{fcitx5_inputmethod_dir} install -m 644 src/data/images/product_icon_32bpp-128.png %{buildroot}%{fcitx5_icon_dir}/mozc.png @@ -382,12 +408,12 @@ %if %{install_mozc} install -m755 -d %{buildroot}%{server_dir} -install -m755 %{output_dir}/mozc_server %{buildroot}%{server_dir} -install -m755 %{output_dir}/mozc_tool %{buildroot}%{server_dir} -install -m755 %{output_dir}/mozc_renderer %{buildroot}%{server_dir} +install -m755 %{output_dir}/server/mozc_server %{buildroot}%{server_dir} +install -m755 %{output_dir}/gui/tool/mozc_tool %{buildroot}%{server_dir} +install -m755 %{output_dir}/renderer/mozc_renderer %{buildroot}%{server_dir} install -m755 -d %{buildroot}%{_bindir} -install -m755 %{output_dir}/mozc_emacs_helper %{buildroot}%{_bindir} +install -m755 %{output_dir}/unix/emacs/mozc_emacs_helper %{buildroot}%{_bindir} # install only for emacs since xemacs is not supported install -m755 -d %{buildroot}%{_datadir}/emacs/site-lisp install -m644 src/unix/emacs/mozc.el %{buildroot}%{_datadir}/emacs/site-lisp/ @@ -399,6 +425,10 @@ %find_lang fcitx-mozc %no_lang_C %endif +%if %{with_fcitx5} +%find_lang fcitx5-mozc %no_lang_C +%endif + %if %{install_mozc} %files %defattr(-, root, root) @@ -416,6 +446,7 @@ %files -n ibus-mozc %defattr(-, root, root) +%license material-design-icons/LICENSE-material-design-icons %dir %{_libdir}/ibus-mozc/ %{_libdir}/ibus-mozc/ibus-engine-mozc %{_datadir}/applications/ibus-setup-mozc-jp.desktop @@ -424,17 +455,7 @@ %{_datadir}/applications/ibus-setup-mozc-dv.desktop %dir %{_datadir}/ibus/component/ %{_datadir}/ibus/component/mozc.xml -%dir %{_datadir}/ibus-mozc/ -%{_datadir}/ibus-mozc/product_icon.png -%{_datadir}/ibus-mozc/tool.png -%{_datadir}/ibus-mozc/properties.png -%{_datadir}/ibus-mozc/dictionary.png -%{_datadir}/ibus-mozc/direct.png -%{_datadir}/ibus-mozc/hiragana.png -%{_datadir}/ibus-mozc/katakana_half.png -%{_datadir}/ibus-mozc/katakana_full.png -%{_datadir}/ibus-mozc/alpha_half.png -%{_datadir}/ibus-mozc/alpha_full.png +%{_datadir}/ibus-mozc/ %files -n ibus-mozc-candidate-window %defattr(-, root, root) @@ -464,7 +485,7 @@ %endif %if %{with_fcitx5} -%files -n fcitx5-mozc +%files -n fcitx5-mozc -f fcitx5-mozc.lang %defattr(-,root,root) %{fcitx5_lib_dir}/mozc.so ++++++ README.SUSE ++++++ --- /var/tmp/diff_new_pack.XDFzXA/_old 2022-03-04 00:17:54.664288640 +0100 +++ /var/tmp/diff_new_pack.XDFzXA/_new 2022-03-04 00:17:54.668288642 +0100 @@ -1,5 +1,14 @@ -How to use ibus-mozc with a specific keyboard layout ------------------------------------------------------ +ibus-mozc configuration +----------------------- + +### Configuration file path + +mozc_tool does not provide ibus-mozc specific configuration. Users can customize +ibus-mozc by using a setting file, ibus_config.textproto in ~/.mozc or +~/.config/mozc. + + +### How to use ibus-mozc with a specific keyboard layout openSUSE provides four variants of ibus-mozc with different layouts: @@ -8,18 +17,42 @@ - Mozc - US layout - Mozc - US Dvorak layout -If you want to use ibus-mozc with a layout other than above, please find -ibus_config.textproto in ~/.mozc or ~/.config/mozc and a add new engine, -specifying "layout" and "variant" option. For available values of those -options, please refer to /usr/share/ibus/component/simple.xml +If you want to use ibus-mozc with a layout other than above, open +ibus_config.textproto and add a new engine specifying "layout" and "variant" +option. For available values of those options, please refer to +/usr/share/ibus/component/simple.xml -After you change the configuration, please confirm the change is applied -successfully by running: +After you change the configuration, confirm the change is applied successfully +by running: ``` /usr/lib64/ibus-mozc/ibus-engine-mozc --xml ``` +To apply the changes to running IBus, run the following commands: + +``` +ibus write-cache +ibus restart +``` + + +### How to change initial mode to active + +Set `active_on_launch` `True` if you want to activate Japanese input by default especially when you want to use it together with another IBus engine. + +``` +engines { + name : "mozc-jp" + longname : "Mozc" + layout : "ja" + layout_variant : "" + layout_option : "" + rank : 80 +} +active_on_launch: True +``` + How to use mozc.el ------------------- ++++++ add-sha256sum-for-zipcode-archives.patch ++++++ diff --git a/src/WORKSPACE.bazel b/src/WORKSPACE.bazel index d9f63844..eaab8c4b 100644 --- a/src/WORKSPACE.bazel +++ b/src/WORKSPACE.bazel @@ -167,9 +167,11 @@ http_archive( name = "zip_code_ken_all", url = "https://www.post.japanpost.jp/zipcode/dl/kogaki/zip/ken_all.zip", build_file_content = "exports_files([\"KEN_ALL.CSV\"])", + sha256 = "de6e164c3e8431bacf59e3a19b6948a27343a070ed9102c4ee8bc6ec28b93e2a" ) http_archive( name = "zip_code_jigyosyo", url = "https://www.post.japanpost.jp/zipcode/dl/jigyosyo/zip/jigyosyo.zip", build_file_content = "exports_files([\"JIGYOSYO.CSV\"])", + sha256 = "b3b02234260502c7f11fc2b2c6f36de8c4007d83dd620edfce96d2d80df62e9f" ) ++++++ add-sha256sum-for-zipcode-archives.patch.in ++++++ diff --git a/src/WORKSPACE.bazel b/src/WORKSPACE.bazel index d9f63844..eaab8c4b 100644 --- a/src/WORKSPACE.bazel +++ b/src/WORKSPACE.bazel @@ -167,9 +167,11 @@ http_archive( name = "zip_code_ken_all", url = "https://www.post.japanpost.jp/zipcode/dl/kogaki/zip/ken_all.zip", build_file_content = "exports_files([\"KEN_ALL.CSV\"])", + sha256 = "@kenallsha256@" ) http_archive( name = "zip_code_jigyosyo", url = "https://www.post.japanpost.jp/zipcode/dl/jigyosyo/zip/jigyosyo.zip", build_file_content = "exports_files([\"JIGYOSYO.CSV\"])", + sha256 = "@jigyosyosha256@" ) ++++++ fcitx-mozc-bazel-build.patch ++++++ diff --git a/src/WORKSPACE.bazel b/src/WORKSPACE.bazel index d9f63844..3df16a96 100644 --- a/src/WORKSPACE.bazel +++ b/src/WORKSPACE.bazel @@ -61,6 +61,22 @@ new_local_repository( build_file = "BUILD.ibus.bazel", ) +# Fcitx +new_local_repository( + name = "fcitx", + # This path should be updated per the environment. + path = "/usr", # For Debian + build_file = "BUILD.fcitx.bazel", +) + +# Fcitx 5 +new_local_repository( + name = "fcitx5", + # This path should be updated per the environment. + path = "/usr", # For Debian + build_file = "BUILD.fcitx5.bazel", +) + # Japanese Usage Dictionary new_local_repository( name = "ja_usage_dict", ++++++ jigyosyo.zip ++++++ Binary files /var/tmp/diff_new_pack.XDFzXA/_old and /var/tmp/diff_new_pack.XDFzXA/_new differ ++++++ ken_all.zip ++++++ Binary files /var/tmp/diff_new_pack.XDFzXA/_old and /var/tmp/diff_new_pack.XDFzXA/_new differ ++++++ make_archive.sh ++++++ --- /var/tmp/diff_new_pack.XDFzXA/_old 2022-03-04 00:17:54.860288682 +0100 +++ /var/tmp/diff_new_pack.XDFzXA/_new 2022-03-04 00:17:54.864288682 +0100 @@ -1,22 +1,69 @@ #!/bin/sh -commit=6ac62d2e888cabb138c8427e6173c04e07bb60e0 -# See: mozc/src/data/version/mozc_version_template.bzl -# REVISION is always 102 for Linux -version=2.26.4276.102 +commit=063c41f1d7c1a877f44c1f8caad6be1897350336 +fcitxcommit=b423557b5057cff239d15461b64c0f3d83a1c658 set -e -if [ ! -e mozc ]; then - git clone --depth=1 https://github.com/google/mozc.git +for opt in $*; do + case $opt in + --without-mozc) withoutmozc=1 ;; + --without-fcitx) withoutfcitx=1 ;; + --without-zipcode) withoutzipcode=1 ;; + esac +done + + +if [ -z $withoutmozc ]; then + if [ ! -e mozc ]; then + git clone --depth=1 https://github.com/google/mozc.git + cd mozc + else + cd mozc + git fetch + fi + + git checkout $commit + + vermajor=`sed -n -e "s/MAJOR = \(.*\)/\1/p" src/data/version/mozc_version_template.bzl` + verminor=`sed -n -e "s/MINOR = \(.*\)/\1/p" src/data/version/mozc_version_template.bzl` + verbuild=`sed -n -e "s/BUILD_OSS = \(.*\)/\1/p" src/data/version/mozc_version_template.bzl` + # REVISION is always 102 for Linux + version=$vermajor.$verminor.$verbuild.102 + + git archive --prefix=mozc-$version/ $commit | tar xC ../ + cd .. + rm -r mozc-$version/src/third_party/* + rm -r mozc-$version/docker + tar --owner=0 --group=0 -cvJf mozc-$version.tar.xz mozc-$version fi -cd mozc -git checkout $commit +if [ -z $withoutfcitx ]; then + if [ ! -e fcitx-mozc ]; then + git clone --depth=1 https://github.com/fcitx/mozc.git fcitx-mozc + cd fcitx-mozc + else + cd fcitx-mozc + git fetch + fi + + git checkout $fcitxcommit + + git archive --format=tar $fcitxcommit \ + src/unix/fcitx src/unix/fcitx5 src/BUILD.fcitx.bazel src/BUILD.fcitx5.bazel | \ + xz > ../fcitx-mozc-`echo $fcitxcommit | cut -c 1-8`.tar.xz + cd .. +fi -git archive --prefix=mozc-$version/ $commit | tar xC ../ -cd .. -rm -r mozc-$version/src/third_party/* -rm -r mozc-$version/docker -tar --owner=0 --group=0 -cvJf mozc-$version.tar.xz mozc-$version +if [ -z $withoutzipcode ]; then + curl -O https://www.post.japanpost.jp/zipcode/dl/kogaki/zip/ken_all.zip + curl -O https://www.post.japanpost.jp/zipcode/dl/jigyosyo/zip/jigyosyo.zip + kenallsha256=`sha256sum ken_all.zip | cut -d ' ' -f 1` + jigyosyosha256=`sha256sum jigyosyo.zip | cut -d ' ' -f 1` + sed -e "s/@kenallsha256@/$kenallsha256/" \ + -e "s/@jigyosyosha256@/$jigyosyosha256/" \ + < add-sha256sum-for-zipcode-archives.patch.in \ + > add-sha256sum-for-zipcode-archives.patch +fi +(No newline at EOF) ++++++ mozc-2.26.4276.102.tar.xz -> mozc-2.26.4660.102.tar.xz ++++++ /work/SRC/openSUSE:Factory/mozc/mozc-2.26.4276.102.tar.xz /work/SRC/openSUSE:Factory/.mozc.new.1958/mozc-2.26.4660.102.tar.xz differ: char 26, line 1 ++++++ protobuf-v3.5.2.tar.gz -> protobuf-v3.19.3.tar.gz ++++++ ++++ 943605 lines of diff (skipped)
