mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-11-22 23:07:10 -08:00
app-i18n/fcitx: drop 5.1.12, 5.1.14, 5.1.16
Part-of: https://github.com/gentoo/gentoo/pull/45880 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org> Signed-off-by: Yixun Lan <dlan@gentoo.org>
This commit is contained in:
@@ -1,4 +1 @@
|
||||
DIST fcitx-5.1.12.tar.zst 8317084 BLAKE2B 097881acde8fc1cf6960fd20878bb25c483684ff9ad9ffa133081d91fffd50c53b29998b1577866f10a8cb409a3c0fc96766909f6bdf268313e768de79e372ea SHA512 82943f6c2e809e8d9049d457f59e52bc202daf922abec032efc589eefad77b4db4398fbaea92c019eaeaa40ccf51585a8a80676a7909433a8576dc63fb639645
|
||||
DIST fcitx-5.1.14.tar.zst 8374893 BLAKE2B e390a2faf54ab8f3a3748d72955104b7080ead8f4bb540341902cb3ba985fd77ce19d881ef8ff387a10145b9cf0d403c6d80ffb48d0f951822e3577c20c72344 SHA512 2a85f8d79bbf483b8feb13d7617f67ec4c56e0b7ba7b1328af9fc1f0214999cc73bb1c3a541e7974d00a0a2cb31f91da4cd7709388c91de2f2737c5055fd6563
|
||||
DIST fcitx-5.1.16.tar.zst 8384825 BLAKE2B 42404fcd929cef67d8291a38427d5e6b5c5d552f28f3121a691edf86cd72633db1ddf48bbbf5bcfb5eb80d04c29c9b605d84921f47a3d4720ec5e739ed8022ab SHA512 5d9b340f8be725b61a52d9a0f6f2bd9172f01262f37633c5db6177dd128873db51bbf8222e2117723f423fbd7035c97d3eb447ac587b73c5f17923c12597bc47
|
||||
DIST fcitx-5.1.17.tar.zst 8407147 BLAKE2B 9b99d9a53b5bcd89942b848e3b4adae0e8f950e3a679a2d30b995caadfe09472c7d9611e05f80504874cf8185108914faf1711a29e9a1d258b5789509901cab0 SHA512 fe3f13d7615ae823b0746bd731d0eac4df90b216c22c186c4f63ab71c0450f38adfa558e906a5493bb5eab873bffea913477c8dcb2ba7055668305cf995e235f
|
||||
|
||||
@@ -1,125 +0,0 @@
|
||||
# Copyright 2023-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
MY_PN="fcitx5"
|
||||
|
||||
inherit cmake unpacker xdg
|
||||
|
||||
DESCRIPTION="Fcitx 5 is a generic input method framework"
|
||||
HOMEPAGE="https://fcitx-im.org/ https://github.com/fcitx/fcitx5"
|
||||
SRC_URI="https://download.fcitx-im.org/fcitx5/fcitx5/fcitx5-${PV}_dict.tar.zst -> ${P}.tar.zst"
|
||||
|
||||
S="${WORKDIR}/${MY_PN}-${PV}"
|
||||
LICENSE="LGPL-2+ Unicode-DFS-2016"
|
||||
SLOT="5"
|
||||
KEYWORDS="amd64 arm64 ~loong ~ppc ~ppc64 ~riscv x86"
|
||||
IUSE="+autostart doc +emoji +enchant +keyboard presage +server systemd test wayland +X"
|
||||
REQUIRED_USE="
|
||||
|| ( wayland X )
|
||||
X? ( keyboard )
|
||||
wayland? ( keyboard )
|
||||
"
|
||||
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
RDEPEND="
|
||||
!app-i18n/fcitx:4
|
||||
dev-libs/libfmt
|
||||
sys-devel/gettext
|
||||
virtual/libintl
|
||||
x11-libs/cairo[X?]
|
||||
x11-libs/gdk-pixbuf:2
|
||||
x11-libs/pango[X?]
|
||||
doc? (
|
||||
app-text/doxygen
|
||||
dev-texlive/texlive-fontutils
|
||||
)
|
||||
emoji? ( virtual/zlib:= )
|
||||
enchant? ( app-text/enchant:2 )
|
||||
keyboard? (
|
||||
app-text/iso-codes
|
||||
dev-libs/expat
|
||||
dev-libs/json-c:=
|
||||
x11-misc/xkeyboard-config
|
||||
x11-libs/libxkbcommon[X?,wayland?]
|
||||
)
|
||||
systemd? (
|
||||
sys-apps/systemd
|
||||
)
|
||||
!systemd? (
|
||||
dev-libs/libuv
|
||||
sys-apps/dbus
|
||||
)
|
||||
wayland? (
|
||||
dev-libs/glib:2
|
||||
dev-libs/wayland
|
||||
dev-libs/wayland-protocols
|
||||
dev-util/wayland-scanner
|
||||
)
|
||||
X? (
|
||||
dev-libs/glib:2
|
||||
>=x11-libs/xcb-imdkit-1.0.3:5
|
||||
x11-libs/libX11
|
||||
x11-libs/libxkbfile
|
||||
x11-libs/xcb-util
|
||||
x11-libs/xcb-util-keysyms
|
||||
x11-libs/xcb-util-wm
|
||||
)
|
||||
"
|
||||
DEPEND="${RDEPEND}"
|
||||
BDEPEND="
|
||||
virtual/pkgconfig
|
||||
kde-frameworks/extra-cmake-modules:0
|
||||
"
|
||||
|
||||
PATCHES=( "${FILESDIR}"/${P}-make-x11-dependencies-optional.patch )
|
||||
|
||||
src_configure() {
|
||||
local mycmakeargs=(
|
||||
-DENABLE_DBUS=on
|
||||
-DENABLE_XDGAUTOSTART=$(usex autostart)
|
||||
-DENABLE_SERVER=$(usex server)
|
||||
-DENABLE_KEYBOARD=$(usex keyboard)
|
||||
-DENABLE_TEST=$(usex test)
|
||||
-DENABLE_ENCHANT=$(usex enchant)
|
||||
-DENABLE_EMOJI=$(usex emoji)
|
||||
-DENABLE_PRESAGE=$(usex presage)
|
||||
-DENABLE_WAYLAND=$(usex wayland)
|
||||
-DENABLE_X11=$(usex X)
|
||||
-DENABLE_DOC=$(usex doc)
|
||||
-DUSE_SYSTEMD=$(usex systemd)
|
||||
)
|
||||
cmake_src_configure
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
cmake_src_compile
|
||||
use doc && cmake_src_compile doc
|
||||
}
|
||||
|
||||
src_test() {
|
||||
# break by sandbox
|
||||
local CMAKE_SKIP_TESTS=(
|
||||
testdbus
|
||||
testservicewatcher
|
||||
)
|
||||
cmake_src_test
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cmake_src_install
|
||||
use doc && dodoc -r "${BUILD_DIR}"/doc/*
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
xdg_pkg_postinst
|
||||
|
||||
elog
|
||||
elog "Follow the instructions on:"
|
||||
elog "https://wiki.gentoo.org/wiki/Fcitx#Using_Fcitx"
|
||||
elog "https://fcitx-im.org/wiki/Setup_Fcitx_5"
|
||||
elog "https://fcitx-im.org/wiki/Using_Fcitx_5_on_Wayland"
|
||||
elog
|
||||
}
|
||||
@@ -1,125 +0,0 @@
|
||||
# Copyright 2023-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
MY_PN="fcitx5"
|
||||
|
||||
inherit cmake unpacker xdg
|
||||
|
||||
DESCRIPTION="Fcitx 5 is a generic input method framework"
|
||||
HOMEPAGE="https://fcitx-im.org/ https://github.com/fcitx/fcitx5"
|
||||
SRC_URI="https://download.fcitx-im.org/fcitx5/fcitx5/fcitx5-${PV}_dict.tar.zst -> ${P}.tar.zst"
|
||||
|
||||
S="${WORKDIR}/${MY_PN}-${PV}"
|
||||
LICENSE="LGPL-2+ Unicode-DFS-2016"
|
||||
SLOT="5"
|
||||
KEYWORDS="amd64 arm64 ~loong ~ppc ppc64 ~riscv x86"
|
||||
IUSE="+autostart doc +emoji +enchant +keyboard presage +server systemd test wayland +X"
|
||||
REQUIRED_USE="
|
||||
|| ( wayland X )
|
||||
X? ( keyboard )
|
||||
wayland? ( keyboard )
|
||||
"
|
||||
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
RDEPEND="
|
||||
!app-i18n/fcitx:4
|
||||
dev-libs/libfmt
|
||||
sys-devel/gettext
|
||||
virtual/libintl
|
||||
x11-libs/cairo[X?]
|
||||
x11-libs/gdk-pixbuf:2
|
||||
x11-libs/pango[X?]
|
||||
doc? (
|
||||
app-text/doxygen
|
||||
dev-texlive/texlive-fontutils
|
||||
)
|
||||
emoji? ( virtual/zlib:= )
|
||||
enchant? ( app-text/enchant:2 )
|
||||
keyboard? (
|
||||
app-text/iso-codes
|
||||
dev-libs/expat
|
||||
dev-libs/json-c:=
|
||||
x11-misc/xkeyboard-config
|
||||
x11-libs/libxkbcommon[X?,wayland?]
|
||||
)
|
||||
systemd? (
|
||||
sys-apps/systemd
|
||||
)
|
||||
!systemd? (
|
||||
dev-libs/libuv
|
||||
sys-apps/dbus
|
||||
)
|
||||
wayland? (
|
||||
dev-libs/glib:2
|
||||
dev-libs/wayland
|
||||
dev-libs/wayland-protocols
|
||||
dev-util/wayland-scanner
|
||||
)
|
||||
X? (
|
||||
dev-libs/glib:2
|
||||
>=x11-libs/xcb-imdkit-1.0.3:5
|
||||
x11-libs/libX11
|
||||
x11-libs/libxkbfile
|
||||
x11-libs/xcb-util
|
||||
x11-libs/xcb-util-keysyms
|
||||
x11-libs/xcb-util-wm
|
||||
)
|
||||
"
|
||||
DEPEND="${RDEPEND}"
|
||||
BDEPEND="
|
||||
virtual/pkgconfig
|
||||
kde-frameworks/extra-cmake-modules:0
|
||||
"
|
||||
|
||||
PATCHES=( "${FILESDIR}"/${P}-fix-crashlog-odr.patch )
|
||||
|
||||
src_configure() {
|
||||
local mycmakeargs=(
|
||||
-DENABLE_DBUS=on
|
||||
-DENABLE_XDGAUTOSTART=$(usex autostart)
|
||||
-DENABLE_SERVER=$(usex server)
|
||||
-DENABLE_KEYBOARD=$(usex keyboard)
|
||||
-DENABLE_TEST=$(usex test)
|
||||
-DENABLE_ENCHANT=$(usex enchant)
|
||||
-DENABLE_EMOJI=$(usex emoji)
|
||||
-DENABLE_PRESAGE=$(usex presage)
|
||||
-DENABLE_WAYLAND=$(usex wayland)
|
||||
-DENABLE_X11=$(usex X)
|
||||
-DENABLE_DOC=$(usex doc)
|
||||
-DUSE_SYSTEMD=$(usex systemd)
|
||||
)
|
||||
cmake_src_configure
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
cmake_src_compile
|
||||
use doc && cmake_src_compile doc
|
||||
}
|
||||
|
||||
src_test() {
|
||||
# break by sandbox
|
||||
local CMAKE_SKIP_TESTS=(
|
||||
testdbus
|
||||
testservicewatcher
|
||||
)
|
||||
cmake_src_test
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cmake_src_install
|
||||
use doc && dodoc -r "${BUILD_DIR}"/doc/*
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
xdg_pkg_postinst
|
||||
|
||||
elog
|
||||
elog "Follow the instructions on:"
|
||||
elog "https://wiki.gentoo.org/wiki/Fcitx#Using_Fcitx"
|
||||
elog "https://fcitx-im.org/wiki/Setup_Fcitx_5"
|
||||
elog "https://fcitx-im.org/wiki/Using_Fcitx_5_on_Wayland"
|
||||
elog
|
||||
}
|
||||
@@ -1,128 +0,0 @@
|
||||
# Copyright 2023-2026 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
MY_PN="fcitx5"
|
||||
|
||||
inherit cmake flag-o-matic toolchain-funcs unpacker xdg
|
||||
|
||||
DESCRIPTION="Fcitx 5 is a generic input method framework"
|
||||
HOMEPAGE="https://fcitx-im.org/ https://github.com/fcitx/fcitx5"
|
||||
SRC_URI="https://download.fcitx-im.org/fcitx5/fcitx5/fcitx5-${PV}_dict.tar.zst -> ${P}.tar.zst"
|
||||
|
||||
S="${WORKDIR}/${MY_PN}-${PV}"
|
||||
LICENSE="LGPL-2+ Unicode-DFS-2016"
|
||||
SLOT="5"
|
||||
KEYWORDS="amd64 arm64 ~loong ~ppc ppc64 ~riscv x86"
|
||||
IUSE="+autostart doc +emoji +enchant +keyboard presage +server systemd test wayland +X"
|
||||
REQUIRED_USE="
|
||||
|| ( wayland X )
|
||||
X? ( keyboard )
|
||||
wayland? ( keyboard )
|
||||
"
|
||||
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
RDEPEND="
|
||||
!app-i18n/fcitx:4
|
||||
dev-libs/libfmt
|
||||
sys-devel/gettext
|
||||
virtual/libintl
|
||||
x11-libs/cairo[X?]
|
||||
x11-libs/gdk-pixbuf:2
|
||||
x11-libs/pango[X?]
|
||||
doc? (
|
||||
app-text/doxygen
|
||||
dev-texlive/texlive-fontutils
|
||||
)
|
||||
emoji? ( virtual/zlib:= )
|
||||
enchant? ( app-text/enchant:2 )
|
||||
keyboard? (
|
||||
app-text/iso-codes
|
||||
dev-libs/expat
|
||||
dev-libs/json-c:=
|
||||
x11-misc/xkeyboard-config
|
||||
x11-libs/libxkbcommon[X?,wayland?]
|
||||
)
|
||||
systemd? (
|
||||
sys-apps/systemd
|
||||
)
|
||||
!systemd? (
|
||||
dev-libs/libuv
|
||||
sys-apps/dbus
|
||||
)
|
||||
wayland? (
|
||||
dev-libs/glib:2
|
||||
dev-libs/wayland
|
||||
dev-libs/wayland-protocols
|
||||
dev-util/wayland-scanner
|
||||
)
|
||||
X? (
|
||||
dev-libs/glib:2
|
||||
>=x11-libs/xcb-imdkit-1.0.3:5
|
||||
x11-libs/libX11
|
||||
x11-libs/libxkbfile
|
||||
x11-libs/xcb-util
|
||||
x11-libs/xcb-util-keysyms
|
||||
x11-libs/xcb-util-wm
|
||||
)
|
||||
"
|
||||
DEPEND="${RDEPEND}"
|
||||
BDEPEND="
|
||||
virtual/pkgconfig
|
||||
kde-frameworks/extra-cmake-modules:0
|
||||
"
|
||||
|
||||
src_configure() {
|
||||
if [[ $(tc-get-cxx-stdlib) == "libc++" ]]; then
|
||||
# std::osyncstream used in fcitx-utils/log.cpp is marked as experimental.
|
||||
append-cxxflags $(test-flags-CXX -fexperimental-library)
|
||||
fi
|
||||
|
||||
local mycmakeargs=(
|
||||
-DENABLE_DBUS=on
|
||||
-DENABLE_XDGAUTOSTART=$(usex autostart)
|
||||
-DENABLE_SERVER=$(usex server)
|
||||
-DENABLE_KEYBOARD=$(usex keyboard)
|
||||
-DENABLE_TEST=$(usex test)
|
||||
-DENABLE_ENCHANT=$(usex enchant)
|
||||
-DENABLE_EMOJI=$(usex emoji)
|
||||
-DENABLE_PRESAGE=$(usex presage)
|
||||
-DENABLE_WAYLAND=$(usex wayland)
|
||||
-DENABLE_X11=$(usex X)
|
||||
-DENABLE_DOC=$(usex doc)
|
||||
-DUSE_SYSTEMD=$(usex systemd)
|
||||
)
|
||||
cmake_src_configure
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
cmake_src_compile
|
||||
use doc && cmake_src_compile doc
|
||||
}
|
||||
|
||||
src_test() {
|
||||
# break by sandbox
|
||||
local CMAKE_SKIP_TESTS=(
|
||||
testdbus
|
||||
testservicewatcher
|
||||
)
|
||||
cmake_src_test
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cmake_src_install
|
||||
use doc && dodoc -r "${BUILD_DIR}"/doc/*
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
xdg_pkg_postinst
|
||||
|
||||
elog
|
||||
elog "Follow the instructions on:"
|
||||
elog "https://wiki.gentoo.org/wiki/Fcitx#Using_Fcitx"
|
||||
elog "https://fcitx-im.org/wiki/Setup_Fcitx_5"
|
||||
elog "https://fcitx-im.org/wiki/Using_Fcitx_5_on_Wayland"
|
||||
elog
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
https://github.com/fcitx/fcitx5/pull/1259
|
||||
|
||||
The header may be not available when X11 is disabled. Fixes fcitx5
|
||||
build without X11 libraries.
|
||||
|
||||
Signed-off-by: Yao Zi <ziyao@disroot.org>
|
||||
--- a/src/ui/classic/classicui.cpp
|
||||
+++ b/src/ui/classic/classicui.cpp
|
||||
@@ -20,7 +20,6 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
#include <cairo.h>
|
||||
-#include <xcb/xcb.h>
|
||||
#include "fcitx-config/iniparser.h"
|
||||
#include "fcitx-config/rawconfig.h"
|
||||
#include "fcitx-utils/color.h"
|
||||
@@ -45,6 +44,7 @@
|
||||
#include "plasmathemewatchdog.h"
|
||||
#include "theme.h"
|
||||
#ifdef ENABLE_X11
|
||||
+#include <xcb/xcb.h>
|
||||
#include "xcb_public.h"
|
||||
#include "xcbui.h"
|
||||
#endif
|
||||
@@ -1,170 +0,0 @@
|
||||
https://github.com/fcitx/fcitx5/commit/5b12bf216dda31c0f11eb85af54a43fce9d5a2ab
|
||||
|
||||
Fix crashlog being inconsistent type in main/errorhandler.
|
||||
|
||||
--- a/src/server/errorhandler.cpp
|
||||
+++ b/src/server/errorhandler.cpp
|
||||
@@ -14,7 +14,7 @@
|
||||
#include <cstdint>
|
||||
#include <cstring>
|
||||
#include <ctime>
|
||||
-#include <string>
|
||||
+#include <filesystem>
|
||||
#include "fcitx-utils/fs.h"
|
||||
#include "fcitx-utils/standardpaths.h"
|
||||
#include "fcitx-utils/unixfd.h"
|
||||
@@ -31,15 +31,30 @@
|
||||
#define MINIMAL_BUFFER_SIZE 256
|
||||
#define BACKTRACE_SIZE 32
|
||||
|
||||
-extern int selfpipe[2];
|
||||
-extern std::string crashlog;
|
||||
+namespace fcitx {
|
||||
+
|
||||
+static int signalPipe;
|
||||
+static std::filesystem::path crashlog;
|
||||
|
||||
struct MinimalBuffer {
|
||||
char buffer[MINIMAL_BUFFER_SIZE];
|
||||
int offset;
|
||||
};
|
||||
|
||||
-void SetMyExceptionHandler() {
|
||||
+static void OnException(int signo);
|
||||
+
|
||||
+void SetMyExceptionHandler(int pipeFd) {
|
||||
+
|
||||
+ auto userDir =
|
||||
+ StandardPaths::global().userDirectory(StandardPathsType::PkgConfig);
|
||||
+ if (!userDir.empty()) {
|
||||
+ if (fs::makePath(userDir)) {
|
||||
+ crashlog = userDir / "crash.log";
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ signalPipe = pipeFd;
|
||||
+
|
||||
int signo;
|
||||
|
||||
for (signo = SIGHUP; signo < SIGUNUSED; signo++) {
|
||||
@@ -115,7 +130,7 @@ static inline void _write_buffer(int fd, const MinimalBuffer *buffer) {
|
||||
void OnException(int signo) {
|
||||
if (signo == SIGCHLD) {
|
||||
uint8_t sig = (signo & 0xff);
|
||||
- fcitx::fs::safeWrite(selfpipe[1], &sig, 1);
|
||||
+ fcitx::fs::safeWrite(signalPipe, &sig, 1);
|
||||
signal(signo, OnException);
|
||||
return;
|
||||
}
|
||||
@@ -180,10 +195,12 @@ void OnException(int signo) {
|
||||
if (signo < 0xff) {
|
||||
sig = (uint8_t)(signo & 0xff);
|
||||
}
|
||||
- fcitx::fs::safeWrite(selfpipe[1], &sig, 1);
|
||||
+ fcitx::fs::safeWrite(signalPipe, &sig, 1);
|
||||
signal(signo, OnException);
|
||||
} break;
|
||||
}
|
||||
}
|
||||
|
||||
+} // namespace fcitx
|
||||
+
|
||||
// kate: indent-mode cstyle; space-indent on; indent-width 0;
|
||||
--- a/src/server/errorhandler.h
|
||||
+++ b/src/server/errorhandler.h
|
||||
@@ -16,23 +16,15 @@
|
||||
#ifndef SIGUNUSED
|
||||
#define SIGUNUSED 29
|
||||
#endif
|
||||
-/* ***********************************************************
|
||||
-// Data structures
|
||||
-// *********************************************************** */
|
||||
|
||||
-/* ***********************************************************
|
||||
-// Functions
|
||||
-// *********************************************************** */
|
||||
+namespace fcitx {
|
||||
|
||||
//
|
||||
// Set Posix Signal Handler
|
||||
//
|
||||
//
|
||||
-void SetMyExceptionHandler(void);
|
||||
+void SetMyExceptionHandler(int pipeFd);
|
||||
|
||||
-//
|
||||
-// Process Posix signal
|
||||
-//
|
||||
-void OnException(int signo);
|
||||
+} // namespace fcitx
|
||||
|
||||
#endif
|
||||
--- a/src/server/main.cpp
|
||||
+++ b/src/server/main.cpp
|
||||
@@ -8,21 +8,17 @@
|
||||
#include <sys/stat.h>
|
||||
#include <clocale>
|
||||
#include <cstdio>
|
||||
-#include <cstdlib>
|
||||
#include <exception>
|
||||
#include <filesystem>
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
-#include <utility>
|
||||
#include <vector>
|
||||
#include "fcitx-utils/environ.h"
|
||||
-#include "fcitx-utils/fs.h"
|
||||
#include "fcitx-utils/log.h"
|
||||
#include "fcitx-utils/misc.h"
|
||||
#include "fcitx-utils/misc_p.h"
|
||||
#include "fcitx-utils/standardpath.h"
|
||||
#include "fcitx-utils/standardpaths.h"
|
||||
-#include "fcitx-utils/stringutils.h"
|
||||
#include "fcitx/addonfactory.h"
|
||||
#include "fcitx/addoninstance.h"
|
||||
#include "fcitx/addonloader.h"
|
||||
@@ -31,8 +27,6 @@
|
||||
#include "errorhandler.h"
|
||||
|
||||
using namespace fcitx;
|
||||
-int selfpipe[2];
|
||||
-std::filesystem::path crashlog;
|
||||
|
||||
FCITX_DEFINE_STATIC_ADDON_REGISTRY(getStaticAddon)
|
||||
#ifdef ENABLE_KEYBOARD
|
||||
@@ -43,7 +37,8 @@ int main(int argc, char *argv[]) {
|
||||
umask(077);
|
||||
StandardPath::global().syncUmask();
|
||||
StandardPaths::global().syncUmask();
|
||||
- if (safePipe(selfpipe) < 0) {
|
||||
+ int selfPipe[2];
|
||||
+ if (safePipe(selfPipe) < 0) {
|
||||
fprintf(stderr, "Could not create self-pipe.\n");
|
||||
return 1;
|
||||
}
|
||||
@@ -54,15 +49,7 @@ int main(int argc, char *argv[]) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
- auto userDir =
|
||||
- StandardPaths::global().userDirectory(StandardPathsType::PkgConfig);
|
||||
- if (!userDir.empty()) {
|
||||
- if (fs::makePath(userDir)) {
|
||||
- crashlog = userDir / "crash.log";
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- SetMyExceptionHandler();
|
||||
+ SetMyExceptionHandler(selfPipe[1]);
|
||||
|
||||
setlocale(LC_ALL, "");
|
||||
|
||||
@@ -74,7 +61,7 @@ int main(int argc, char *argv[]) {
|
||||
FCITX_LOG_IF(Info, isInFlatpak()) << "Running inside flatpak.";
|
||||
Instance instance(argc, argv);
|
||||
instance.setBinaryMode();
|
||||
- instance.setSignalPipe(selfpipe[0]);
|
||||
+ instance.setSignalPipe(selfPipe[0]);
|
||||
instance.addonManager().registerDefaultLoader(&getStaticAddon());
|
||||
|
||||
ret = instance.exec();
|
||||
Reference in New Issue
Block a user