It's probably stupid, but it is what it is unfortunately. AUR packages still need to leave room so the distro user can decide what combination of packages is more adequate for them. plasma-desktop-git is perfectly usable with repo qt6-base and any other package that provides it, that doesn't have to specifically and unequivocally be the -git variant, which is also a maintainer's mistake.
If that held true for all -git packages, there would be no way to replace, say, plasma-workspace or qt6-base with your own implementation (see qt6-base-hifps, which wouldn't be possible without automatic conflict/provide).
And I've just found out that what I've said before is in the AUR guidelines.
Please add the companion conflicts=(kirigami-addons) prior to the provides line you added. Good there!
Imagine installing plasma-desktop-git which depends on plasma-workspace-git and that the latter didn't include both lines. You'd get a precious hell of messages of "installing X breaks dependency Y" because Pacman wouldn't know that they need to remove the repo's versions automatically.
It's imperative that these -git packages (like Plasma Desktop, Workspace, and apps) depend on the -git version of the dependencies. Most of the time they won't even build otherwise. Versioning differences can also cause issues that aren't as apparent.
And that file fighting is exactly the "dependency fuckery" you're talking about, which is solved on all sane AUR packages by cleanly declaring the above.
provides= should be used for maybe the libraries only, not the applications which use said libraries. I've added it here, but its removal revealed that some -git packages depend on the repo versions of the KDE libraries, which is completely stupid.
This can be fixed simply by setting the dependencies of those other packages to the -git versions.
Actually, that's exactly what causes the dependency hell. If such dependencies also don't declare their conflicts and provides against their non-git counterpart, those dependencies will break the dependencies that other packages have on them. Imagine installing plasma-desktop-git which depends on plasma-workspace-git and that the latter didn't include both lines. You'd get a precious hell of messages of "installing X breaks dependency Y" because Pacman wouldn't know that they need to remove the repo's versions automatically.
provides= does not solve the root problem, and that's the reason why it's encouraged and a standard practice to do here. For KDE examples that do exactly this, see kscreenlocker-git, kirigami-git itself, plasma-workspace-git, plasma-desktop-git, plasma-nm-git... I think it's very clear where my point is going to. Even most crucial packages for Plasma include them.
In fact, the rule is that every package on the AUR that replaces an official one must specify that they replace the repo package by declaring that it both conflicts with them and provides what the official repo used to (because by installing your -git packages the repo's must be deleted, otherwise they'd be fighting for each other's file places on the disk).
And that file fighting is exactly the "dependency fuckery" you're talking about, which is solved on all sane AUR packages by cleanly declaring the above.
The only actual reason that including both wouldn't solve anything is 1. if your package didn't exist in the official repos and 2. if it's a non-git package.
Other KDE -git packages have the non-git versions of their dependencies set. Because of this, trying to install something like Plasma Bigscreen or Mobile from Git results in a dependency hell fuckery. This can be fixed simply by setting the dependencies of those other packages to the -git versions. provides= does not solve the root problem.
Please add the proper conflicts and depends to the PKGBUILD, so it can cleanly replace the repo's kirigami-addons:
conflicts=($_pkgname)
provides=($_pkgname)
The above syntax makes it so it can replace kirigami-addons properly without trying to hard push them together.
Otherwise, this is what happens:
:: installing kirigami-addons-git (1.12.1.r1.g476b855-1) breaks dependency with «kirigami-addons», needed for package discover
:: installing kirigami-addons-git (1.12.1.r1.g476b855-1) breaks dependency with «kirigami-addons», needed for package easyeffects
:: installing kirigami-addons-git (1.12.1.r1.g476b855-1) breaks dependency with «kirigami-addons», needed for package elisa
:: installing kirigami-addons-git (1.12.1.r1.g476b855-1) breaks dependency with «kirigami-addons», needed for package kdeconnect-git
:: installing kirigami-addons-git (1.12.1.r1.g476b855-1) breaks dependency with «kirigami-addons», needed for package kdeplasma-addons
:: installing kirigami-addons-git (1.12.1.r1.g476b855-1) breaks dependency with «kirigami-addons», needed for package koko-git
:: installing kirigami-addons-git (1.12.1.r1.g476b855-1) breaks dependency with «kirigami-addons», needed for package plasma-keyboard
:: installing kirigami-addons-git (1.12.1.r1.g476b855-1) breaks dependency with «kirigami-addons», needed for package plasma-systemmonitor
:: installing kirigami-addons-git (1.12.1.r1.g476b855-1) breaks dependency with «kirigami-addons», needed for package plasma-welcome
:: installing kirigami-addons-git (1.12.1.r1.g476b855-1) breaks dependency with «kirigami-addons», needed for package xdg-desktop-portal-kde
I get this error:
CMake Error: CMake was unable to find a build program corresponding to "Unix Makefiles". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
See also "CMakeOutput.log".