Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Qt6 support v2 #125

Draft
wants to merge 13 commits into
base: master
Choose a base branch
from
Draft

Conversation

cordlandwehr
Copy link

This is a work in progress setup that essentially is a cleaned up revision of #121 .

Done:

  • added explicit link interface to Qt5/Qt6 variants
  • compiles and is tested against compilation of Keyboard Qt6 branch

Next:

  • runtime testing
  • test/fix coinstallability with Qt5 and Qt6 based framework

dobey and others added 6 commits December 19, 2023 15:37
Plugins and libraries are supposed to be coinstallable leading to
systems having both of them available at the same time. As a precaution
to accidential mixups of libraries that lead to hard to analyze runtime
issues due to ABI incompatibilities, always link publically against the
versioned Qt library.
This should already be default config for Qt5.
This option name is a very common practice in many projects, make it
easier to detect.
@cordlandwehr
Copy link
Author

@dobey I am now looking into the coinstallability of qt5 and qt6 version of maliit and need a little bit of input what you desire. Specifically, how do you want to name the Qt6 version? from the list of installed files I will need to add a Qt6 suffix at least for the following artifacts:

├── bin
│   └── maliit-server
├── include
│   └── maliit-2
│       ├── maliit
│       │   ├── mimserver.h
│       │   ├── namespace.h
│       │   ├── plugins
│       │   │   ├── abstractinputmethod.h
│       │   │   ├── abstractinputmethodhost.h
│       │   │   ├── abstractpluginsetting.h
│       │   │   ├── attributeextension.h
│       │   │   ├── extensionevent.h
│       │   │   ├── inputmethodplugin.h
│       │   │   ├── keyoverridedata.h
│       │   │   ├── keyoverride.h
│       │   │   ├── plugindescription.h
│       │   │   ├── subviewdescription.h
│       │   │   ├── updateevent.h
│       │   │   └── updatereceiver.h
│       │   ├── settingdata.h
│       │   ├── standaloneinputmethod.h
│       │   └── standaloneinputmethodhost.h
│       └── maliit-glib
│           ├── maliitattributeextension.h
│           ├── maliitattributeextensionregistry.h
│           ├── maliitbus.h
│           ├── maliitcontext.h
│           ├── maliitinputmethod.h
│           ├── maliitpluginsettings.h
│           ├── maliitserver.h
│           ├── maliitsettingdata.h
│           ├── maliitsettingsentry.h
│           └── maliitsettingsmanager.h
├── lib
│   ├── cmake
│   │   ├── MaliitGLib
│   │   │   ├── MaliitGLibConfig.cmake
│   │   │   ├── MaliitGLibConfigVersion.cmake
│   │   │   ├── MaliitGLibTargets.cmake
│   │   │   └── MaliitGLibTargets-debug.cmake
│   │   └── MaliitPlugins
│   │       ├── MaliitPluginsConfig.cmake
│   │       ├── MaliitPluginsConfigVersion.cmake
│   │       ├── MaliitPluginsTargets.cmake
│   │       └── MaliitPluginsTargets-debug.cmake
│   ├── libmaliit-glib.so -> libmaliit-glib.so.2
│   ├── libmaliit-glib.so.2 -> libmaliit-glib.so.2.3.0
│   ├── libmaliit-glib.so.2.3.0
│   ├── libmaliit-plugins.so -> libmaliit-plugins.so.2
│   ├── libmaliit-plugins.so.2 -> libmaliit-plugins.so.2.3.0
│   ├── libmaliit-plugins.so.2.3.0
│   ├── pkgconfig
│   │   ├── maliit-framework.pc
│   │   ├── maliit-glib.pc
│   │   ├── maliit-plugins.pc
│   │   └── maliit-server.pc
│   └── qt6
│       ├── mkspecs
│       │   └── features
│       │       ├── maliit-defines.prf
│       │       ├── maliit-framework.prf
│       │       └── maliit-plugins.prf
│       └── plugins
│           └── wayland-shell-integration
│               └── libinputpanel-shell.so
└── share
    └── doc
        ├── maliit-framework
        │   ├── *
        └── maliit-framework-doc
            ├── *

So, for me the main question is, do you want to go with "maliit3" or "maliit6" or "maliit-qt6"? For KDE we typically use the Qt major version as suffix, but there we already had that suffix aligned with the respective Qt version.
The follow question for me is, do you want co-installability only for the runtime components like executible, libs and plugins, or also for dev packages like headers, cmake modules, pkgconfig and docs?

For Qt5 versions the name is not changed, only append 6 for Qt6 builds.
This introduces a 6 suffix for each maliit library basename and that
only for Qt6 builds. Changing the library name allows to still used the
project version for incompatible SONAME changes.
@cordlandwehr
Copy link
Author

cordlandwehr commented Oct 31, 2024

This is the state with the new patch set from today (please note, I am open to any changes, dropping of patches to makes less changes in order to allow less coinstallability)

