diff --git a/abi_used_libs b/abi_used_libs --- a/abi_used_libs +++ b/abi_used_libs @@ -15,4 +15,5 @@ libprotobuf.so.23 libpthread.so.0 libstdc++.so.6 -libzinnia.so.0 +libxcb-xfixes.so.0 +libxcb.so.1 \ No newline at end of file diff --git a/files/gcc.patch b/files/gcc.patch new file mode 100644 --- /dev/null +++ b/files/gcc.patch @@ -0,0 +1,28 @@ +--- a/src/gyp/common.gypi ++++ b/src/gyp/common.gypi +@@ -123,10 +123,10 @@ + 'compiler_host_version_int': 304, # Clang 3.4 or higher + }], + ['target_platform=="Linux"', { +- 'compiler_target': 'clang', +- 'compiler_target_version_int': 304, # Clang 3.4 or higher +- 'compiler_host': 'clang', +- 'compiler_host_version_int': 304, # Clang 3.4 or higher ++ 'compiler_target': 'gcc', ++ 'compiler_target_version_int': 404, # GCC 4.4 or higher ++ 'compiler_host': 'gcc', ++ 'compiler_host_version_int': 404, # GCC 4.4 or higher + }], + ], + }, +@@ -410,8 +410,8 @@ + ['target_platform=="Linux"', { + 'make_global_settings': [ + ['AR', 'Load(*(storage.get())); -+ dic_->Load(*(storage->storage())); - } - - private: ---- a/src/dictionary/user_dictionary_session.cc -+++ b/src/dictionary/user_dictionary_session.cc -@@ -144,7 +144,7 @@ class UndoRenameDictionaryCommand : public UserDictionarySession::UndoCommand { - virtual bool RunUndo(mozc::UserDictionaryStorage *storage) { - UserDictionary *dictionary = - UserDictionaryUtil::GetMutableUserDictionaryById( -- storage, dictionary_id_); -+ storage->storage(), dictionary_id_); - if (dictionary == NULL) { - return false; - } -@@ -169,7 +169,7 @@ class UndoAddEntryCommand : public UserDictionarySession::UndoCommand { - virtual bool RunUndo(mozc::UserDictionaryStorage *storage) { - UserDictionary *dictionary = - UserDictionaryUtil::GetMutableUserDictionaryById( -- storage, dictionary_id_); -+ storage->storage(), dictionary_id_); - if (dictionary == NULL || dictionary->entries_size() == 0) { - return false; - } -@@ -195,7 +195,7 @@ class UndoEditEntryCommand : public UserDictionarySession::UndoCommand { - virtual bool RunUndo(mozc::UserDictionaryStorage *storage) { - UserDictionary *dictionary = - UserDictionaryUtil::GetMutableUserDictionaryById( -- storage, dictionary_id_); -+ storage->storage(), dictionary_id_); - if (dictionary == NULL || - index_ < 0 || dictionary->entries_size() <= index_) { - return false; -@@ -240,7 +240,7 @@ class UndoDeleteEntryCommand : public UserDictionarySession::UndoCommand { - virtual bool RunUndo(mozc::UserDictionaryStorage *storage) { - UserDictionary *dictionary = - UserDictionaryUtil::GetMutableUserDictionaryById( -- storage, dictionary_id_); -+ storage->storage(), dictionary_id_); - if (dictionary == NULL) { - return false; - } -@@ -306,7 +306,7 @@ class UndoImportFromStringCommand : public UserDictionarySession::UndoCommand { - virtual bool RunUndo(mozc::UserDictionaryStorage *storage) { - UserDictionary *dictionary = - UserDictionaryUtil::GetMutableUserDictionaryById( -- storage, dictionary_id_); -+ storage->storage(), dictionary_id_); - if (dictionary == NULL) { - return false; - } -@@ -345,7 +345,7 @@ UserDictionarySession::~UserDictionarySession() { - - // TODO(hidehiko) move this to header. - const UserDictionaryStorage &UserDictionarySession::storage() const { -- return *storage_; -+ return *storage_->storage(); - } - mozc::UserDictionaryStorage *UserDictionarySession::mutable_storage() { - return storage_.get(); -@@ -464,7 +464,7 @@ UserDictionaryCommandStatus::Status UserDictionarySession::CreateDictionary( - const string &dictionary_name, uint64 *new_dictionary_id) { - UserDictionaryCommandStatus::Status status = - UserDictionaryUtil::CreateDictionary( -- storage_.get(), dictionary_name, new_dictionary_id); -+ storage_->storage(), dictionary_name, new_dictionary_id); - if (status == UserDictionaryCommandStatus::USER_DICTIONARY_COMMAND_SUCCESS) { - AddUndoCommand(new UndoCreateDictionaryCommand); - } -@@ -488,7 +488,7 @@ UserDictionarySession::DeleteDictionaryInternal( - int original_index; - UserDictionary *deleted_dictionary; - if (!UserDictionaryUtil::DeleteDictionary( -- storage_.get(), dictionary_id, -+ storage_->storage(), dictionary_id, - &original_index, &deleted_dictionary)) { - // Failed to delete the dictionary. - return UserDictionaryCommandStatus::UNKNOWN_DICTIONARY_ID; -@@ -510,7 +510,7 @@ UserDictionaryCommandStatus::Status UserDictionarySession::RenameDictionary( - uint64 dictionary_id, const string &dictionary_name) { - string original_name; - const UserDictionary *dictionary = -- UserDictionaryUtil::GetUserDictionaryById(*storage_, dictionary_id); -+ UserDictionaryUtil::GetUserDictionaryById(*storage_->storage(), dictionary_id); - if (dictionary != NULL) { - // Note that if dictionary is null, it means the dictionary_id is invalid - // so following RenameDictionary will fail, and error handling is done -@@ -547,7 +547,7 @@ UserDictionaryCommandStatus::Status UserDictionarySession::AddEntry( - uint64 dictionary_id, const UserDictionary::Entry &entry) { - UserDictionary *dictionary = - UserDictionaryUtil::GetMutableUserDictionaryById( -- storage_.get(), dictionary_id); -+ storage_->storage(), dictionary_id); - if (dictionary == NULL) { - return UserDictionaryCommandStatus::UNKNOWN_DICTIONARY_ID; - } -@@ -575,7 +575,7 @@ UserDictionaryCommandStatus::Status UserDictionarySession::EditEntry( - uint64 dictionary_id, int index, const UserDictionary::Entry &entry) { - UserDictionary *dictionary = - UserDictionaryUtil::GetMutableUserDictionaryById( -- storage_.get(), dictionary_id); -+ storage_->storage(), dictionary_id); - if (dictionary == NULL) { - return UserDictionaryCommandStatus::UNKNOWN_DICTIONARY_ID; - } -@@ -604,7 +604,7 @@ UserDictionaryCommandStatus::Status UserDictionarySession::DeleteEntry( - uint64 dictionary_id, const std::vector &index_list) { - UserDictionary *dictionary = - UserDictionaryUtil::GetMutableUserDictionaryById( -- storage_.get(), dictionary_id); -+ storage_->storage(), dictionary_id); - if (dictionary == NULL) { - return UserDictionaryCommandStatus::UNKNOWN_DICTIONARY_ID; - } -@@ -644,7 +644,7 @@ UserDictionaryCommandStatus::Status UserDictionarySession::ImportFromString( - uint64 dictionary_id, const string &data) { - UserDictionary *dictionary = - UserDictionaryUtil::GetMutableUserDictionaryById( -- storage_.get(), dictionary_id); -+ storage_->storage(), dictionary_id); - if (dictionary == NULL) { - return UserDictionaryCommandStatus::UNKNOWN_DICTIONARY_ID; - } -@@ -699,7 +699,7 @@ UserDictionarySession::ImportToNewDictionaryFromString( - uint64 *new_dictionary_id) { - UserDictionaryCommandStatus::Status status = - UserDictionaryUtil::CreateDictionary( -- storage_.get(), dictionary_name, new_dictionary_id); -+ storage_->storage(), dictionary_name, new_dictionary_id); - if (status != UserDictionaryCommandStatus::USER_DICTIONARY_COMMAND_SUCCESS) { - return status; - } -@@ -709,7 +709,7 @@ UserDictionarySession::ImportToNewDictionaryFromString( - - UserDictionary *dictionary = - UserDictionaryUtil::GetMutableUserDictionaryById( -- storage_.get(), *new_dictionary_id); -+ storage_->storage(), *new_dictionary_id); - if (dictionary == NULL) { - // The dictionary should be always found. - return UserDictionaryCommandStatus::UNKNOWN_ERROR; -@@ -728,7 +728,7 @@ bool UserDictionarySession::EnsureNonEmptyStorage() { - uint64 new_dictionary_id; - UserDictionaryCommandStatus::Status status = - UserDictionaryUtil::CreateDictionary( -- storage_.get(), default_dictionary_name_, &new_dictionary_id); -+ storage_->storage(), default_dictionary_name_, &new_dictionary_id); - CHECK_EQ( - status, UserDictionaryCommandStatus::USER_DICTIONARY_COMMAND_SUCCESS); - return true; ---- a/src/dictionary/user_dictionary_storage.cc -+++ b/src/dictionary/user_dictionary_storage.cc -@@ -109,7 +109,7 @@ bool UserDictionaryStorage::LoadInternal() { - mozc::protobuf::io::IstreamInputStream zero_copy_input(&ifs); - mozc::protobuf::io::CodedInputStream decoder(&zero_copy_input); - decoder.SetTotalBytesLimit(kDefaultTotalBytesLimit, -1); -- if (!ParseFromCodedStream(&decoder)) { -+ if (!storage_.ParseFromCodedStream(&decoder)) { - LOG(ERROR) << "Failed to parse"; - if (!decoder.ConsumedEntireMessage() || !ifs.eof()) { - LOG(ERROR) << "ParseFromStream failed: file seems broken"; -@@ -141,7 +141,7 @@ bool UserDictionaryStorage::Load() { - const UserDictionary &dict = dictionaries(i); - if (dict.id() == 0) { - mutable_dictionaries(i)->set_id( -- UserDictionaryUtil::CreateNewDictionaryId(*this)); -+ UserDictionaryUtil::CreateNewDictionaryId(storage_)); - } - } - -@@ -171,7 +171,7 @@ bool UserDictionaryStorage::Save() { - return false; - } - -- if (!SerializeToOstream(&ofs)) { -+ if (!storage_.SerializeToOstream(&ofs)) { - LOG(ERROR) << "SerializeToString failed"; - last_error_type_ = SYNC_FAILURE; - return false; -@@ -241,7 +241,7 @@ bool UserDictionaryStorage::ExportDictionary( - bool UserDictionaryStorage::CreateDictionary( - const string &dic_name, uint64 *new_dic_id) { - UserDictionaryCommandStatus::Status status = -- UserDictionaryUtil::CreateDictionary(this, dic_name, new_dic_id); -+ UserDictionaryUtil::CreateDictionary(&storage_, dic_name, new_dic_id); - // Update last_error_type_ - switch (status) { - case UserDictionaryCommandStatus::DICTIONARY_NAME_EMPTY: -@@ -273,7 +273,7 @@ bool UserDictionaryStorage::CreateDictionary( - } - - bool UserDictionaryStorage::DeleteDictionary(uint64 dic_id) { -- if (!UserDictionaryUtil::DeleteDictionary(this, dic_id, NULL, NULL)) { -+ if (!UserDictionaryUtil::DeleteDictionary(&storage_, dic_id, NULL, NULL)) { - // Failed to delete dictionary. - last_error_type_ = INVALID_DICTIONARY_ID; - return false; -@@ -318,7 +318,7 @@ bool UserDictionaryStorage::RenameDictionary(uint64 dic_id, - } - - int UserDictionaryStorage::GetUserDictionaryIndex(uint64 dic_id) const { -- return UserDictionaryUtil::GetUserDictionaryIndexById(*this, dic_id); -+ return UserDictionaryUtil::GetUserDictionaryIndexById(storage_, dic_id); - } - - bool UserDictionaryStorage::GetUserDictionaryId(const string &dic_name, -@@ -335,7 +335,7 @@ bool UserDictionaryStorage::GetUserDictionaryId(const string &dic_name, - - user_dictionary::UserDictionary *UserDictionaryStorage::GetUserDictionary( - uint64 dic_id) { -- return UserDictionaryUtil::GetMutableUserDictionaryById(this, dic_id); -+ return UserDictionaryUtil::GetMutableUserDictionaryById(&storage_, dic_id); - } - - UserDictionaryStorage::UserDictionaryStorageErrorType -@@ -361,14 +361,14 @@ bool UserDictionaryStorage::AddToAutoRegisteredDictionary( - - UserDictionary *dic = NULL; - if (auto_index == -1) { -- if (UserDictionaryUtil::IsStorageFull(*this)) { -+ if (UserDictionaryUtil::IsStorageFull(storage_)) { - last_error_type_ = TOO_MANY_DICTIONARIES; - LOG(ERROR) << "too many dictionaries"; - UnLock(); - return false; - } - dic = add_dictionaries(); -- dic->set_id(UserDictionaryUtil::CreateNewDictionaryId(*this)); -+ dic->set_id(UserDictionaryUtil::CreateNewDictionaryId(storage_)); - dic->set_name(kAutoRegisteredDictionaryName); - } else { - dic = mutable_dictionaries(auto_index); -@@ -410,7 +410,7 @@ bool UserDictionaryStorage::AddToAutoRegisteredDictionary( - } - - bool UserDictionaryStorage::ConvertSyncDictionariesToNormalDictionaries() { -- if (CountSyncableDictionaries(*this) == 0) { -+ if (CountSyncableDictionaries(storage_) == 0) { - return false; - } - -@@ -445,7 +445,7 @@ bool UserDictionaryStorage::ConvertSyncDictionariesToNormalDictionaries() { - kDictionaryNameConvertedFromSyncableDictionary; - int index = 0; - while (UserDictionaryUtil::ValidateDictionaryName( -- *this, new_dictionary_name) -+ storage_, new_dictionary_name) - != UserDictionaryCommandStatus::USER_DICTIONARY_COMMAND_SUCCESS) { - ++index; - new_dictionary_name = Util::StringPrintf( -@@ -456,7 +456,7 @@ bool UserDictionaryStorage::ConvertSyncDictionariesToNormalDictionaries() { - dic->set_syncable(false); - } - -- DCHECK_EQ(0, CountSyncableDictionaries(*this)); -+ DCHECK_EQ(0, CountSyncableDictionaries(storage_)); - - return true; - } ---- a/src/dictionary/user_dictionary_storage.h -+++ b/src/dictionary/user_dictionary_storage.h -@@ -74,8 +74,20 @@ class ProcessMutex; - - // Inherit from ProtocolBuffer - // TODO(hidehiko): Get rid of this implementation. --class UserDictionaryStorage : public user_dictionary::UserDictionaryStorage { -+class UserDictionaryStorage { -+ private: -+ user_dictionary::UserDictionaryStorage storage_; - public: -+ static const user_dictionary::UserDictionaryStorage& default_instance() { return user_dictionary::UserDictionaryStorage::default_instance(); } -+ user_dictionary::UserDictionaryStorage *storage() { return &storage_; } -+ int dictionaries_size() const { return storage_.dictionaries_size(); } -+ void clear_dictionaries() { storage_.clear_dictionaries(); } -+ user_dictionary::UserDictionary* mutable_dictionaries(int index) { return storage_.mutable_dictionaries(index); } -+ ::google::protobuf::RepeatedPtrField* mutable_dictionaries() { return storage_.mutable_dictionaries(); } -+ const ::google::protobuf::RepeatedPtrField& dictionaries() const { return storage_.dictionaries(); } -+ const user_dictionary::UserDictionary& dictionaries(int index) const { return storage_.dictionaries(index); } -+ user_dictionary::UserDictionary* add_dictionaries() { return storage_.add_dictionaries(); } -+ - typedef user_dictionary::UserDictionary UserDictionary; - typedef user_dictionary::UserDictionary::Entry UserDictionaryEntry; - ---- a/src/prediction/user_history_predictor.cc -+++ b/src/prediction/user_history_predictor.cc -@@ -291,7 +291,7 @@ bool UserHistoryStorage::Load() { - return false; - } - -- if (!ParseFromString(input)) { -+ if (!userHistory_.ParseFromString(input)) { - LOG(ERROR) << "ParseFromString failed. message looks broken"; - return false; - } -@@ -307,7 +307,7 @@ bool UserHistoryStorage::Save() const { - } - - string output; -- if (!AppendToString(&output)) { -+ if (!userHistory_.AppendToString(&output)) { - LOG(ERROR) << "AppendToString failed"; - return false; - } ---- a/src/prediction/user_history_predictor.h -+++ b/src/prediction/user_history_predictor.h -@@ -61,8 +61,13 @@ class Segments; - class UserHistoryPredictorSyncer; - - // Added serialization method for UserHistory. --class UserHistoryStorage : public mozc::user_history_predictor::UserHistory { -+class UserHistoryStorage { -+ private: -+ user_history_predictor::UserHistory userHistory_; - public: -+ int entries_size() const { return userHistory_.entries_size(); } -+ const user_history_predictor::UserHistory_Entry& entries(int index) const { return userHistory_.entries(index); } -+ user_history_predictor::UserHistory_Entry* add_entries() { return userHistory_.add_entries(); } - explicit UserHistoryStorage(const string &filename); - ~UserHistoryStorage(); - diff --git a/package.yml b/package.yml --- a/package.yml +++ b/package.yml @@ -1,10 +1,8 @@ name : mozc -version : 2.23.2815.102 -release : 2 +version : 2.26.4472.102 +release : 3 source : - - https://gitlab.com/fcitx/mozc/repository/dad94584ea5012110ad1d204e433964243a1639d/archive.tar.bz2 : e38457e63a7fa8d62d87b4f8b3e89fe5f6939d92e3c4fd287a93358375693892 - - git|https://chromium.googlesource.com/external/gyp.git : e87d37d6bce611abed35e854d5ae1a401e9ce04c - - https://github.com/hiroyuki-komatsu/japanese-usage-dictionary/archive/e5b3425575734c323e1d947009dd74709437b684.tar.gz : 0b6efee0eebac2c1a8eeea333278aa40fcef7846bba9a379962c6e567e7e3dc1 + - git|https://github.com/fcitx/mozc.git : 439a610ac6b6a92375b4a8188d6c9ef45ea591dd - https://download.fcitx-im.org/fcitx-mozc/fcitx-mozc-icon.tar.gz : e1da3026bd79f8c5b1dc07080309f9568934a829271f4ab71850cb8088956d81 license : BSD-3-Clause component : @@ -39,37 +37,26 @@ - /usr/lib/ibus-mozc - /usr/share/ibus setup : | - %patch -p1 < $pkgfiles/protobuf-370.patch - %patch -p1 < $pkgfiles/new-era.patch + %patch -p1 < $pkgfiles/gcc.patch rm -rf src/unix/fcitx5 pushd .. - ln -s mozc-* mozc - ln -s $sources/gyp.git gyp - tar xf $sources/e5b3425575734c323e1d947009dd74709437b684.tar.gz - ln -s japanese-usage-dictionary-* japanese_usage_dictionary tar xf $sources/fcitx-mozc-icon.tar.gz - - for src in gyp japanese_usage_dictionary; do - rmdir mozc/src/third_party/$src - ln -sr $src mozc/src/third_party/$src - done - popd + GYP_DEFINES="server_dir=/usr/lib64/mozc ibus_mozc_path=/usr/lib64/ibus-mozc/ibus-engine-mozc use_libprotobuf=1 use_libzinnia=1" \ - python2 src/build_mozc.py gyp --target_platform=Linux + python3 src/build_mozc.py gyp --target_platform=Linux build : | - pushd mozc targets=" server/server.gyp:mozc_server gui/gui.gyp:mozc_tool unix/fcitx/fcitx.gyp:fcitx-mozc unix/ibus/ibus.gyp:ibus_mozc renderer/renderer.gyp:mozc_renderer" - python2 src/build_mozc.py build -c Release $targets + python3 src/build_mozc.py build -c Release $targets install : | - pushd mozc/src + pushd src install -d $installdir/usr/lib/{mozc,fcitx} pushd out_linux/Release install -Dm00755 mozc_server $installdir/usr/lib/mozc @@ -102,6 +89,7 @@ done popd + pushd .. install -d $installdir/usr/share/fcitx/mozc/icon install -m00644 fcitx-mozc-icons/mozc.png $installdir/usr/share/fcitx/mozc/icon/mozc.png install -m00644 fcitx-mozc-icons/mozc-alpha_full.png $installdir/usr/share/fcitx/mozc/icon/mozc-alpha_full.png diff --git a/pspec_x86_64.xml b/pspec_x86_64.xml --- a/pspec_x86_64.xml +++ b/pspec_x86_64.xml @@ -2,8 +2,8 @@ mozc - Joshua Strobl - joshua@streambits.io + Manami Mori + pg_mana@taprix.org BSD-3-Clause desktop.core @@ -50,7 +50,7 @@ desktop.core - mozc + mozc /usr/lib/fcitx/fcitx-mozc.so @@ -75,7 +75,7 @@ desktop.core - mozc + mozc /usr/lib/ibus-mozc/ibus-engine-mozc @@ -83,12 +83,12 @@ - - 2020-07-09 - 2.23.2815.102 + + 2021-09-27 + 2.26.4472.102 Packaging update - Joshua Strobl - joshua@streambits.io + Manami Mori + pg_mana@taprix.org - \ No newline at end of file +