From a14daa1e033e10d7cc3d237c36bb8df49b772f86a0cf45a4a6012e8a32624863 Mon Sep 17 00:00:00 2001 From: Fuminobu Takeyama Date: Fri, 2 Jan 2026 16:54:24 +0000 Subject: [PATCH] - Use return instead of exit in 20-fcitx-plasma-setup.sh * Fix boo#1255237 - Replace "IBus" with "Fcitx" in a log message OBS-URL: https://build.opensuse.org/package/show/M17N/fcitx5?expand=0&rev=71 --- .gitattributes | 25 ++ .gitignore | 1 + 20-fcitx5-plasma-setup.sh | 60 +++++ Fcitx.svg | 3 + fcitx5-5.0.13-memfd.patch | 12 + fcitx5-5.1.13-xcb.patch | 36 +++ fcitx5-5.1.13_dict.tar.zst | 3 + fcitx5-autostart | 10 + fcitx5-gcc7.patch | 62 +++++ fcitx5.changes | 451 +++++++++++++++++++++++++++++++++++++ fcitx5.service | 10 + fcitx5.spec | 284 +++++++++++++++++++++++ macros.fcitx5 | 8 + xim.d-fcitx5 | 12 + 14 files changed, 977 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 20-fcitx5-plasma-setup.sh create mode 100644 Fcitx.svg create mode 100644 fcitx5-5.0.13-memfd.patch create mode 100644 fcitx5-5.1.13-xcb.patch create mode 100644 fcitx5-5.1.13_dict.tar.zst create mode 100644 fcitx5-autostart create mode 100644 fcitx5-gcc7.patch create mode 100644 fcitx5.changes create mode 100644 fcitx5.service create mode 100644 fcitx5.spec create mode 100644 macros.fcitx5 create mode 100644 xim.d-fcitx5 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..974b06d --- /dev/null +++ b/.gitattributes @@ -0,0 +1,25 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text +## Specific LFS patterns +Fcitx.svg filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/20-fcitx5-plasma-setup.sh b/20-fcitx5-plasma-setup.sh new file mode 100644 index 0000000..042f3c1 --- /dev/null +++ b/20-fcitx5-plasma-setup.sh @@ -0,0 +1,60 @@ +#!/bin/sh + +# +# If the virtual keyboard of Plasma Wayland has not been configured, +# configure it for this IM. +# + +im_name="fcitx" +desktop_file="/usr/share/applications/org.fcitx.Fcitx5.desktop" + +# Do nothing for X11 session +if [ "$XDG_SESSION_TYPE" != "wayland" ]; then + return 0 +fi + +# Do nothing if kreadconfig6 is not available +if ! command -v kreadconfig6 >/dev/null 2>&1; then + return 0 +fi + +# check current virtual keyboard +current_im=$(kreadconfig6 --file kwinrc --group Wayland --key InputMethod) + +# +# initialize virtual keyboard if not configured yet +# + +# check if $XDG_CONFIG_HOME/plasma_wayland_input_method_configured does not exist +config_dir="${XDG_CONFIG_HOME:-$HOME/.config}" +stamp_file="$config_dir/plasma_wayland_input_method_configured" +if [ ! -e "$stamp_file" ]; then + mkdir -p "$config_dir" + echo "$im_name" > "$stamp_file" + + # check current virtual keyboard is None + if [ -z "$current_im" ]; then + # The virtual keyboard is not configured + echo "$0 is configuring the virtual keyboard for Fcitx." + current_im=$desktop_file + kwriteconfig6 --file kwinrc --group Wayland --key InputMethod $current_im + else + echo "$0 detected a virtual keyboard configured." + fi +fi + +# +# export environment variables for applications running on Xwayland +# +if [ "$current_im" = "$desktop_file" ]; then + # do not override Qt IM module settings + if [ -z "$QT_IM_MODULE" ] && [ -z "$QT_IM_MODULES" ]; then + echo "$0 is setting QT_IM_MODULES for $im_name." + export QT_IM_MODULES="wayland;$im_name" + fi + # do not override xim settings + if [ -z "$XMODIFIERS" ]; then + echo "$0 is setting XMODIFIERS for $im_name." + export XMODIFIERS="@im=$im_name" + fi +fi diff --git a/Fcitx.svg b/Fcitx.svg new file mode 100644 index 0000000..7391487 --- /dev/null +++ b/Fcitx.svg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dd8a54ea3019d7c24d79c02e50afde6ec087e9c50026447bfa31f399db9ca823 +size 108122 diff --git a/fcitx5-5.0.13-memfd.patch b/fcitx5-5.0.13-memfd.patch new file mode 100644 index 0000000..2cd3806 --- /dev/null +++ b/fcitx5-5.0.13-memfd.patch @@ -0,0 +1,12 @@ +Index: fcitx5-5.0.13/src/ui/classic/buffer.cpp +=================================================================== +--- fcitx5-5.0.13.orig/src/ui/classic/buffer.cpp ++++ fcitx5-5.0.13/src/ui/classic/buffer.cpp +@@ -23,6 +23,7 @@ + #include "wl_shm.h" + #include "wl_shm_pool.h" + #include "wl_surface.h" ++#include + + namespace fcitx::wayland { + diff --git a/fcitx5-5.1.13-xcb.patch b/fcitx5-5.1.13-xcb.patch new file mode 100644 index 0000000..4b1cb41 --- /dev/null +++ b/fcitx5-5.1.13-xcb.patch @@ -0,0 +1,36 @@ +Index: fcitx5-5.1.13/src/modules/xcb/xcbmodule.cpp +=================================================================== +--- fcitx5-5.1.13.orig/src/modules/xcb/xcbmodule.cpp ++++ fcitx5-5.1.13/src/modules/xcb/xcbmodule.cpp +@@ -212,6 +212,7 @@ bool XCBModule::exists(const std::string + return conns_.contains(name); + } + ++#ifdef XCB_XFIXES_SET_CLIENT_DISCONNECT_MODE + bool XCBModule::isClientDisconnectModeTerminate() const { + return *config_.clientDisconnectModeTerminate == + ClientDisconnectModeTerminate::Yes || +@@ -219,6 +220,7 @@ bool XCBModule::isClientDisconnectModeTe + ClientDisconnectModeTerminate::Auto && + getDesktopType() == DesktopType::GNOME); + } ++#endif + + class XCBModuleFactory : public AddonFactory { + public: +Index: fcitx5-5.1.13/src/modules/xcb/xcbmodule.h +=================================================================== +--- fcitx5-5.1.13.orig/src/modules/xcb/xcbmodule.h ++++ fcitx5-5.1.13/src/modules/xcb/xcbmodule.h +@@ -113,9 +113,9 @@ public: + void setXkbOption(const std::string &name, const std::string &option); + + bool exists(const std::string &name); +- ++#ifdef XCB_XFIXES_SET_CLIENT_DISCONNECT_MODE + bool isClientDisconnectModeTerminate() const; +- ++#endif + FCITX_ADDON_DEPENDENCY_LOADER(notifications, instance_->addonManager()); + FCITX_ADDON_DEPENDENCY_LOADER(waylandim, instance_->addonManager()); + diff --git a/fcitx5-5.1.13_dict.tar.zst b/fcitx5-5.1.13_dict.tar.zst new file mode 100644 index 0000000..a14cd01 --- /dev/null +++ b/fcitx5-5.1.13_dict.tar.zst @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:328832b52e8728560869b24679bdedfc591c26e592da7340c5ca373c50733cbb +size 8370774 diff --git a/fcitx5-autostart b/fcitx5-autostart new file mode 100644 index 0000000..e558c30 --- /dev/null +++ b/fcitx5-autostart @@ -0,0 +1,10 @@ +#!/bin/sh + +# Note: +# systemd-inputmethod-generator rewrite $INPUT_METHOD from fcitx5 to fcitx +# This works because fcitx and fcitx5 cannot be installed together. +case $INPUT_METHOD in +fcitx | fcitx5) + /usr/bin/fcitx5 -D + ;; +esac diff --git a/fcitx5-gcc7.patch b/fcitx5-gcc7.patch new file mode 100644 index 0000000..3644403 --- /dev/null +++ b/fcitx5-gcc7.patch @@ -0,0 +1,62 @@ +Index: fcitx5-5.1.11/src/frontend/ibusfrontend/ibusfrontend.cpp +=================================================================== +--- fcitx5-5.1.11.orig/src/frontend/ibusfrontend/ibusfrontend.cpp ++++ fcitx5-5.1.11/src/frontend/ibusfrontend/ibusfrontend.cpp +@@ -598,23 +598,39 @@ private: + FCITX_OBJECT_VTABLE_WRITABLE_PROPERTY( + contentType, "ContentType", "(uu)", + ([]() -> dbus::DBusStruct { return {0, 0}; }), ++#if __GNC__ < 9 ++ ([&](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)", ++#if __GNC__ < 9 ++ ([&]() -> 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); + FCITX_OBJECT_VTABLE_WRITABLE_PROPERTY( + effectivePostProcessKeyEvent, "EffectivePostProcessKeyEvent", "(b)", ++#if __GNC__ < 9 ++ ([&]() -> dbus::DBusStruct { ++ return {effectivePostProcessKeyEvent_}; ++ }), ++ ([&](dbus::DBusStruct value) { ++#else + ([this]() -> dbus::DBusStruct { + return {effectivePostProcessKeyEvent_}; + }), + ([this](dbus::DBusStruct value) { ++#endif + effectivePostProcessKeyEvent_ = std::get<0>(value); + }), + dbus::PropertyOption::Hidden); +Index: fcitx5-5.1.11/test/testdbus.cpp +=================================================================== +--- fcitx5-5.1.11.orig/test/testdbus.cpp ++++ fcitx5-5.1.11/test/testdbus.cpp +@@ -70,8 +70,13 @@ private: + FCITX_OBJECT_VTABLE_PROPERTY(testProperty, "testProperty", "i", + []() { return 5; }); + FCITX_OBJECT_VTABLE_WRITABLE_PROPERTY( ++#if __GNUC__ < 9 ++ testProperty2, "testProperty2", "i", [&]() { return prop2; }, ++ [&](int32_t v) { prop2 = v; }); ++#else + testProperty2, "testProperty2", "i", [this]() { return prop2; }, + [this](int32_t v) { prop2 = v; }); ++#endif + }; + + #define TEST_SERVICE "org.fcitx.Fcitx.TestDBus" diff --git a/fcitx5.changes b/fcitx5.changes new file mode 100644 index 0000000..534c4bb --- /dev/null +++ b/fcitx5.changes @@ -0,0 +1,451 @@ +------------------------------------------------------------------- +Wed Dec 17 15:30:13 UTC 2025 - Fuminobu Takeyama + +- Use return instead of exit in 20-fcitx-plasma-setup.sh + * Fix boo#1255237 +- Replace "IBus" with "Fcitx" in a log message + +------------------------------------------------------------------- +Mon Sep 15 13:40:18 UTC 2025 - Fuminobu Takeyama + +- Add an initial setup feature for Plasma Wayland + * enables Fcitx5 as the active virtual keyboard on the first login, + allowing users to input text using Fcitx5 without manual configuration + * Fix boo#1084804, boo#1246423 + +------------------------------------------------------------------- +Fri Aug 15 14:15:41 UTC 2025 - Fuminobu Takeyama + +- Fix Fcitx 5 not starting on Plasma Wayland + * A regression of the previous fix for boo#1246418 + * Run ibus-autostart only from the desktop file for XDG autostart + * Drop fcitx5-autostart.patch + +------------------------------------------------------------------- +Sun Jul 13 06:01:14 UTC 2025 - Fuminobu Takeyama + +- Add fcitx-autostart to check $INPUT_METHOD so that fcitx5 does + not breake the other input methods + * Fix boo#1246418 + * Add fcitx5-autostart.patch + +------------------------------------------------------------------- +Fri Jun 20 13:42:02 UTC 2025 - Marguerite Su + +- update version 5.1.13 + * StandardPaths replaces StandardPath, with better support to new + safeSave behavior if the target is symbolic link. In the old version, + you have to symlink on the directory, instead of the file. Now the + symlink file will not be overwritten. + * New FDStreamBuf API for std::iostream on file descriptor. + * new environ.h API for environment variable handling + * On new UKUI desktop, ukui-control-center will be used for configtool + * forward modifier to compositor in zwp input method v1 + * Fix modifier only hotkey handling #1289 +- add fcitx5-5.1.13-xcb.patch, fix build leap 15.6 + +------------------------------------------------------------------- +Wed Jan 29 06:45:37 UTC 2025 - Marguerite Su + +- Update to 5.1.12 + * new addon factory mechanism to allow static link + * modifier only key timeout + * improve virtual keyboard object handling for zwp_input_method_v2 + +------------------------------------------------------------------- +Sat Jan 4 11:19:52 UTC 2025 - Marguerite Su + +- Update to 5.1.11 + * Fix issue in XIM client when type with mouse click + * Fix compiling error with GCC 15 + * Fix wrong border color in classic ui + +------------------------------------------------------------------- +Tue Sep 10 02:20:28 UTC 2024 - Arnav Singh + +- Update to 5.1.10 + * New candidate action API, planned to be used for mac/android port. + * There was an issue between fcitx 5.1.9 and the wayland compositor that + uses zwp_input_method_v2. For now the relevant change in fcitx5 + was reverted. + * There is also a crash due to a bug on fcitx's wayland frontend. The + crash may be triggered when the system is slow. + * There is a design flaw in StandardPath::multiOpen API that may open + too many files and exhaust the fd that it can open. Alternative API is + implemented and engines are adapted to the new API in this release. + +------------------------------------------------------------------- +Wed May 22 07:44:16 UTC 2024 - Marguerite Su + +- Update to 5.1.9 + * Add support to recognize passwords in clipboard and allow + automatically clear after a certain amount of time, and + also hide them when displaying it. This feature is not + widely supported, the known application supports it including + keepassxc, plasma-pass. You can also configure to ask fcitx + clipboard to ignore all such marked passwords. + * Fix repeat info is not correctly populated from wayland + * Unicode addon now supports Unicode 15.1 + * FIx an issue that under certain cases, the X popup window + may still out of screen. + * A new option to reset input method active state on focus in. + * fix wayland im frontend check on whether a key should repeat + +------------------------------------------------------------------- +Sun Feb 4 14:17:28 UTC 2024 - Marguerite Su + +- Update to 5.1.7 + * fix some crash bugs introduced when porting to libuv + * some minor improvements on launching fcitx5 +- Changes in 5.1.6 + * don't allow restart from UI when running with wayland im protocol + * improve ProcessKeyBatch to support delete surrounding + * Fix fractional scale rounding to follow the spec + * fix minor compatibility in ibus frontend with ibus 1.5.29 so ibus + im module won't spam the log + * fix modifier only hyper key detection + * don't use xcb grab key when wayland im module already has a grab +- Changes in 5.1.2 + * Fix dbus signature template parsing for certain signatures + * Add environment warning message under Wayland, to help + user to set it right + Act as a warning to distro (fedora/debian) that their tools do not + work under wayland properly. + * Fix virtual keyboard event not flushing wayland connection + * Add option to allow configure auto save behavior + * Make wayland event reading in a separate thread. + * Fix portal value not being read at start up. + * Add an option to allow use of the input method in password field + * make file system API respect umask settings, especially for safeSave + * Support bulk candidate list without a known size. + +------------------------------------------------------------------- +Tue Oct 3 07:33:20 UTC 2023 - Marguerite Su + +- Update to 5.1.1 + * Add accent color support + * SNI tray icon fix, including: + * workaround GNOME appindicator extension: + https://github.com/ubuntu/gnome-shell-extension-appindicator/issues/468 + * Fix icon change when menu pops up + * Fix some issue caused by zwp_input_method_v1 on chrome/electron + * Add support for changing keyboard layout under GNOME. Please note, + the input source will be overridden with this feature. + +------------------------------------------------------------------- +Sun Aug 20 05:44:46 UTC 2023 - Marguerite Su + +- Update to 5.1.0 + * new virtualkeyboard api and service + * fix a cairo usage in classicui when X11 connection ends + * avoid sending empty preedit updates when not necessary + * fix plasma theme when plasma generator is installed but can't be used. + * fix some bug in charutils/stringutils API + * integrate im module probing to fcitx5-diagnose + * allow text icons to be forcibly used with kimpanel + * dark mode support + * quick phrase emoji update +- drop FTBFS-fcitx5-5.0.23-fmt.patch + +------------------------------------------------------------------- +Mon May 22 09:45:48 UTC 2023 - Marguerite Su + +- Update to 5.0.23 + * fix a regression in certain Super(Win key) related +hotkey handling +- Changes in 5.0.22 + * implement application name detection on wayland for text-input +client when using KDE / wlroots. + * fix xkb rule parsing + * fix SNI tray menu radio icon + * avoid forwarding key in certain cases. + * support xkb rule defined in ~/.config/xkb ~/.xkb + * fcitx5-configtool now use "command" instead of "which" + * Improve commit preedit behavior when focus out +- Add FTBFS-fcitx5-5.0.23-fmt.patch + +------------------------------------------------------------------- +Thu Nov 24 14:22:12 UTC 2022 - Fusion Future + +- Update to 5.0.21 + * Setting Share state to "All" may make "Active by default" not + working + * Fix a random sigsegv fault when using the sni tray icon upon + start up. + +------------------------------------------------------------------- +Sun Nov 20 10:38:19 UTC 2022 - Fusion Future + +- Update to 5.0.20 + * Remove the dependency on emoji cldr, now all the data are bundled + within fcitx. + * Fix several different SNI based tray icon issues, includes: + - gnome-extension-appindicator may sometimes not show the icon. + - reduce the number of dbus messages sent when the icon does not + change. + - reduce the number of dbus message on start up + * Fix a bug in fcitx4frontend when non-default X11 connection closes. + * Add support to get current input method name in fcitx5-remote + * The Unicode module got a Gtk-style Ctrl+Shift+U to type unicode + directly with fewer key presses. + * Fix on certain systems that CLIPBOARD is not monitored correctly + on first start up. + * Always tries to load a Compose table if there is nothing matched + with current locale. + * Auto generated plasma theme can not be configured anymore because + it's always generated automatically. + +------------------------------------------------------------------- +Fri Oct 7 12:34:18 UTC 2022 - Marguerite Su + +- according to upstream, XMODIFIERS and QT/GTK_IM_MODULE should + set to fcitx instead of fcitx5 + +------------------------------------------------------------------- +Sat Oct 1 16:26:46 UTC 2022 - Andreas Stieger + +- build with enchant-2 again (boo#1203575) + +------------------------------------------------------------------- +Tue Sep 20 13:29:06 UTC 2022 - Marguerite Su + +- update version 5.0.19 + * classicui: support blur mask on kwin (x11&wayland) + * xim: fix preedit start callback +- switch source to _dict variant and drop + * en_dict-20121020.tar.gz + * fcitx5-no-download.patch +- drop 0001-Remove-unused-xkbcommon-headers.patch, + upstreamed + +------------------------------------------------------------------- +Mon Sep 19 07:43:09 UTC 2022 - Michal Suchanek + +- Fix the fcitx 4 obsoletes - obsoleting fcitx <= 4.2.9.8 does not suffice, we + are at fcitx-4.2.9.9-1.2 + +------------------------------------------------------------------- +Tue Jul 5 11:29:25 UTC 2022 - Fusion Future + +- Update to 5.0.18 + * Support for plasma themes in classicui + * Fix client cursor disappears when using qt text-input-v2 + * Fix clear text when ctrl+c when using gtk text-input-v3 + * Fix a rare wayland protocol error on sway +- Fix build by removing unused headers (gh#fcitx/fcitx5#538) + * 0001-Remove-unused-xkbcommon-headers.patch +- Replace raw package name with pkgconfig() +- Remove "ENABLE_PRESAGE", it's not used anywhere + (https://github.com/fcitx/fcitx5/commit/e7348f0f972d7f4934f3a1dd1258a51d7d057ac4) + +------------------------------------------------------------------- +Sat Mar 12 08:17:03 UTC 2022 - Marguerite Su + +- update version 5.0.15 + * bugfix release, drop EGL in classic UI + +------------------------------------------------------------------- +Fri Feb 25 04:54:52 UTC 2022 - Marguerite Su + +- systemd user env generator moved to package systemd-inputmethod-generator +- fcitx4 further splits its libraries, adds new Provides/Obsoletes + +------------------------------------------------------------------- +Wed Feb 16 13:56:19 UTC 2022 - Marguerite Su + +- fix preun scirpt + +------------------------------------------------------------------- +Sat Feb 12 02:13:30 UTC 2022 - Marguerite Su + +- update version 5.0.14 + * support populate keyboard layout configuration to KDE5 + under wayland. + * A fcitx5-wayland-launcher tool to use the same fcitx + instance with multiple wayland compositors. + * Fix a crash when building with libevent. + * Generates coredump on crash. + * Refactor wl_shm code to use modern shared memory API + on linux/BSD + * Fix wayland input method protocol under weston + * Fix paging button not clickable under vertical layout + +------------------------------------------------------------------- +Tue Feb 8 13:59:25 UTC 2022 - Marguerite Su + +- drop baselibs.conf, no consumer yet + +------------------------------------------------------------------- +Sun Jan 23 05:01:56 UTC 2022 - Marguerite Su + +- update version 5.0.13 + * bug fix release +- change in 5.0.12 + * A lot of fixes in zwp_input_method_v1 to make it ready to be used + with future Plasma 5.24 native wayland input method support. With + the next Plasma release (not out yet as of today), you should be + able to directly select fcitx in the "Virtual keyboard KCM" (it was + designed for on screen keyboard so the naming is a little bit + confusing at this point) and use it with native wayland input + method protocols. This allows some non-gtk/qt text-input-v{2,3} + applications to be used with the input method under kwin. +- add fcitx5-5.0.13-memfd.patch + +------------------------------------------------------------------- +Thu Jan 20 08:06:20 CET 2022 - tiwai@suse.de + +- Fix xim.d script for KDE Plasma (boo#1194916); + $WINDOWMANAGER check needs to be adjusted + +------------------------------------------------------------------- +Sat Jan 15 05:05:58 UTC 2022 - Marguerite Su + +- can start via systemd user service on wayland +- fix typo and requirements + +------------------------------------------------------------------- +Wed Dec 8 01:49:47 UTC 2021 - Tranter Madi + +- update to version 5.0.11 + +------------------------------------------------------------------- +Sat Nov 6 19:07:10 UTC 2021 - J + +- update to version 5.0.9 + * Wayland repeat key fix under native wayland input method protocol + * Improved fcitx5-diagnose to include more information + * Screen DPI detection fixing, now you can change DPI on the fly without the need to restart fcitx. + This also fixed another issue about when fcitx does not pick up DPI change upon login. + * Fix XWindow based tray menu + * Fix multi-screen detection with xrandr. Under certain cases, screen change may not be automatically picked up. + + +------------------------------------------------------------------- +Thu Oct 28 16:09:32 CEST 2021 - tiwai@suse.de + +- Fix build with Leap 15.3 and 15.4 due to rsvg pkg conflicts + +------------------------------------------------------------------- +Wed May 5 06:57:39 UTC 2021 - Marguerite Su + +- update version 5.0.8 + * Fix key repeating with wayland input method protocol + * Workaround SNI gnome extension for "empty icon" or + duplicate icon with kimpanel issue. + * The Unicode addon trigger key is now configurable. + * Fix some BSD build issue + * Fix key grab when the input method group is added or removed. + +------------------------------------------------------------------- +Thu Apr 22 06:41:09 UTC 2021 - Marguerite Su + +- update version 5.0.7 + * Fix reforwarding event value + +------------------------------------------------------------------- +Thu Apr 22 06:39:14 UTC 2021 - Marguerite Su + +- update version 5.0.6 + * Improve the build ability on android/ios, more options can be disabled. + * xim uses sync mode + * Reload new addon at runtime with version check. + * Bug fix on rotated screen. + * Use fixed line height for classicui. + * Fix "Default" value for classicui + * Add sub mode label to input method + +------------------------------------------------------------------- +Tue Mar 16 01:18:32 UTC 2021 - Marguerite Su + +- update version 5.0.5 + * Add a new client side ui api to have extensive support for the + client side input panel + * Fix a bunch of issue in classic ui theme and add an option for + customize border if image is not used. + * fix ibus frontend content type + * reduce the memory usage by making unicode data load on demand. + +------------------------------------------------------------------- +Sat Jan 30 09:39:06 UTC 2021 - Marguerite Su + +- update version 5.0.4 + * Supporting resolving the session dbus address exported to X11 + * Add long press support for special symbol, this is disabled by default and also customizable. + * Avoid trigger dbus activation for "fcitx5-remote -e" + * In order to support "old" fcitx im module bundled, added a new fcitx4 frontend (mainly to support wps-office out of box). + +------------------------------------------------------------------- +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 + +- update version 5.0.3 + +------------------------------------------------------------------- +Sat Nov 28 05:12:34 UTC 2020 - Marguerite Su + +- Move the startup snippet to /usr/etc/X11/xim.d for TW + +------------------------------------------------------------------- +Sun Nov 8 03:48:55 UTC 2020 - Marguerite Su + +- update version 5.0.1 + +------------------------------------------------------------------- +Fri Oct 30 22:58:18 UTC 2020 - Xu Zhao + +- Update the spec file to obselete fcitx < 4.99.0 + +------------------------------------------------------------------- +Mon Oct 19 14:58:40 UTC 2020 - xia lei + +- Update to version 4.99+git20201015.dd9dc94: + * Preload default input method configured in the group. + * Add logger type for multimap/set. + * Batch multiple commit string together + * Make candidate list key based label support more key + * add fcitx5-diagnose + * add support for modifying default configuration at runtime + +------------------------------------------------------------------- +Thu Sep 3 05:46:46 UTC 2020 - Marguerite Su + +- update to 4.99.0+git20200902.a87f7b0 + +------------------------------------------------------------------- +Wed Sep 2 04:48:40 UTC 2020 - Marguerite Su + +- FTBFS for Tumbleweed + * add fcitx5-std-runtime_error.patch, std::runtime_error is in + stdexcept.h + +------------------------------------------------------------------- +Tue Mar 3 21:17:37 UTC 2020 - Xu Zhao + +- update to version 4.99.0+git20200212.9436416 + * Add log functionality for surrounding text + * Add fsync before rename + * Add shorthand append for candidate list + * Make cldr emoji annotation as required + * Add emoji module and emoji typing in keyboard module +- add build-requires cldr-emoji-annotation-devel +- fix build errors on openSUSE_Leap_15.2 + +------------------------------------------------------------------- +Sat Nov 9 03:45:28 UTC 2019 - Marguerite Su + +- fix build-requires for factory/tumbleweed + rsvg-convert tool is now in rsvg-convert package + +------------------------------------------------------------------- +Sat May 25 04:20:05 UTC 2019 - Marguerite Su + +- update version 4.99.0+git20181128.984f3f2 + +------------------------------------------------------------------- +Sat Aug 25 05:48:59 UTC 2018 - i@marguerite.su + +- initial package diff --git a/fcitx5.service b/fcitx5.service new file mode 100644 index 0000000..a42f30f --- /dev/null +++ b/fcitx5.service @@ -0,0 +1,10 @@ +[Unit] +Description=Next generation of Flexible Input Method Framework +Conflicts=ibus.service fcitx.service + +[Service] +ExecStart=/usr/bin/fcitx5 -D + +[Install] +Alias=input-method.service +WantedBy=default.target diff --git a/fcitx5.spec b/fcitx5.spec new file mode 100644 index 0000000..43051c2 --- /dev/null +++ b/fcitx5.spec @@ -0,0 +1,284 @@ +# +# spec file for package fcitx5 +# +# Copyright (c) 2025 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%if ! %{defined _distconfdir} +%define _distconfdir %{_sysconfdir} +%endif +%if ! %{defined _environmentdir} +%define _environmentdir %{_prefix}/lib/environment.d +%endif +Name: fcitx5 +Version: 5.1.13 +Release: 0 +Summary: Next generation of fcitx +License: LGPL-2.1-or-later +Group: System/I18n/Chinese +URL: https://github.com/fcitx/fcitx5 +Source: https://download.fcitx-im.org/fcitx5/%{name}/%{name}-%{version}_dict.tar.zst +Source2: https://raw.githubusercontent.com/fcitx/fcitx-artwork/master/logo/Fcitx.svg +Source3: xim.d-fcitx5 +Source4: macros.fcitx5 +Source5: fcitx5-autostart +Source6: 20-fcitx5-plasma-setup.sh +Source102: fcitx5.service +Patch1: fcitx5-gcc7.patch +Patch2: fcitx5-5.0.13-memfd.patch +Patch3: fcitx5-5.1.13-xcb.patch +BuildRequires: cmake +BuildRequires: dbus-1-devel +BuildRequires: extra-cmake-modules +BuildRequires: fdupes +BuildRequires: hicolor-icon-theme +BuildRequires: ninja +BuildRequires: pkgconfig +BuildRequires: update-desktop-files +BuildRequires: xcb-util-wm-devel +BuildRequires: xkeyboard-config +BuildRequires: zstd +BuildRequires: pkgconfig(cairo) +BuildRequires: pkgconfig(cldr-emoji-annotation) +BuildRequires: pkgconfig(enchant-2) +BuildRequires: pkgconfig(expat) +BuildRequires: pkgconfig(fmt) +BuildRequires: pkgconfig(gdk-pixbuf-2.0) +BuildRequires: pkgconfig(iso-codes) +BuildRequires: pkgconfig(json-c) +BuildRequires: pkgconfig(libsystemd) +BuildRequires: pkgconfig(libuv) +BuildRequires: pkgconfig(pango) +BuildRequires: pkgconfig(uuid) +BuildRequires: pkgconfig(wayland-client) +BuildRequires: pkgconfig(wayland-egl) +BuildRequires: pkgconfig(wayland-protocols) +BuildRequires: pkgconfig(xcb) +BuildRequires: pkgconfig(xcb-imdkit) +BuildRequires: pkgconfig(xcb-keysyms) +BuildRequires: pkgconfig(xkbcommon) +BuildRequires: pkgconfig(xkbcommon-x11) +BuildRequires: pkgconfig(xkbfile) +Provides: fcitx = %{version} +Obsoletes: fcitx < 5 +Provides: inputmethod +%systemd_requires +%if 0%{?suse_version} >= 1550 +BuildRequires: gcc-c++ +%else +BuildRequires: gcc13-c++ +%endif +%if 0%{?suse_version} <= 1520 +BuildRequires: appstream-glib-devel +%endif +%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150200 && 0%{?is_opensuse} +BuildRequires: rsvg-convert +%else +BuildRequires: rsvg-view +%endif + +%description +Fcitx 5 is a generic input method framework. + +%package devel +Summary: Development files for fcitx5 +Group: Development/Libraries/C and C++ +Requires: fcitx5 = %{version} +Requires: libFcitx5Config6 = %{version} +Requires: libFcitx5Core7 = %{version} +Requires: libFcitx5Utils2 = %{version} +Provides: fcitx-devel = %{version} +Obsoletes: fcitx-devel < 5 + +%description devel +This package provides development files for fcitx5. + +%package -n libFcitx5Config6 +Summary: Configuration library for fcitx5 +Group: System/Libraries +Provides: libFcitx5Config5 = %{version} +Obsoletes: libFcitx5Config5 < %{version} +Obsoletes: libfcitx-config4 < 5 + +%description -n libFcitx5Config6 +This package provides configuration libraries for fcitx5. + +%package -n libFcitx5Core7 +Summary: Core library for fcitx5 +Group: System/Libraries +Provides: libfcitx-4_2_9 = %{version} +Obsoletes: libfcitx-4_2_9 < 5 +Provides: libFcitx5Core5 = %{version} +Obsoletes: libFcitx5Core5 < %{version} +Provides: libfcitx-core0 = %{version} +Obsoletes: libfcitx-core0 < 5 + +%description -n libFcitx5Core7 +This package provides core libraries for fcitx5. + +%package -n libFcitx5Utils2 +Summary: Utility library for fcitx5 +Group: System/Libraries +Provides: libFcitx5Utils1 = %{version} +Obsoletes: libFcitx5Utils1 < %{version} +Provides: libfcitx-utils0 = %{version} +Obsoletes: libfcitx-utils0 < 5 + +%description -n libFcitx5Utils2 +This package provides utility libraries for fcitx5. + +%prep +%autosetup -p1 + +%build +%if 0%{?suse_version} < 1550 +export CC=%{_bindir}/gcc-13 +export CXX=%{_bindir}/g++-13 +%endif +%cmake -DCMAKE_SKIP_RPATH=OFF -DCMAKE_INSTALL_SYSCONFDIR=%{_sysconfdir} +%cmake_build + +%install +%cmake_install +# Run fcitx5-autostart instead of fcitx5 for /etc/xdg/autostart/org.fcitx.Fcitx5.desktop +# Note that /usr/share/applications/org.fcitx.Fcitx5.desktop executes fcitx5 directly. +sed -i 's|Exec=%{_bindir}/fcitx5|Exec=%{_bindir}/fcitx5-autostart|' %{buildroot}%{_sysconfdir}/xdg/autostart/org.fcitx.Fcitx5.desktop + +# create autostart +mkdir -p %{buildroot}%{_distconfdir}/X11/xim.d/ +install -m 644 %{SOURCE3} %{buildroot}%{_distconfdir}/X11/xim.d/fcitx5 + +priority=30 +pushd %{buildroot}%{_distconfdir}/X11/xim.d/ + for lang in am ar as bn el fa gu he hi hr ja ka kk kn ko lo ml my \ + pa ru sk vi zh_TW zh_CN zh_HK zh_SG \ + de fr it es nl cs pl da nn nb fi en sv ; do + mkdir $lang + pushd $lang + ln -s ../fcitx5 $priority-fcitx5 + popd + done +popd + +install -m 755 %{SOURCE5} %{buildroot}%{_bindir}/fcitx5-autostart +install -D -m 0755 %{SOURCE6} %{buildroot}%{_distconfdir}/xdg/plasma-workspace/env/20-fcitx5-plasma-setup.sh +install -D -m 0644 %{SOURCE102} %{buildroot}%{_userunitdir}/fcitx5.service + +# install icons +for i in 16 22 24 32 48 512; do + mkdir -p %{buildroot}%{_datadir}/icons/hicolor/${i}x${i}/apps/ + rsvg-convert -h $i -w $i %{SOURCE2} -o %{buildroot}%{_datadir}/icons/hicolor/${i}x${i}/apps/fcitx.png +done +install -D -m 0644 %{SOURCE2} %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/fcitx.svg + +# install desktop files +%suse_update_desktop_file %{buildroot}%{_datadir}/applications/org.fcitx.Fcitx5.desktop Utility DesktopUtility +%suse_update_desktop_file -r fcitx5-configtool Settings DesktopSettings + +# own directories +mkdir -p %{buildroot}%{_datadir}/fcitx5/inputmethod +mkdir -p %{buildroot}%{_libdir}/fcitx5/qt5 + +# install macros.fcitx5 +install -Dm 0644 %{SOURCE4} %{buildroot}%{_prefix}/lib/rpm/macros.d/macros.fcitx5 + +%find_lang fcitx5 +%fdupes %{buildroot} + +%if 0%{?suse_version} >= 1550 +%systemd_user_pre fcitx5.service +%systemd_user_post fcitx5.service +%systemd_user_preun fcitx5.service +%systemd_user_postun fcitx5.service +%else + +%pre +if [ -x %{_bindir}/systemctl ]; then + if [ ! -e "%{_prefix}/lib/systemd/user/%{name}.service" ]; then + mkdir -p /run/systemd/rpm/needs-user-preset + touch "/run/systemd/rpm/needs-user-preset/%{name}.service" + fi +fi + +%post +if [ -x %{_bindir}/systemctl ]; then + if [ -e "/run/systemd/rpm/needs-user-preset/%{name}.service" ]; then + %{_bindir}/systemctl --global preset "%{name}.service" || : + rm "/run/systemd/rpm/needs-user-preset/%{name}.service" || : + fi +fi + +%preun +if [ $1 -eq 0 -a -x %{_bindir}/systemctl ]; then + %{_bindir}/systemctl --global disable %{name}.service || : +fi +%endif + +%post -n libFcitx5Config6 -p /sbin/ldconfig +%post -n libFcitx5Core7 -p /sbin/ldconfig +%post -n libFcitx5Utils2 -p /sbin/ldconfig +%postun -n libFcitx5Config6 -p /sbin/ldconfig +%postun -n libFcitx5Core7 -p /sbin/ldconfig +%postun -n libFcitx5Utils2 -p /sbin/ldconfig + +%files -f fcitx5.lang +%doc README.md +%license LICENSES +%{_distconfdir}/X11/xim.d/ +%dir %{_sysconfdir}/xdg/Xwayland-session.d +%{_sysconfdir}/xdg/Xwayland-session.d/20-fcitx-x11 +%{_sysconfdir}/xdg/autostart/org.fcitx.Fcitx5.desktop +%dir %{_distconfdir}/xdg/plasma-workspace +%dir %{_distconfdir}/xdg/plasma-workspace/env +%{_distconfdir}/xdg/plasma-workspace/env/20-fcitx5-plasma-setup.sh +%{_bindir}/fcitx5 +%{_bindir}/fcitx5-configtool +%{_bindir}/fcitx5-remote +%{_bindir}/fcitx5-diagnose +%{_bindir}/fcitx5-autostart +%{_libdir}/fcitx5 +%{_libexecdir}/fcitx5-wayland-launcher +%{_userunitdir}/fcitx5.service +%{_datadir}/applications/org.fcitx.Fcitx5.desktop +%{_datadir}/applications/fcitx5-configtool.desktop +%{_datadir}/applications/fcitx5-wayland-launcher.desktop +%{_datadir}/fcitx5 +%{_datadir}/icons/hicolor/*/apps/fcitx.* +%{_datadir}/icons/hicolor/*/apps/org.fcitx.Fcitx5.* +%{_datadir}/dbus-1/services/org.fcitx.Fcitx5.service +%{_datadir}/metainfo/org.fcitx.Fcitx5.metainfo.xml + +%files devel +%{_prefix}/lib/rpm/macros.d/macros.fcitx5 +%{_includedir}/Fcitx5 +%{_libdir}/cmake/Fcitx5* +%{_libdir}/libFcitx5Config.so +%{_libdir}/libFcitx5Core.so +%{_libdir}/libFcitx5Utils.so +%{_libdir}/pkgconfig/Fcitx5*.pc + +%files -n libFcitx5Config6 +%{_libdir}/libFcitx5Config.so.6 +%{_libdir}/libFcitx5Config.so.%{version} + +%files -n libFcitx5Core7 +%{_libdir}/libFcitx5Core.so.7 +%{_libdir}/libFcitx5Core.so.%{version} + +%files -n libFcitx5Utils2 +%{_libdir}/libFcitx5Utils.so.2 +%{_libdir}/libFcitx5Utils.so.%{version} + +%changelog diff --git a/macros.fcitx5 b/macros.fcitx5 new file mode 100644 index 0000000..55b65da --- /dev/null +++ b/macros.fcitx5 @@ -0,0 +1,8 @@ +# RPM macros for fcitx5 +%_fcitx5_libdir %{_libdir}/fcitx5 +%_fcitx5_libexecdir %{_fcitx5_libdir}/libexec +%_fcitx5_datadir %{_datadir}/fcitx5 +%_fcitx5_addondir %{_fcitx5_datadir}/addon +%_fcitx5_imconfdir %{_fcitx5_datadir}/inputmethod +%_fcitx5_qt5dir %{_fcitx5_libdir}/qt5 +%_fcitx5_qt6dir %{_fcitx5_libdir}/qt6 diff --git a/xim.d-fcitx5 b/xim.d-fcitx5 new file mode 100644 index 0000000..794e08d --- /dev/null +++ b/xim.d-fcitx5 @@ -0,0 +1,12 @@ +#make sure set these vars before dbus-launch +export LC_CTYPE=$LANG +export XMODIFIERS="@im=fcitx" +export GTK_IM_MODULE=fcitx +export QT_IM_SWITCHER=imsw-multi +export QT_IM_MODULE=fcitx + +# FIXME: a little bit of delay is required to avoid race (boo#947576) +(sleep 2; fcitx5 -d) & + +# success: +return 0 -- 2.51.1