From 00d53b091d01fc3152c909535695f2a484d04d4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Mon, 26 May 2025 09:11:03 +0200 Subject: [PATCH] vanadium: disable fcitx5-chinese-addons chttrans --- nix/configurations/vanadium/overlay.nix | 3 + .../disable-chttrans.patch | 63 +++++++++++++++++++ 2 files changed, 66 insertions(+) create mode 100644 nix/configurations/vanadium/patches/fcitx5-chinese-addons/disable-chttrans.patch diff --git a/nix/configurations/vanadium/overlay.nix b/nix/configurations/vanadium/overlay.nix index 87ae9df3..e09f58d2 100644 --- a/nix/configurations/vanadium/overlay.nix +++ b/nix/configurations/vanadium/overlay.nix @@ -38,4 +38,7 @@ in (lib.cmakeFeature "ENABLE_CLOUDPINYIN" "Off") (lib.cmakeFeature "ENABLE_DATA" "Off") ]; + fcitx5-chinese-addons.__output.patches.__append = [ + ./patches/fcitx5-chinese-addons/disable-chttrans.patch + ]; }) diff --git a/nix/configurations/vanadium/patches/fcitx5-chinese-addons/disable-chttrans.patch b/nix/configurations/vanadium/patches/fcitx5-chinese-addons/disable-chttrans.patch new file mode 100644 index 00000000..f18c0d76 --- /dev/null +++ b/nix/configurations/vanadium/patches/fcitx5-chinese-addons/disable-chttrans.patch @@ -0,0 +1,63 @@ +diff --git a/modules/chttrans/CMakeLists.txt b/modules/chttrans/CMakeLists.txt +index 6c73ea8..8ed5660 100644 +--- a/modules/chttrans/CMakeLists.txt ++++ b/modules/chttrans/CMakeLists.txt +@@ -1,20 +1,20 @@ +-set(CHTTRANS_SOURCES +- chttrans.cpp chttrans-native.cpp +-) +-if (ENABLE_OPENCC) +- set(CHTTRANS_SOURCES ${CHTTRANS_SOURCES} chttrans-opencc.cpp) +-endif() +-add_fcitx5_addon(chttrans ${CHTTRANS_SOURCES}) +-target_link_libraries(chttrans Fcitx5::Core Fcitx5::Config Fcitx5::Module::Notifications Boost::iostreams ${FMT_TARGET}) +-if (ENABLE_OPENCC) +- target_link_libraries(chttrans OpenCC::OpenCC) +- if (TARGET Boost::json) +- target_link_libraries(chttrans Boost::json) +- endif() +-endif() +-install(TARGETS chttrans DESTINATION "${CMAKE_INSTALL_LIBDIR}/fcitx5") ++# set(CHTTRANS_SOURCES ++# chttrans.cpp chttrans-native.cpp ++# ) ++# if (ENABLE_OPENCC) ++# set(CHTTRANS_SOURCES ${CHTTRANS_SOURCES} chttrans-opencc.cpp) ++# endif() ++# add_fcitx5_addon(chttrans ${CHTTRANS_SOURCES}) ++# target_link_libraries(chttrans Fcitx5::Core Fcitx5::Config Fcitx5::Module::Notifications Boost::iostreams ${FMT_TARGET}) ++# if (ENABLE_OPENCC) ++# target_link_libraries(chttrans OpenCC::OpenCC) ++# if (TARGET Boost::json) ++# target_link_libraries(chttrans Boost::json) ++# endif() ++# endif() ++# install(TARGETS chttrans DESTINATION "${CMAKE_INSTALL_LIBDIR}/fcitx5") + configure_file(chttrans.conf.in.in chttrans.conf.in) + fcitx5_translate_desktop_file("${CMAKE_CURRENT_BINARY_DIR}/chttrans.conf.in" chttrans.conf) +-install(FILES "${CMAKE_CURRENT_BINARY_DIR}/chttrans.conf" DESTINATION "${FCITX_INSTALL_PKGDATADIR}/addon" +- COMPONENT config) +-install(FILES gbks2t.tab DESTINATION "${CMAKE_INSTALL_DATADIR}/fcitx5/chttrans" COMPONENT config) ++# install(FILES "${CMAKE_CURRENT_BINARY_DIR}/chttrans.conf" DESTINATION "${FCITX_INSTALL_PKGDATADIR}/addon" ++# COMPONENT config) ++# install(FILES gbks2t.tab DESTINATION "${CMAKE_INSTALL_DATADIR}/fcitx5/chttrans" COMPONENT config) +diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt +index 994a4d1..9322834 100644 +--- a/test/CMakeLists.txt ++++ b/test/CMakeLists.txt +@@ -23,10 +23,10 @@ add_dependencies(testfullwidth fullwidth fullwidth.conf.in-fmt) + add_test(NAME testfullwidth COMMAND testfullwidth) + + add_subdirectory(inputmethod) +-add_executable(testchttrans testchttrans.cpp) +-target_link_libraries(testchttrans Fcitx5::Core Fcitx5::Module::TestFrontend Fcitx5::Module::TestIM Pthread::Pthread) +-add_dependencies(testchttrans chttrans chttrans.conf.in-fmt copy-addon copy-testim) +-add_test(NAME testchttrans COMMAND testchttrans) ++# add_executable(testchttrans testchttrans.cpp) ++# target_link_libraries(testchttrans Fcitx5::Core Fcitx5::Module::TestFrontend Fcitx5::Module::TestIM Pthread::Pthread) ++# add_dependencies(testchttrans chttrans chttrans.conf.in-fmt copy-addon copy-testim) ++# add_test(NAME testchttrans COMMAND testchttrans) + + add_subdirectory(addon) + add_executable(testpinyin testpinyin.cpp) +