Mon Mar 1 11:13:20 2021 UTC ()
(inputmethod/fcitx5) Fix build, with work around patches for gcc7 bug
It is explained as gcc-7 bug, and we need patch until it is fixed, I'm afraid
See:
https://github.com/fcitx/fcitx5/issues/174
https://build.opensuse.org/package/show/M17N/fcitx5
(mef)
diff -r1.2 -r1.3 pkgsrc/inputmethod/fcitx5/distinfo
diff -r0 -r1.1 pkgsrc/inputmethod/fcitx5/patches/patch-src_frontend_ibusfrontend_ibusfrontend.cpp
diff -r0 -r1.1 pkgsrc/inputmethod/fcitx5/patches/patch-test_testdbus.cpp
--- pkgsrc/inputmethod/fcitx5/distinfo 2021/02/27 19:30:57 1.2
+++ pkgsrc/inputmethod/fcitx5/distinfo 2021/03/01 11:13:20 1.3
$NetBSD: patch-src_frontend_ibusfrontend_ibusfrontend.cpp,v 1.1 2021/03/01 11:13:20 mef Exp $
https://build.opensuse.org/package/view_file/M17N/fcitx5/fcitx5-gcc7.patch?expand=1
--- src/frontend/ibusfrontend/ibusfrontend.cpp.orig 2021-01-28 23:35:42.465005200 +0900
+++ src/frontend/ibusfrontend/ibusfrontend.cpp 2021-03-01 19:17:18.090095671 +0900
@@ -577,14 +577,23 @@ private:
([]() -> dbus::DBusStruct<uint32_t, uint32_t> {
return {0, 0};
}),
+#if __GNUC__ < 8
+ ([&](dbus::DBusStruct<uint32_t, uint32_t> type) {
+#else
([this](dbus::DBusStruct<uint32_t, uint32_t> type) {
+#endif
setContentType(std::get<0>(type), std::get<1>(type));
}),
dbus::PropertyOption::Hidden);
FCITX_OBJECT_VTABLE_WRITABLE_PROPERTY(
clientCommitPreedit, "ClientCommitPreedit", "(b)",
+#if __GNUC__ < 8
+ ([&]() -> dbus::DBusStruct<bool> { return {clientCommitPreedit_}; }),
+ ([&](dbus::DBusStruct<bool> value) {
+#else
([this]() -> dbus::DBusStruct<bool> { return {clientCommitPreedit_}; }),
([this](dbus::DBusStruct<bool> value) {
+#endif
clientCommitPreedit_ = std::get<0>(value);
}),
dbus::PropertyOption::Hidden);
$NetBSD: patch-test_testdbus.cpp,v 1.1 2021/03/01 11:13:20 mef Exp $
https://build.opensuse.org/package/view_file/M17N/fcitx5/fcitx5-gcc7.patch?expand=1
--- fcitx5-5.0.3.orig/test/testdbus.cpp
+++ 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"