Skip to content

Commit

Permalink
[maliit-framework] Update to 2.3.0. JB#62210
Browse files Browse the repository at this point in the history
Backport fix for building with gcc 12 or newer.
Remove not needed defattr.
Use cmake macros in build.
  • Loading branch information
mlehtima committed Jun 10, 2024
1 parent fe4a911 commit 1c67c4d
Show file tree
Hide file tree
Showing 15 changed files with 123 additions and 269 deletions.
47 changes: 7 additions & 40 deletions rpm/0001-Install-unit-test-files.patch
Original file line number Diff line number Diff line change
Expand Up @@ -7,45 +7,31 @@ Before switch to cmake on commit 7471153ce the unit test files were
installed, and with cmake there are some parts of it done.
Reintroduce the installation as these are needed if the build
environment is not, and perhap cannot be, used for testing.

Also cope on the qml unit test for the example plugin not availabe
as it's built optionally.
---
CMakeLists.txt | 12 ++++++++++--
.../ut_minputmethodquickplugin.cpp | 5 ++++-
2 files changed, 14 insertions(+), 3 deletions(-)
CMakeLists.txt | 8 ++++++++
1 file changed, 8 insertions(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index a29ea4f..a1cebdd 100644
index 7d4d1f26a032a08f45c7fd05ed83bec3d3e7e120..eecc1aa73dfde91ac1e68bff76bd987f8f2058c5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -511,6 +511,7 @@ if(enable-tests)
@@ -490,6 +490,7 @@ if(enable-tests)
set(DUMMY_PLUGINS dummyimplugin dummyimplugin2 dummyimplugin3 dummyplugin)

set_property(TARGET ${DUMMY_PLUGINS} PROPERTY LIBRARY_OUTPUT_DIRECTORY ${TEST_PLUGINS_DIR})
+ install(TARGETS ${DUMMY_PLUGINS} DESTINATION ${CMAKE_INSTALL_LIBDIR}/maliit-framework-tests/plugins)

add_library(test-utils STATIC
tests/utils/core-utils.cpp
@@ -520,8 +521,8 @@ if(enable-tests)
target_link_libraries(test-utils PUBLIC Qt5::Core Qt5::Gui Qt5::Test maliit-connection)
target_include_directories(test-utils INTERFACE tests/utils)
target_compile_definitions(test-utils PUBLIC
- -DMALIIT_TEST_PLUGINS_DIR="${CMAKE_INSTALL_PREFIX}/lib/maliit-framework-tests/plugins"
- -DMALIIT_TEST_DATA_PATH="${CMAKE_INSTALL_PREFIX}/lib/maliit-framework-tests"
+ -DMALIIT_TEST_PLUGINS_DIR="${CMAKE_INSTALL_FULL_LIBDIR}/maliit-framework-tests/plugins"
+ -DMALIIT_TEST_DATA_PATH="${CMAKE_INSTALL_FULL_LIBDIR}/maliit-framework-tests"
-DIN_TREE_TEST_PLUGIN_DIR="${CMAKE_SOURCE_DIR}/examples/plugins")

add_library(test-stubs STATIC
@@ -540,14 +541,21 @@ if(enable-tests)
@@ -519,6 +520,7 @@ if(enable-tests)
list(REMOVE_AT _libs 0)
target_link_libraries(${name} test-utils maliit-plugins ${_libs})
add_test(${name} ${name})
+ install(TARGETS ${name} DESTINATION ${CMAKE_INSTALL_LIBDIR}/maliit-framework-tests/${name})

set(test_targets ${test_targets} ${name} PARENT_SCOPE)
endfunction()
if(install-tests)
@@ -528,8 +530,14 @@ if(enable-tests)

create_test(sanitychecks)
create_test(ut_mattributeextensionmanager)
Expand All @@ -60,22 +46,3 @@ index a29ea4f..a1cebdd 100644
create_test(ut_mimpluginmanagerconfig)
create_test(ut_mimserveroptions)
create_test(ut_mimsettings)
diff --git a/tests/ut_minputmethodquickplugin/ut_minputmethodquickplugin.cpp b/tests/ut_minputmethodquickplugin/ut_minputmethodquickplugin.cpp
index 33ec902..4b7c4f2 100644
--- a/tests/ut_minputmethodquickplugin/ut_minputmethodquickplugin.cpp
+++ b/tests/ut_minputmethodquickplugin/ut_minputmethodquickplugin.cpp
@@ -64,7 +64,10 @@ void Ut_MInputMethodQuickPlugin::testQmlSetup()
QDir(IN_TREE_TEST_PLUGIN_DIR"/qml") : QDir(MALIIT_TEST_PLUGINS_DIR"/examples/qml");
const QString pluginPath = pluginDir.absoluteFilePath(testPluginPath);
const QString pluginId = QFileInfo(testPluginPath).baseName();
- QVERIFY(pluginDir.exists(pluginPath));
+
+ if (!pluginDir.exists(pluginPath)) {
+ QSKIP("QML Example plugin not available");
+ }

QObject *pluginInstance = 0;
Maliit::Plugins::InputMethodPlugin *plugin = 0;
--
2.35.1

5 changes: 1 addition & 4 deletions rpm/0002-enable-systemd-activation.patch
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ apply patch enable-systemd-activation.patch
1 file changed, 1 insertion(+)

diff --git a/connection/org.maliit.server.service.in b/connection/org.maliit.server.service.in
index 6a3e921..f387838 100644
index 6a3e9216571e97b8319b90bdd86bb14b0c5027b4..f387838dcd59267e34190920a07b97951c8041f1 100644
--- a/connection/org.maliit.server.service.in
+++ b/connection/org.maliit.server.service.in
@@ -1,4 +1,5 @@
Expand All @@ -20,6 +20,3 @@ index 6a3e921..f387838 100644
Exec=@CMAKE_INSTALL_PREFIX@/bin/maliit-server @MALIIT_SERVER_ARGUMENTS@
+SystemdService=maliit-server.service

--
2.35.1

17 changes: 7 additions & 10 deletions rpm/0003-lipstick-platform.patch
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@ directory
create mode 100644 src/lipstickplatform.h

diff --git a/CMakeLists.txt b/CMakeLists.txt
index a1cebdd..23f7aa8 100644
index eecc1aa73dfde91ac1e68bff76bd987f8f2058c5..9333aace091a314084fce2e2f423430e922daaa5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -14,6 +14,7 @@ option(enable-xcb "Compile with xcb support" ON)
@@ -14,6 +14,7 @@ option(enable-glib "Build GLib support" ON)
option(enable-xcb "Compile with xcb support" ON)
option(enable-wayland "Compile with support for wayland" ON)
option(enable-wayland-gtk "Compile with support for wayland gtk+" OFF)
option(enable-qt5-inputcontext "Compile with Qt 5 input context" ON)
+option(enable-lipstick "Compile with Lipstick integration support" ON)

option(enable-hwkeyboard "Enable support for the hardware keyboard" ON)
option(enable-dbus-activation "Enable dbus activation support for maliit-server" OFF)
@@ -204,6 +205,13 @@ if(enable-wayland)
@@ -200,6 +201,13 @@ if(enable-wayland)

endif()

Expand All @@ -46,7 +46,7 @@ index a1cebdd..23f7aa8 100644
list(APPEND PLUGINS_SOURCES
src/mimhwkeyboardtracker.cpp
diff --git a/src/abstractplatform.cpp b/src/abstractplatform.cpp
index 0b01e66..5d2c380 100644
index 0b01e6635c9f8c00cb33fc54750ed71c749dfd6c..5d2c380d7781ee154622c521ffb0970d125dce77 100644
--- a/src/abstractplatform.cpp
+++ b/src/abstractplatform.cpp
@@ -20,6 +20,9 @@
Expand All @@ -71,7 +71,7 @@ index 0b01e66..5d2c380 100644
return std::unique_ptr<AbstractPlatform>(new Maliit::WaylandPlatform);
diff --git a/src/lipstickplatform.cpp b/src/lipstickplatform.cpp
new file mode 100644
index 0000000..4975879
index 0000000000000000000000000000000000000000..4975879da3977f49434336565198ae775c96448f
--- /dev/null
+++ b/src/lipstickplatform.cpp
@@ -0,0 +1,82 @@
Expand Down Expand Up @@ -159,7 +159,7 @@ index 0000000..4975879
+} // namespace Maliit
diff --git a/src/lipstickplatform.h b/src/lipstickplatform.h
new file mode 100644
index 0000000..226551a
index 0000000000000000000000000000000000000000..226551a147794e790ad1dce97aa24193d791cf49
--- /dev/null
+++ b/src/lipstickplatform.h
@@ -0,0 +1,30 @@
Expand Down Expand Up @@ -193,6 +193,3 @@ index 0000000..226551a
+} // namespace Maliit
+
+#endif // MALIIT_UNKNOWN_PLATFORM_H
--
2.35.1

17 changes: 7 additions & 10 deletions rpm/0004-Use-invoker-to-launch.patch
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ Saving a bit of memory
3 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 23f7aa8..7424f04 100644
index 9333aace091a314084fce2e2f423430e922daaa5..4ce3f9ec81345426c3131a1081b6b91938983095 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -299,6 +299,11 @@ add_definitions(-DMALIIT_FRAMEWORK_USE_INTERNAL_API
@@ -295,6 +295,11 @@ add_definitions(-DMALIIT_FRAMEWORK_USE_INTERNAL_API
add_executable(maliit-server passthroughserver/main.cpp)
target_link_libraries(maliit-server maliit-plugins maliit-connection)

Expand All @@ -27,7 +27,7 @@ index 23f7aa8..7424f04 100644
set(INPUT_CONTEXT_SOURCES
input-context/main.cpp
diff --git a/connection/org.maliit.server.service.in b/connection/org.maliit.server.service.in
index f387838..c9ba19f 100644
index f387838dcd59267e34190920a07b97951c8041f1..c9ba19fb5e7a48ae5fefba3d1f210596336873db 100644
--- a/connection/org.maliit.server.service.in
+++ b/connection/org.maliit.server.service.in
@@ -1,5 +1,5 @@
Expand All @@ -38,18 +38,15 @@ index f387838..c9ba19f 100644
SystemdService=maliit-server.service

diff --git a/passthroughserver/main.cpp b/passthroughserver/main.cpp
index 9b65e99..2687322 100644
index a8c287a68febaaba73a35f18eefcc6800cce85f6..fe8623557a3a179e78461eab1f4e4f498e65da5b 100644
--- a/passthroughserver/main.cpp
+++ b/passthroughserver/main.cpp
@@ -101,7 +101,7 @@ QSharedPointer<MInputContextConnection> createConnection(const MImServerConnecti
@@ -64,7 +64,7 @@ QSharedPointer<MInputContextConnection> createConnection(const MImServerConnecti

} // unnamed namespace

-int main(int argc, char **argv)
+Q_DECL_EXPORT int main(int argc, char **argv)
{
qInstallMessageHandler(outputMessagesToStdErr);

--
2.35.1

// compatibility with MALIIT_DEBUG
defaultLoggingFilter = QLoggingCategory::installFilter(loggingCategoryFilter);
Loading

0 comments on commit 1c67c4d

Please sign in to comment.