├── bin
│   ├── maliit6-exampleapp-plainqt
│   └── maliit6-server
├── include
│   └── maliit6-2
│       ├── maliit
│       │   ├── mimserver.h
│       │   ├── namespace.h
│       │   ├── plugins
│       │   │   ├── abstractinputmethod.h
│       │   │   ├── abstractinputmethodhost.h
│       │   │   ├── abstractpluginsetting.h
│       │   │   ├── attributeextension.h
│       │   │   ├── extensionevent.h
│       │   │   ├── inputmethodplugin.h
│       │   │   ├── keyoverridedata.h
│       │   │   ├── keyoverride.h
│       │   │   ├── plugindescription.h
│       │   │   ├── subviewdescription.h
│       │   │   ├── updateevent.h
│       │   │   └── updatereceiver.h
│       │   ├── settingdata.h
│       │   ├── standaloneinputmethod.h
│       │   └── standaloneinputmethodhost.h
│       └── maliit-glib
│           ├── maliitattributeextension.h
│           ├── maliitattributeextensionregistry.h
│           ├── maliitbus.h
│           ├── maliitinputmethod.h
│           ├── maliitpluginsettings.h
│           ├── maliitsettingdata.h
│           ├── maliitsettingsentry.h
│           └── maliitsettingsmanager.h
├── lib
│   ├── cmake
│   │   ├── Maliit6GLib
│   │   │   ├── Maliit6GLibConfig.cmake
│   │   │   ├── Maliit6GLibConfigVersion.cmake
│   │   │   ├── Maliit6GLibTargets.cmake
│   │   │   └── Maliit6GLibTargets-debug.cmake
│   │   └── Maliit6Plugins
│   │       ├── Maliit6PluginsConfig.cmake
│   │       ├── Maliit6PluginsConfigVersion.cmake
│   │       ├── Maliit6PluginsTargets.cmake
│   │       └── Maliit6PluginsTargets-debug.cmake
│   ├── libmaliit6-glib.so -> libmaliit6-glib.so.2
│   ├── libmaliit6-glib.so.2 -> libmaliit6-glib.so.2.3.0
│   ├── libmaliit6-glib.so.2.3.0
│   ├── libmaliit6-plugins.so -> libmaliit6-plugins.so.2
│   ├── libmaliit6-plugins.so.2 -> libmaliit6-plugins.so.2.3.0
│   ├── libmaliit6-plugins.so.2.3.0
│   ├── pkgconfig
│   │   ├── maliit6-framework.pc
│   │   ├── maliit6-glib.pc
│   │   ├── maliit6-plugins.pc
│   │   └── maliit6-server.pc
│   └── qt6
│       ├── mkspecs
│       │   └── features
│       │       ├── maliit-defines.prf
│       │       ├── maliit-framework.prf
│       │       └── maliit-plugins.prf
│       └── plugins
│           └── wayland-shell-integration
│               └── libinputpanel-shell.so
└── share
    ├── dbus-1
    │   └── services
    │       └── org.maliit.server.service
    └── doc
        ├── maliit6-framework-doc
        │   ├── *
        └── maliit-framework
            ├── *

Open points from my list:

  • port examples for coinstallability
  • port interactive tests for coinstallability
  • port qmake configs
  • test runtime (all tests above are only build system checks and tests of generated files)
  • figure out what to do with the dbus interface, because only one can be there at a time (input welcome!)

@JamiKettunen
Copy link

@dobey Any comment from your side? With Qt5 going fully EoL in 5 months (May 2025) and later distros starting to consider dropping any remaining packages depending on Qt5 still etc it'd be nice to have a way forward here followed by Maliit component releases also compatible with Qt6 (it's been nearly 2.5 years since 2.3.x) :)

@@ -552,6 +598,7 @@ if(enable-tests)
tests/ut_maliit_glib_settings/ut_maliit_glib_settings.c
tests/ut_maliit_glib_settings/mockmaliitserver.c
tests/ut_maliit_glib_settings/mockmaliitserver.h)
set_target_properties(ut_maliit_glib_settings PROPERTIES OUTPUT_NAME "ut_maliit_glib_settings${MALIIT_EXE_SUFFIX}")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test also needs to be updated to execute this after rename because it currently fails to run with Unable to find executable: ut_maliit_glib_settings (because it's called ut_maliit_glib_settings6 etc)

datadir=${datarootdir}
pluginsdatadir=${datadir}/maliit/plugins
pluginsdatadir=${datadir}/maliit@MALIIT_LIB_SUFFIX@/plugins

Name: Maliit Plugins
Description: Maliit provides a flexible and cross platform input method framework. It is usable on all MeeGo user experiences, and in other GNU/Linux distributions as well.
Version: @PROJECT_VERSION@
Requires: maliit-framework

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Requires: maliit-framework
Requires: maliit@MALIIT_LIB_SUFFIX@-framework

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants