Currently building the KPackage install handlers is mandatory when building the frameworkintegration. This package allows them to be disabled if they do not seem useful for the given target environment. Explicit Opt-In is required for this.
Details
Diff Detail
- Repository
- R252 Framework Integration
- Lint
Lint Skipped - Unit
Unit Tests Skipped
Why would we want to make it optional?
In fact, the only one that is mandatory is the KNS one.
I build a Qt app with „just enough“ KDE-integration for the Flatpak sandbox where I have no use for this KPackage stuff. I know I could just include the install handlers in the build and drop them afterwards, but that would require a build KNS (and all of *its* dependencies) as well. IMHO „only build what you use“ is surpreme in this case.
The target application I'm building has only very minimal dependencies on Qt (just QtCore + QtWidgets + PyQt5) and no real dependencies on KDE. The application only has a size footprint of about 6MiB, the required Qt libraries use about 10MiB of space, the selected set of KDE integration libraries (a minimalist build of the KDE plasmaintegration package including dependencies) add another 10MiB. By contrast org.kde.Platform alone adds more than 150MiB in size requirements – this is not acceptable for an app that uses less than 20% percent of its contents IMHO. You can take a look at the project here. I'm planning on making this available as a runtime extension for the FreeDesktop runtime so that other people can reuse it too.
If you're not merging this I'll keep the patch on my side.
We have done similar things in other frameworks, to indeed make it easier to reuse them in contexts where not all dependencies are wanted.
See SONNET_USE_WIDGETS, KSYNTAXHIGHLIGHTING_USE_GUI, KCONFIG_USE_GUI, kxmlgui's FORCE_DISABLE_KGLOBALACCEL, ki18n's BUILD_WITH_QTSCRIPT, KACTIVITIES_LIBRARY_ONLY, KIOCORE_ONLY...
Making KF5 frameworks reusable outside of the KDE community was and is still goal number 1 of the rearchitecture (compared to kdelibs4), so I'd say, yes, this change is good.
Since these changes have been approved and marked read-to-land for quite some time, could this please be done soon? Thank you!
Ah, you need to specify that you don't have a developer account, otherwise the assumption is simply that you'll push the patch once approved.
I'll land it now.