diff --git a/appdata.its b/appdata.its deleted file mode 100644 index faf9e7b..0000000 --- a/appdata.its +++ /dev/null @@ -1,14 +0,0 @@ - - - - - diff --git a/appdata.loc b/appdata.loc deleted file mode 100644 index 5d7e6fa..0000000 --- a/appdata.loc +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/fcitx5-lambda.patch b/fcitx5-gcc7.patch similarity index 78% rename from fcitx5-lambda.patch rename to fcitx5-gcc7.patch index 0eb5428..fc504b8 100644 --- a/fcitx5-lambda.patch +++ b/fcitx5-gcc7.patch @@ -1,35 +1,44 @@ -Index: fcitx5-5.0.3/test/testdbus.cpp -=================================================================== ---- fcitx5-5.0.3.orig/test/testdbus.cpp -+++ fcitx5-5.0.3/test/testdbus.cpp -@@ -67,7 +67,7 @@ private: - []() { return 5; }); - FCITX_OBJECT_VTABLE_WRITABLE_PROPERTY( - testProperty2, "testProperty2", "i", [this]() { return prop2; }, -- [this](int32_t v) { prop2 = v; }); -+ [&](int32_t v) { prop2 = v; }); - }; - - #define TEST_SERVICE "org.fcitx.Fcitx.TestDBus" Index: fcitx5-5.0.3/src/frontend/ibusfrontend/ibusfrontend.cpp =================================================================== --- fcitx5-5.0.3.orig/src/frontend/ibusfrontend/ibusfrontend.cpp +++ fcitx5-5.0.3/src/frontend/ibusfrontend/ibusfrontend.cpp -@@ -594,14 +594,14 @@ private: +@@ -594,14 +594,23 @@ private: ([]() -> dbus::DBusStruct { return {0, 0}; }), -- ([this](dbus::DBusStruct type) { ++#if __GNUC__ < 8 + ([&](dbus::DBusStruct type) { ++#else + ([this](dbus::DBusStruct type) { ++#endif setContentType(std::get<0>(type), std::get<1>(type)); }), dbus::PropertyOption::Hidden); FCITX_OBJECT_VTABLE_WRITABLE_PROPERTY( clientCommitPreedit, "ClientCommitPreedit", "(b)", -- ([this]() -> dbus::DBusStruct { return {clientCommitPreedit_}; }), -- ([this](dbus::DBusStruct value) { ++#if __GNUC__ < 8 + ([&]() -> dbus::DBusStruct { return {clientCommitPreedit_}; }), + ([&](dbus::DBusStruct value) { ++#else + ([this]() -> dbus::DBusStruct { return {clientCommitPreedit_}; }), + ([this](dbus::DBusStruct value) { ++#endif clientCommitPreedit_ = std::get<0>(value); }), dbus::PropertyOption::Hidden); +Index: fcitx5-5.0.3/test/testdbus.cpp +=================================================================== +--- fcitx5-5.0.3.orig/test/testdbus.cpp ++++ fcitx5-5.0.3/test/testdbus.cpp +@@ -67,7 +67,11 @@ private: + []() { return 5; }); + FCITX_OBJECT_VTABLE_WRITABLE_PROPERTY( + testProperty2, "testProperty2", "i", [this]() { return prop2; }, ++#if __GNUC__ < 8 ++ [&](int32_t v) { prop2 = v; }); ++#else + [this](int32_t v) { prop2 = v; }); ++#endif + }; + + #define TEST_SERVICE "org.fcitx.Fcitx.TestDBus" diff --git a/fcitx5-std-runtime_error.patch b/fcitx5-std-runtime_error.patch deleted file mode 100644 index bffb888..0000000 --- a/fcitx5-std-runtime_error.patch +++ /dev/null @@ -1,38 +0,0 @@ -Index: fcitx5-4.99.0+git20200212.9436416/src/lib/fcitx-utils/event.h -=================================================================== ---- fcitx5-4.99.0+git20200212.9436416.orig/src/lib/fcitx-utils/event.h -+++ fcitx5-4.99.0+git20200212.9436416/src/lib/fcitx-utils/event.h -@@ -27,6 +27,8 @@ - #include - #include - -+#include -+ - namespace fcitx { - - enum class IOEventFlag { -Index: fcitx5-4.99.0+git20200212.9436416/src/lib/fcitx-utils/utf8.h -=================================================================== ---- fcitx5-4.99.0+git20200212.9436416.orig/src/lib/fcitx-utils/utf8.h -+++ fcitx5-4.99.0+git20200212.9436416/src/lib/fcitx-utils/utf8.h -@@ -29,6 +29,8 @@ - #include - #include - -+#include -+ - namespace fcitx { - namespace utf8 { - -Index: fcitx5-4.99.0+git20200212.9436416/src/lib/fcitx/candidatelist.cpp -=================================================================== ---- fcitx5-4.99.0+git20200212.9436416.orig/src/lib/fcitx/candidatelist.cpp -+++ fcitx5-4.99.0+git20200212.9436416/src/lib/fcitx/candidatelist.cpp -@@ -18,6 +18,7 @@ - // - - #include "candidatelist.h" -+#include - - namespace fcitx { - diff --git a/fcitx5.changes b/fcitx5.changes index 3b2c5f3..3422ac7 100644 --- a/fcitx5.changes +++ b/fcitx5.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Dec 11 06:49:22 UTC 2020 - Marguerite Su + +- add fcitx5-gcc7.patch: fix build on openSUSE Leap 15.1 with gcc7 + ------------------------------------------------------------------- Sun Dec 6 05:08:33 UTC 2020 - Marguerite Su diff --git a/fcitx5.spec b/fcitx5.spec index c53b853..00f772b 100644 --- a/fcitx5.spec +++ b/fcitx5.spec @@ -31,11 +31,9 @@ Source1: en_dict-20121020.tar.gz Source2: https://raw.githubusercontent.com/fcitx/fcitx-artwork/master/logo/Fcitx.svg Source3: xim.d-fcitx5 Source4: macros.fcitx5 -Source5: https://raw.githubusercontent.com/hughsie/appstream-glib/master/data/appdata.loc -Source6: https://raw.githubusercontent.com/hughsie/appstream-glib/master/data/appdata.its Source99: baselibs.conf Patch0: fcitx5-no-download.patch -Patch1: fcitx5-lambda.patch +Patch1: fcitx5-gcc7.patch BuildRequires: Mesa-libEGL-devel BuildRequires: cairo-devel BuildRequires: cldr-emoji-annotation-devel @@ -66,6 +64,9 @@ BuildRequires: xcb-imdkit-devel BuildRequires: xcb-util-keysyms-devel BuildRequires: xcb-util-wm-devel BuildRequires: xkeyboard-config +%if 0%{?suse_version} <= 1520 +BuildRequires: appstream-glib-devel +%endif Requires: libFcitx5Config6 = %{version} Requires: libFcitx5Core7 = %{version} Requires: libFcitx5Utils2 = %{version} @@ -126,15 +127,8 @@ This package provides utility libraries for fcitx5. %patch0 -p1 %patch1 -p1 cp -r %{SOURCE1} src/modules/spell/dict/ -# fix fcitx5-diagnose env-script-interpreter -sed -i '1s/env //' data/fcitx5-diagnose.sh %build -# fix leap 15.2 msgfmt can not locate its rules -mkdir -p %{_builddir}/its -export GETTEXTDATADIR=%{_builddir} -cp -r %{S:5} %{_builddir}/its -cp -r %{S:6} %{_builddir}/its %cmake -DENABLE_PRESAGE=On -DCMAKE_SKIP_RPATH=OFF -DCMAKE_INSTALL_SYSCONFDIR=%{_sysconfdir} %make_build @@ -178,11 +172,6 @@ mkdir -p %{buildroot}%{_libdir}/fcitx5/qt5 # install macros.fcitx5 install -Dm 0755 %{SOURCE4} %{buildroot}%{_sysconfdir}/rpm/macros.fcitx5 -# install gettext its rules -mkdir -p %{buildroot}%{_datadir}/gettext/its -install -Dm 0755 %{S:5} %{buildroot}%{_datadir}/gettext/its -install -Dm 0755 %{S:6} %{buildroot}%{_datadir}/gettext/its - %find_lang fcitx5 %fdupes %{buildroot} @@ -221,8 +210,6 @@ install -Dm 0755 %{S:6} %{buildroot}%{_datadir}/gettext/its %{_libdir}/libFcitx5Core.so %{_libdir}/libFcitx5Utils.so %{_libdir}/pkgconfig/Fcitx5*.pc -%{_datadir}/gettext/its/appdata.its -%{_datadir}/gettext/its/appdata.loc %files -n libFcitx5Config6 %{_libdir}/libFcitx5Config.so.6