[update: 2024-07-14] Added "merge-ut-dictionaries" to "dictionary_oss/dictionary00.txt"
引き続き更新予定
- Version : 2.29.5135.102.1
TAG : 15jw :
【謝辞】Mozc-UT-Dictionaries を更新・公開されている utuhiro78氏に感謝いたします。
1. MOZC_REV: 9c39fdcb1220d29b69fba095c923a938b7cd8061
( git-source: commit- 9c39fdcb1220d29b69fba095c923a938b7cd8061 )
build requires: jdk11, bazel, Ruby >= 3.0, Zsh, xz, curl
急いでる方用にバイナリパッケージのダウンロードリンクを公開します。
slackware64-current 環境のみで動作確認しています(未保証)
------------------------------------------
About Mozc
fetch_fcitx5-mozc_sources.sh
[code]
#!/bin/bash # PRGNAM="fcitx5-mozc" VERSION="2.29.5135.102.1" HOMEPAGE="https://github.com/fcitx/mozc/" # # *** This sources are for NEologd and sudachi dictionries included Mozc *** # see: https://chienomi.org/articles/linux/202301-mozcdic-ut-mozcdict-ext.html # https://github.com/reasonset/mozcdict-ext # https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=fcitx5-mozc-ext-neologd # # source rev. and version. MOZC_REV=9c39fdcb1220d29b69fba095c923a938b7cd8061 GYP_REV=caa60026e223fc501e8b337fd5086ece4028b1c6 PROTOBUF_REV=b5a35bcc7e4cc4ff00eb105449b300fca3a8b0d2 ABSEIL_CPP_REV=20230125.2 BREAKPAD_REV=2023.01.27 GOOGLETEST_REV=703bd9caab50b139428cea1aaff9974ebee5742e #JSONCPP_REV=42e892d96e47b1f6e29844cc705e148ec4856448 ### Mozc no longer depends on JsonCpp : commit: 558b079 (2023-03-30) JAPANESE_USAGE_DICT_REV=e5b3425575734c323e1d947009dd74709437b684 MOZCDICT_EXT_REV=1041a9ca03e48b29873d950c9ea19de70fde1139 # # Download sources echo "Now, downloading each sources from repositories. ..." wget https://github.com/fcitx/mozc/archive/${MOZC_REV}/mozc-${MOZC_REV}.zip wget https://github.com/chromium/gyp/archive/${GYP_REV}/gyp-${GYP_REV}.zip wget https://github.com/protocolbuffers/protobuf/archive/${PROTOBUF_REV}/protobuf-${PROTOBUF_REV}.zip wget https://github.com/abseil/abseil-cpp/archive/${ABSEIL_CPP_REV}/abseil-cpp-${ABSEIL_CPP_REV}.zip wget https://github.com/google/breakpad/archive/v${BREAKPAD_REV}/breakpad-${BREAKPAD_REV}.zip wget https://github.com/google/googletest/archive/${GOOGLETEST_REV}/googletest-${GOOGLETEST_REV}.zip # wget https://github.com/open-source-parsers/jsoncpp/archive/${JSONCPP_REV}/jsoncpp-${JSONCPP_REV}.zip ### Mozc no longer depends on JsonCpp : commit: 558b079 (2023-03-30) wget https://github.com/hiroyuki-komatsu/japanese-usage-dictionary/archive/${JAPANESE_USAGE_DICT_REV}/japanese-usage-dictionary-${JAPANESE_USAGE_DICT_REV}.zip # Download the latest zipcode from post.japanpost.jp wget https://www.post.japanpost.jp/zipcode/dl/jigyosyo/zip/jigyosyo.zip # Download the latest zipcode from post.japanpost.jp wget https://www.post.japanpost.jp/zipcode/dl/oogaki/zip/ken_all.zip wget https://download.fcitx-im.org/fcitx-mozc/fcitx-mozc-icon.tar.gz wget https://github.com/reasonset/mozcdict-ext/archive/${MOZCDICT_EXT_REV}/mozcdict-ext-${MOZCDICT_EXT_REV}.zip # show md5sum md5sum mozc-${MOZC_REV}.zip md5sum gyp-${GYP_REV}.zip md5sum protobuf-${PROTOBUF_REV}.zip md5sum abseil-cpp-${ABSEIL_CPP_REV}.zip md5sum breakpad-${BREAKPAD_REV}.zip md5sum googletest-${GOOGLETEST_REV}.zip #md5sum jsoncpp-${JSONCPP_REV}.zip ### Mozc no longer depends on JsonCpp : commit: 558b079 (2023-03-30) md5sum japanese-usage-dictionary-${JAPANESE_USAGE_DICT_REV}.zip md5sum fcitx-mozc-icon.tar.gz md5sum mozcdict-ext-${MOZCDICT_EXT_REV}.zip # echo "Download has been completed!" |
fcitx5-mozc.SlackBuild
[code]
#!/bin/bash # Slackware build script for bazel # Copyright 2022 Isaac Yu <isaacyu1@isaacyu1.com> # All rights reserved. # # Redistribution and use of this script, with or without modification, is # permitted provided that the following conditions are met: # # 1. Redistributions of this script must retain the above copyright # notice, this list of conditions and the following disclaimer. # # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO # EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. cd $(dirname $0) ; CWD=$(pwd) PRGNAM=fcitx5-mozc VERSION=${VERSION:-2.29.5135.102.1} BUILD=${BUILD:-15} # [2024-07-14] # version ${BUILD}${TAG} : 15jw : Added merge-ut-dictionaries to "dictionary_oss/dictionary00.txt" # merge-ut-dictionaries commit number: "4862bd6" # # [2024-06-30] # version ${BUILD}${TAG} : 14jw : Updated zip code data to the latest on JUN-30th 2024 # # [2024-06-01] # version ${BUILD}${TAG} : 13jw : Updated zip code data to the latest on MAY-31st 2024 # # [2024-05-09] # version ${BUILD}${TAG} : 12jw : Updated zip code data to the latest on APR-30th 2024 # # [2024-03-02] # version ${BUILD}${TAG} : 10jw : Updated zip code data to the latest on FEB-29th 2024 and # MOZCDICT_EXT_REV : 01490262fe58576b4356734468c973bc46acdd33 # # [2023-06-18] # version bump to "2.29.5135.102.1" # MOZC_REV : "9c39fdcb1220d29b69fba095c923a938b7cd8061" # Merge remote-tracking branch 'origin/master' into fcitx # Moved former Change histories to ChangeLog.jw # TAG=${TAG:-jw} PKGTYPE=${PKGTYPE:-txz} if [ -z "$ARCH" ]; then case "$( uname -m )" in i?86) ARCH=i586 ;; arm*) ARCH=arm ;; *) ARCH=$( uname -m ) ;; esac fi # If the variable PRINT_PACKAGE_NAME is set, then this script will report what # the name of the created package would be, and then exit. This information # could be useful to other scripts. if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" exit 0 fi TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} BLDBASEDIR=$TMP/$PRGNAM-$VERSION if [ "$ARCH" = "i586" ]; then SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" LIBDIRSUFFIX="64" else SLKCFLAGS="-O2" LIBDIRSUFFIX="" fi set -e BLDTYPE=Release _bldtype=Release # source rev. and version. MOZC_REV=9c39fdcb1220d29b69fba095c923a938b7cd8061 GYP_REV=caa60026e223fc501e8b337fd5086ece4028b1c6 PROTOBUF_REV=b5a35bcc7e4cc4ff00eb105449b300fca3a8b0d2 ABSEIL_CPP_REV=20230125.2 BREAKPAD_REV=2023.01.27 GOOGLETEST_REV=703bd9caab50b139428cea1aaff9974ebee5742e #JSONCPP_REV=42e892d96e47b1f6e29844cc705e148ec4856448 ### Mozc no longer depends on JsonCpp JAPANESE_USAGE_DICT_REV=e5b3425575734c323e1d947009dd74709437b684 ZIPCODE_REL=20231231 # Now, I will use ZIPCODE data from https://www.post.japanpost.jp/zipcode/download.html # The data at https://www.post.japanpost.jp/zipcode/download.html doesn't have release version number. # File names are jigyosho.zip, ken_all.zip. #MOZCDICT_EXT_REV=01490262fe58576b4356734468c973bc46acdd33 MOZCDICT_EXT_REV=1041a9ca03e48b29873d950c9ea19de70fde1139 rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PRGNAM-$VERSION mkdir -p $PRGNAM-$VERSION cd $PRGNAM-$VERSION echo "prepare source file..." # unzip packages unzip $CWD/mozc-$MOZC_REV.zip unzip $CWD/gyp-$GYP_REV.zip unzip $CWD/protobuf-$PROTOBUF_REV.zip unzip $CWD/abseil-cpp-$ABSEIL_CPP_REV.zip unzip $CWD/breakpad-${BREAKPAD_REV}.zip unzip $CWD/googletest-$GOOGLETEST_REV.zip #unzip $CWD/jsoncpp-$JSONCPP_REV.zip unzip $CWD/japanese-usage-dictionary-$JAPANESE_USAGE_DICT_REV.zip unzip $CWD/mozcdict-ext-${MOZCDICT_EXT_REV}.zip # extact tar file tar -xvf ${CWD}/fcitx-mozc-icon.tar.gz # rename directory mv mozc-$MOZC_REV mozc mv gyp-$GYP_REV gyp mv protobuf-$PROTOBUF_REV protobuf mv abseil-cpp-$ABSEIL_CPP_REV abseil-cpp mv breakpad-$BREAKPAD_REV breakpad mv googletest-$GOOGLETEST_REV googletest #mv jsoncpp-$JSONCPP_REV jsoncpp mv japanese-usage-dictionary-$JAPANESE_USAGE_DICT_REV japanese_usage_dictionary mv mozcdict-ext-${MOZCDICT_EXT_REV} mozcdict-ext chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ -o -perm 511 \) -exec chmod 755 {} \; -o \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; cd $BLDBASEDIR/mozc/src # disable android-ndk requirement, even if we don't need it bazel will complain sed "/android_ndk_repository/d" -i WORKSPACE.bazel # adjust QT_BASE_PATH sed 's|path = QT_BASE_PATH|path = "/usr/include/qt5"|' -i WORKSPACE.bazel cd $BLDBASEDIR/mozc # prepare zip code dictionary unzip -d src/data/dictionary_oss $CWD/jigyosyo.zip unzip -d src/data/dictionary_oss $CWD/ken_all.zip cd src/dictionary # Generate zip code seed sed -i "s/from dictionary import zip_code_util/import zip_code_util/g" gen_zip_code_seed.py cd ../data/dictionary_oss echo "Generating zip code seed ..." python3 ../../dictionary/gen_zip_code_seed.py --zip_code=KEN_ALL.CSV --jigyosyo=JIGYOSYO.CSV >> dictionary09.txt echo "Done." # Add merge-ut-dictionaries to dictionary00.txt cd $BLDBASEDIR/ git clone https://github.com/utuhiro78/merge-ut-dictionaries.git cd merge-ut-dictionaries/src/ sh make.sh cat mozcdic-ut.txt >> $BLDBASEDIR/mozc/src/data/dictionary_oss/dictionary00.txt echo "... extra merge-ut-dictionaries has been applied to dictionary00.txt. Done!" # Include NEologd export RUBYOPT=-EUTF-8 cd $BLDBASEDIR/mozcdict-ext echo "Generating extra dictionaries..." ( cd neologd MOZC_ID_FILE=$BLDBASEDIR/mozc/src/data/dictionary_oss/id.def zsh mkdict.zsh cd ../sudachi MOZC_ID_FILE=$BLDBASEDIR/mozc/src/data/dictionary_oss/id.def zsh mkdict.zsh ) | ruby .dev.utils/uniqword.rb 2> /dev/null >> $BLDBASEDIR/mozc/src/data/dictionary_oss/dictionary09.txt cd $BLDBASEDIR/mozc/scripts # fix libdir path of fcitx5-mozc.so for Slackware sed 's/lib/lib64/g' -i install_fcitx5_bazel #cd .. # We won't need this patch now. # Apply debian Use-Gtk3 patch # patch -p1 < $CWD/0008-renderer-Convert-Gtk2-to-Gtk3.patch cd ../.. # Copy third party deps echo "Copy third party deps ..." for dep in abseil-cpp breakpad googletest gyp protobuf japanese_usage_dictionary do cp -a $dep mozc/src/third_party/ done # build package echo "build package..." CFLAGS="${CFLAGS} -fvisibility=hidden" CXXFLAGS="${CXXFLAGS} -fvisibility=hidden" cd $BLDBASEDIR/mozc/src QT_BASE_PATH=/usr/include/qt5 bash ../scripts/build_fcitx5_bazel # Build emacs_helper echo "build emacs_helper..." bazel build unix/emacs:mozc_emacs_helper --config oss_linux --compilation_mode opt # Extract license part of mozc head -n 29 server/mozc_server.cc > LICENSE export PREFIX="$PKG/usr" export _bldtype bash ../scripts/install_server_bazel install -d "$PKG/usr/share/licenses/${PRGNAM}/" install -m 644 LICENSE data/installer/*.html "$PKG/usr/share/licenses/${PRGNAM}/" install -d "${PREFIX}/share/fcitx5/addon" install -d "${PREFIX}/share/fcitx5/inputmethod" install -d "${PREFIX}/lib${LIBDIRSUFFIX}/fcitx5" bash ../scripts/install_fcitx5_bazel # Install icons at /usr/share/fcitx5 install -d "${PREFIX}/share/fcitx5/mozc/icon" install -D -m 644 data/images/product_icon_32bpp-128.png "${PREFIX}/share/fcitx5/mozc/icon/mozc.png" install -D -m 644 ../scripts/icons/ui-alpha_full.png "${PREFIX}/share/fcitx5/mozc/icon/mozc-alpha_full.png" install -D -m 644 ../scripts/icons/ui-alpha_half.png "${PREFIX}/share/fcitx5/mozc/icon/mozc-alpha_half.png" install -D -m 644 ../scripts/icons/ui-direct.png "${PREFIX}/share/fcitx5/mozc/icon/mozc-direct.png" install -D -m 644 ../scripts/icons/ui-hiragana.png "${PREFIX}/share/fcitx5/mozc/icon/mozc-hiragana.png" install -D -m 644 ../scripts/icons/ui-katakana_full.png "${PREFIX}/share/fcitx5/mozc/icon/mozc-katakana_full.png" install -D -m 644 ../scripts/icons/ui-katakana_half.png "${PREFIX}/share/fcitx5/mozc/icon/mozc-katakana_half.png" install -D -m 644 ../scripts/icons/ui-dictionary.png "${PREFIX}/share/fcitx5/mozc/icon/mozc-dictionary.png" install -D -m 644 ../scripts/icons/ui-properties.png "${PREFIX}/share/fcitx5/mozc/icon/mozc-properties.png" install -D -m 644 ../scripts/icons/ui-tool.png "${PREFIX}/share/fcitx5/mozc/icon/mozc-tool.png" find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION # Install emacs_helper and documents install -Dm644 ../LICENSE $PKG/usr/share/licenses/emacs-mozc/LICENSE install -Dm644 data/installer/credits_en.html $PKG/usr/doc/$PRGNAM-$VERSION/credits_en.html install -Dm755 bazel-bin/unix/emacs/mozc_emacs_helper $PKG/usr/bin/mozc_emacs_helper install -Dm644 unix/emacs/mozc.el $PKG/usr/share/emacs/site-lisp/mozc.el # install merge-ut-dictionaries's license and document install -Dm644 $BLDBASEDIR/merge-ut-dictionaries/LICENSE $PKG/usr/share/licenses/merge-ut-dictionaries/LICENSE install -Dm644 $BLDBASEDIR/merge-ut-dictionaries/README.md $PKG/usr/doc/$PRGNAM-$VERSION/merge-ut-dictionaries/README.md cp $CWD/init.el_mozc $CWD/README.emacs $PKG/usr/doc/$PRGNAM-$VERSION/ cp $CWD/fetch_fcitx5-mozc_sources.sh $PKG/usr/doc/$PRGNAM-$VERSION/ cp $CWD/ChangeLog.jw $PKG/usr/doc/$PRGNAM-$VERSION/ cp $CWD/$PRGNAM.SlackBuild $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild # remove unneeded doc directory rm -rf $PKG/usr/doc/mozc mkdir -p $PKG/install # install slack-desc cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh cd $PKG /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE |
init.el_mozc
[code]
(set-language-environment "Japanese") (require 'mozc) ; or (load-file "/usr/share/emacs/site-lisp/emacs-mozc/mozc.el") (setq default-input-method "japanese-mozc") (setq mozc-candidate-style 'overlay) |
README.emacs
[code]
# for emacs, create {HOME}/.emacs.d/init.el with followng lines (require 'mozc) ; or (load-file "/path/to/mozc.el") (setq default-input-method "japanese-mozc") (setq mozc-candidate-style 'overlay) |
doinst.sh
[code]
if [ -x /usr/bin/update-desktop-database ]; then /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1 fi if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then if [ -x /usr/bin/gtk-update-icon-cache ]; then /usr/bin/gtk-update-icon-cache usr/share/icons/hicolor >/dev/null 2>&1 fi fi if [ -x usr/bin/update-gtk-immodules ]; then chroot . /usr/bin/update-gtk-immodules --verbose 1>/dev/null fi |
slack-desc
[code]
# HOW TO EDIT THIS FILE: # The "handy ruler" below makes it easier to edit a package description. # Line up the first '|' above the ':' following the base package name, and # the '|' on the right side marks the last column you can put a character in. # You must make exactly 11 lines for the formatting to be correct. It's also # customary to leave one space after the ':' except on otherwise blank lines. |-----handy-ruler------------------------------------------------------| fcitx5-mozc: fcitx5-mozc (Mozc engine for fcitx5) fcitx5-mozc: fcitx5-mozc: fcitx5-mozc is Mozc, Japanese input method editor, engine for fcitx5. fcitx5-mozc: fcitx5-mozc: Homepage: https://fcitx-im.org fcitx5-mozc: fcitx5-mozc: fcitx5-mozc: fcitx5-mozc: fcitx5-mozc: fcitx5-mozc: |
fcitx5-mozc.info of Version-2.29.5135.102.1 (1jw)
[code]
PRGNAM="fcitx5-mozc" VERSION="2.29.5135.102.1" HOMEPAGE="https://github.com/fcitx/mozc/" DOWNLOAD="https://github.com/fcitx/mozc/archive/9c39fdcb1220d29b69fba095c923a938b7cd8061/mozc-9c39fdcb1220d29b69fba095c923a938b7cd8061.zip https://github.com/chromium/gyp/archive/caa60026e223fc501e8b337fd5086ece4028b1c6/gyp-caa60026e223fc501e8b337fd5086ece4028b1c6.zip https://github.com/protocolbuffers/protobuf/archive/b5a35bcc7e4cc4ff00eb105449b300fca3a8b0d2/protobuf-b5a35bcc7e4cc4ff00eb105449b300fca3a8b0d2.zip https://github.com/abseil/abseil-cpp/archive/20230125.2/abseil-cpp-20230125.2.zip https://github.com/google/breakpad/archive/v2023.01.27/breakpad-2023.01.27.zip https://github.com/google/googletest/archive/703bd9caab50b139428cea1aaff9974ebee5742e/googletest-703bd9caab50b139428cea1aaff9974ebee5742e.zip https://github.com/hiroyuki-komatsu/japanese-usage-dictionary/archive/e5b3425575734c323e1d947009dd74709437b684/japanese-usage-dictionary-e5b3425575734c323e1d947009dd74709437b684.zip https://download.fcitx-im.org/fcitx-mozc/fcitx-mozc-icon.tar.gz https://github.com/reasonset/mozcdict-ext/archive/1041a9ca03e48b29873d950c9ea19de70fde1139/mozcdict-ext-1041a9ca03e48b29873d950c9ea19de70fde1139.zip" MD5SUM="8692ba1cfe566c55794d1cc49baf0fc6 699c5af5c6d7e19835afb5292d151f91 d79cbe4e2033c967a58e2bddaa6d4aa2 94ebd9ba64df55d2d36c9c1a9036f03c 124a7c0c3e479b1d804bc49ef21ba625 768da4173ee9df3248b8f828747982ad a6eb1da9ad7ceffcb9683003332abf7e 80fe2ef127b70649df22d133822ac8a7 881191393dd7547bd7973fe3106b663c" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="bazel" MAINTAINER="" EMAIL="" |
引き続き更新予定