Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 899052 Details for
Bug 937340
app-i18n/fcitx-configtool-5.1.6-r1 compile failed
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
make-x11-dependencies-optional.patch (text/plain), 4.53 KB, created by
yongxiang
on 2024-08-05 01:11:00 UTC
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
yongxiang
Created:
2024-08-05 01:11:00 UTC
Size:
4.53 KB
patch
obsolete
>From cce7d7fdfbbf94850e13455d5b7e7e04c5859a19 Mon Sep 17 00:00:00 2001 >From: Yao Zi <ziyao@disroot.org> >Date: Tue, 21 May 2024 18:42:10 +0000 >Subject: [PATCH] Make X11 dependencies optional > >Add configure option "ENABLE_X11". When turned off, most parts of >fcitx5-configtool except kbd-layout-viewer5 could be built without X11 >dependencies. This includes no behavior change. >--- > CMakeLists.txt | 8 ++++++++ > src/lib/configwidgetslib/CMakeLists.txt | 6 ++++-- > src/lib/configwidgetslib/layoutselector.cpp | 8 ++++++++ > src/lib/configwidgetslib/layoutselector.h | 2 ++ > 4 files changed, 22 insertions(+), 2 deletions(-) > >diff --git a/CMakeLists.txt b/CMakeLists.txt >index d76fd29..4a3898a 100644 >--- a/CMakeLists.txt >+++ b/CMakeLists.txt >@@ -40,9 +40,13 @@ include(GenerateExportHeader) > option(ENABLE_KCM "Enable KDE Config Module" On) > option(ENABLE_CONFIG_QT "Enable fcitx5-config-qt" On) > option(ENABLE_TEST "Enable test" Off) >+option(ENABLE_X11 "Enable X11 integration" On) > add_definitions(-DTRANSLATION_DOMAIN=\"kcm_fcitx5\") > add_definitions(-DFCITX_GETTEXT_DOMAIN=\"fcitx5-configtool\") > add_definitions(-DQT_NO_KEYWORDS) >+if (ENABLE_X11) >+add_definitions(-DENABLE_X11) >+endif () > > if (ENABLE_CONFIG_QT) > find_package(KF${QT_MAJOR_VERSION}ItemViews REQUIRED) >@@ -95,15 +99,19 @@ include("${FCITX_INSTALL_CMAKECONFIG_DIR}/Fcitx5Utils/Fcitx5CompilerSettings.cma > > find_package(PkgConfig REQUIRED) > find_package(Gettext REQUIRED) >+if (ENABLE_X11) > find_package(X11 REQUIRED) > find_package(XKeyboardConfig REQUIRED) > pkg_check_modules(XkbFile "xkbfile" REQUIRED IMPORTED_TARGET) >+endif () > > configure_file(config.h.in config.h) > include_directories(${CMAKE_CURRENT_BINARY_DIR}) > > add_subdirectory(po) > add_subdirectory(src) >+if (ENABLE_X11) > add_subdirectory(layout) >+endif () > > feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES) >diff --git a/src/lib/configwidgetslib/CMakeLists.txt b/src/lib/configwidgetslib/CMakeLists.txt >index 5476c69..7aba819 100644 >--- a/src/lib/configwidgetslib/CMakeLists.txt >+++ b/src/lib/configwidgetslib/CMakeLists.txt >@@ -28,5 +28,7 @@ target_link_libraries(configwidgetslib > Fcitx5::Utils > Fcitx5Qt${QT_MAJOR_VERSION}::DBusAddons > Fcitx5Qt${QT_MAJOR_VERSION}::WidgetsAddons >- configlib >- layoutlib) >+ configlib) >+if (ENABLE_X11) >+target_link_libraries(configwidgetslib layoutlib) >+endif () >diff --git a/src/lib/configwidgetslib/layoutselector.cpp b/src/lib/configwidgetslib/layoutselector.cpp >index fa95cdb..b5b5195 100644 >--- a/src/lib/configwidgetslib/layoutselector.cpp >+++ b/src/lib/configwidgetslib/layoutselector.cpp >@@ -6,7 +6,9 @@ > > #include "layoutselector.h" > #include "dbusprovider.h" >+#ifdef ENABLE_X11 > #include "keyboardlayoutwidget.h" >+#endif // ENABLE_X11 > #include "layoutmodel.h" > #include "ui_layoutselector.h" > #include <QDBusPendingCallWatcher> >@@ -45,6 +47,7 @@ LayoutSelector::LayoutSelector(DBusProvider *dbus, QWidget *parent) > connect(ui_->variantComboBox, > qOverload<int>(&QComboBox::currentIndexChanged), this, > &LayoutSelector::variantComboBoxChanged); >+#ifdef ENABLE_X11 > if (qApp->platformName() == "xcb") { > keyboardLayoutWidget_ = new KeyboardLayoutWidget(this); > keyboardLayoutWidget_->setMinimumSize(QSize(400, 200)); >@@ -52,6 +55,7 @@ LayoutSelector::LayoutSelector(DBusProvider *dbus, QWidget *parent) > QSizePolicy::Expanding); > ui_->verticalLayout->addWidget(keyboardLayoutWidget_); > } >+#endif // ENABLE_X11 > } > > LayoutSelector::~LayoutSelector() {} >@@ -128,6 +132,7 @@ void LayoutSelector::layoutComboBoxChanged() { > ui_->variantComboBox->setCurrentIndex(0); > } > >+#ifdef ENABLE_X11 > void LayoutSelector::variantComboBoxChanged() { > if (!keyboardLayoutWidget_) { > return; >@@ -142,6 +147,9 @@ void LayoutSelector::variantComboBoxChanged() { > keyboardLayoutWidget_->setVisible(true); > } > } >+#else >+void LayoutSelector::variantComboBoxChanged() { return; } >+#endif // ENABLE_X11 > > } // namespace kcm > } // namespace fcitx >diff --git a/src/lib/configwidgetslib/layoutselector.h b/src/lib/configwidgetslib/layoutselector.h >index beee182..4fe9d56 100644 >--- a/src/lib/configwidgetslib/layoutselector.h >+++ b/src/lib/configwidgetslib/layoutselector.h >@@ -53,7 +53,9 @@ private Q_SLOTS: > std::unique_ptr<Ui::LayoutSelector> ui_; > DBusProvider *dbus_; > LayoutProvider *layoutProvider_; >+#ifdef ENABLE_X11 > KeyboardLayoutWidget *keyboardLayoutWidget_ = nullptr; >+#endif > Iso639 iso639_; > > QString preSelectLayout_;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 937340
:
899048
|
899049
|
899050
| 899052 |
899053