The package rpms/fcitx5-mozc.git has added or updated architecture specific content in
its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/fcitx5-mozc.git/commit/?id=b7de38....
Change:
+ExcludeArch: ppc ppc64 sparcv9 sparc64 s390x
Thanks.
Full change:
============
commit 59c486649397c01101f80847bca812c7b6464dfc
Author: Qiyu Yan <yanqiyu(a)fedoraproject.org>
Date: Fri Mar 19 19:40:12 2021 +0800
fix snapshot date generation
diff --git a/fcitx5-mozc.spec b/fcitx5-mozc.spec
index 0884bfa..c3fc80e 100644
--- a/fcitx5-mozc.spec
+++ b/fcitx5-mozc.spec
@@ -2,12 +2,12 @@
%global server_dir %{_libexecdir}/fcitx5-mozc
+Name: fcitx5-mozc
%global forgeurl
https://github.com/fcitx/mozc
%global commit df9f395b5c2ea022a6ab18e8aa7dbe69bc7eea29
+%global archivename %{name}-%{commit}
+%forgemeta
-%{forgemeta}
-
-Name: fcitx5-mozc
Version: 2.17.2102.102.1
# upstream don't tag release, build git snapshot here
# git snaoshot should have s snapshot date will be taken care
@@ -139,5 +139,5 @@ appstream-util validate-relax --nonet
%{buildroot}%{_metainfodir}/*.metainfo.xml
%{_metainfodir}/org.fcitx.Fcitx5.Addon.Mozc.metainfo.xml
%changelog
-* Fri Mar 12 2021 Qiyu Yan <yanqiyu(a)fedoraproject.org> -
2.17.2102.102.1-1.20210317gitdf9f395
+* Fri Mar 12 2021 Qiyu Yan <yanqiyu(a)fedoraproject.org> -
2.17.2102.102.1-1.20210319gitdf9f395
- Initial Package
commit b7de384354c679b9d8f539cf4f4229f075190fd1
Author: Qiyu Yan <yanqiyu(a)fedoraproject.org>
Date: Fri Mar 19 19:26:54 2021 +0800
Initial Import(#1938181)
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..148e2b9
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+/fcitx5-mozc-df9f395b5c2ea022a6ab18e8aa7dbe69bc7eea29.tar.gz
+/jigyosyo.zip
+/ken_all.zip
diff --git a/fcitx5-mozc.spec b/fcitx5-mozc.spec
new file mode 100644
index 0000000..0884bfa
--- /dev/null
+++ b/fcitx5-mozc.spec
@@ -0,0 +1,143 @@
+%global __provides_exclude_from ^%{_libdir}/fcitx5/.*\\.so$
+
+%global server_dir %{_libexecdir}/fcitx5-mozc
+
+%global forgeurl
https://github.com/fcitx/mozc
+%global commit df9f395b5c2ea022a6ab18e8aa7dbe69bc7eea29
+
+%{forgemeta}
+
+Name: fcitx5-mozc
+Version: 2.17.2102.102.1
+# upstream don't tag release, build git snapshot here
+# git snaoshot should have s snapshot date will be taken care
+# of by forgemeta after importing to dist-git
+Release: 1%{?dist}
+Summary: A wrapper of mozc for fcitx5
+# fcitx5-mozc is a fork of mozc, difference can be seen at
+#
https://github.com/google/mozc/compare/master...fcitx:fcitx
+# src/third_party/abseil-cpp : Apache License
+# src/third_party/breakpad : BSD License
+# src/third_party/japanese_usage_dictionary: BSD license
+# src/third_party/wtl: MS-PL
+# src/unix/fcitx5: LGPLv2+
+# ----
+# data/unicode/: UCD
+# Copyright (c) 1991-2008 Unicode, Inc.
+# data/test/stress_test/sentences.txt: Public Domain
+# data/dictionary_oss/: mecab-ipadic and BSD
+# See
http://code.google.com/p/mozc/issues/detail?id=20
+# also data/installer/credits_en.html
+# src/data/test/dictionary/: same as data/dictionary_oss
+License: BSD and ASL 2.0 and UCD and Public Domain and mecab-ipadic and LGPLv2+
and MS-PL
+URL: %{forgeurl}
+
+# The source of this package was pulled from upstreams's vcs.
+# Use the following command to generate the tar ball:
+# with gtest gyp jsoncpp protobuf unbundled
+# abseil-cpp is left here due to hardcoded build scripts from
+# upstream code.
+# -----
+# git clone --recursive
https://github.com/fcitx/mozc.git --depth 1
+# cd mozc
+# git checkout %%{commit}
+# for i in gtest gyp jsoncpp protobuf ; do rm -rf src/third_party/$i; done
+# cd ..
+# tar --exclude-vcs -czf %%{name}-%%{commit}.tar.gz mozc/
+# -----
+Source0: %{name}-%{commit}.tar.gz
+# Public Domain
+Source1:
http://www.post.japanpost.jp/zipcode/dl/kogaki/zip/ken_all.zip
+Source2:
http://www.post.japanpost.jp/zipcode/dl/jigyosyo/zip/jigyosyo.zip
+
+# add -v to ninja command, to make verbose output during building
+Patch0: mozc-build-verbosely.patch
+# adding missing include essential to build with GCC 11+
+# abseil-cpp is being patched
+Patch1: fix-build-gcc11.patch
+
+BuildRequires: python3-devel
+BuildRequires: gettext
+BuildRequires: gtk2-devel
+BuildRequires: qt5-qtbase-devel
+BuildRequires: zinnia-devel
+BuildRequires: clang
+BuildRequires: ninja-build
+BuildRequires: gyp >= 0.1-0.4.840svn
+BuildRequires: fcitx5-devel
+BuildRequires: libappstream-glib
+BuildRequires: %{py3_dist six}
+BuildRequires: protobuf-devel
+BuildRequires: protobuf-c
+BuildRequires: abseil-cpp-devel
+BuildRequires: gtest-devel
+BuildRequires: jsoncpp-devel
+
+Requires: hicolor-icon-theme
+Requires: fcitx5
+Requires: fcitx5-data
+
+#
https://bugzilla.redhat.com/show_bug.cgi?id=1419949
+# we are using mostly exact mozc server, same problem
+# may occur here, adding ExcludeArch like ibus-mozc
+ExcludeArch: ppc ppc64 sparcv9 sparc64 s390x
+
+%description
+A wrapper of mozc for fcitx5.
+
+%prep
+%setup -q -n mozc -a 1 -a 2
+%patch0 -p1
+%patch1 -p1
+(cd src/data/dictionary_oss;
+PYTHONPATH="${PYTHONPATH}:../../" python3 ../../dictionary/gen_zip_code_seed.py
--zip_code=../../../KEN_ALL.CSV --jigyosyo=../../../JIGYOSYO.CSV >>
dictionary09.txt;
+)
+# Don't build for fcitx4
+rm src/unix/fcitx/fcitx.gyp
+# building with gcc, change to add -lc++
+sed "/stdlib=libc++/d;/-lc++/d" -i src/gyp/common.gypi
+# preserve install time stamp
+sed "s/ -m/ -pm/g" -i scripts/install_fcitx5 scripts/install_fcitx5_icons
+
+%build
+%set_build_flags
+pushd src
+# specify an another path for those mozc server files
+# to enable this to co-exist with ibus-mozc
+QTDIR=%{_prefix} \
+GYP_DEFINES="document_dir=%{_datadir}/licenses/%{name} use_libzinnia=1
use_libprotobuf=1
zinnia_model_file=%{_datadir}/zinnia/model/tomoe/handwriting-ja.model" \
+python3 build_mozc.py gyp --gypdir=%{_bindir} --server_dir=%{server_dir}
--target_platform=Linux
+python3 build_mozc.py build -c Release server/server.gyp:mozc_server
gui/gui.gyp:mozc_tool unix/fcitx5/fcitx5.gyp:fcitx5-mozc
+popd
+
+%install
+pushd src
+export _bldtype=Release
+install -D -pm 755 "out_linux/${_bldtype}/mozc_server"
"%{buildroot}%{server_dir}/mozc_server"
+install -D -pm 755 "out_linux/${_bldtype}/mozc_tool"
"%{buildroot}%{server_dir}/mozc_tool"
+# fix install dirs in script, don't use those hardcoded paths:
+# ${PREFIX}/share/metainfo -> _metainfodir
+sed "s|\${PREFIX}/share/metainfo|%{buildroot}%{_metainfodir}|g" -i
../scripts/install_fcitx5
+# ${PREFIX}/share -> _datadir
+sed "s|\${PREFIX}/share|%{buildroot}%{_datadir}|g" -i
../scripts/install_fcitx5 ../scripts/install_fcitx5_icons
+# ${PREFIX}/lib -> _libdir
+sed "s|\${PREFIX}/lib|%{buildroot}%{_libdir}|g" -i
../scripts/install_fcitx5
+../scripts/install_fcitx5
+popd
+
+appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/*.metainfo.xml
+
+%find_lang %{name}
+
+%files -f %{name}.lang
+%license LICENSE
+%doc README.md src/data/installer/*.html
+%{server_dir}
+%{_datadir}/fcitx5/*/mozc.conf
+%{_datadir}/icons/hicolor/*/apps/*
+%{_libdir}/fcitx5/fcitx5-mozc.so
+%{_metainfodir}/org.fcitx.Fcitx5.Addon.Mozc.metainfo.xml
+
+%changelog
+* Fri Mar 12 2021 Qiyu Yan <yanqiyu(a)fedoraproject.org> -
2.17.2102.102.1-1.20210317gitdf9f395
+- Initial Package
diff --git a/fix-build-gcc11.patch b/fix-build-gcc11.patch
new file mode 100644
index 0000000..eea54d6
--- /dev/null
+++ b/fix-build-gcc11.patch
@@ -0,0 +1,11 @@
+diff --color -rupN
mozc.orig/src/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc
mozc/src/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc
+---
mozc.orig/src/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc 2021-03-15
22:29:19.136624465 +0800
++++
mozc/src/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc 2021-03-15
22:29:50.682448271 +0800
+@@ -37,6 +37,7 @@
+
+ #include <algorithm>
+ #include <array>
++#include <limits>
+ #include "absl/base/internal/hide_ptr.h"
+ #include "absl/base/internal/raw_logging.h"
+ #include "absl/base/internal/spinlock.h"
diff --git a/mozc-build-verbosely.patch b/mozc-build-verbosely.patch
new file mode 100644
index 0000000..a29ed0a
--- /dev/null
+++ b/mozc-build-verbosely.patch
@@ -0,0 +1,21 @@
+diff -pruN mozc-2.25.4190.102.orig/src/build_mozc.py mozc-2.25.4190.102/build_mozc.py
+--- mozc-2.25.4190.102.orig/src/build_mozc.py 2020-11-19 13:18:22.391113319 +0900
++++ mozc-2.25.4190.102/src/build_mozc.py 2020-11-19 13:20:00.583082777 +0900
+@@ -579,7 +579,7 @@ def BuildWithNinja(options, targets):
+
+ for target in targets:
+ (_, target_name) = target.split(':')
+- RunOrDie([ninja, '-C', build_arg, target_name])
++ RunOrDie([ninja, '-v', '-C', build_arg, target_name])
+
+
+ def BuildOnWindows(targets):
+@@ -588,7 +588,7 @@ def BuildOnWindows(targets):
+
+ for target in targets:
+ (build_arg, target_name) = target.split(':')
+- RunOrDie([ninja, '-C', build_arg, target_name])
++ RunOrDie([ninja, '-v', '-C', build_arg, target_name])
+
+
+ def BuildMain(options, targets):
diff --git a/sources b/sources
new file mode 100644
index 0000000..ee31276
--- /dev/null
+++ b/sources
@@ -0,0 +1,3 @@
+SHA512 (fcitx5-mozc-df9f395b5c2ea022a6ab18e8aa7dbe69bc7eea29.tar.gz) =
3c1169595a2c964b7243a3e7de50bdb71d1e9e161eaccd8eff6b41f163dbe419c34e026f422afae4a95c13d12be075ad798282c7e3a686db5d2cffbdf46b1b5f
+SHA512 (jigyosyo.zip) =
d3b8f310b3fedc57beca463dd0e127f9d282cd069fc14567d00ee4cc68a7e43194a3d6247ba2fc14fbd2f01b59afcb721fdfdacaecaadf3ffb6196f261e39a94
+SHA512 (ken_all.zip) =
95a051933ff539b316150c4cd61d2a53e196fe402892b54cd1b922e91779ab776d643b326ca1165017a5041c255415418d2b6b3eb3fea2773904b17821f30366