I use several non-KDE Qt-based applications which I tend to compile manually from source to use the same non-distro-provided Qt version that I compile KDE software against.
I’ve noticed that I don’t update them as often as the rest of the
system, so I decided to see if I can add them to
kdesrc-build
.
The packages-to-be-built definitions are located in
repo-metadata/module-definictions
which already contains a
few 3rd-party libraries that the KDE frameworks and applications
use.
Adding the Strawberry player (fork of Clementine, which was a fork of
Amarok 1.x) to the build, was quite straight-forward. I just needed to
define the repository, cmake
options to make it build the
Qt6 version instead of the Qt5 one, and the branch I want to build
from.
module strawberry
repository https://github.com/strawberrymusicplayer/strawberry.git
cmake-options -DBUILD_WITH_QT6=ON
branch master
end module
For applications with normal cmake
setup, it is as easy
as that. But there are applications like recoll
which don’t
have a CMakeLists.txt file in the top level, and
kdesrc-build
doesn’t like that.
To ensure that kdesrc-build
finds the real src directory
for cmake
, I needed to do something completely hackhish. I
had to pass the path to the source directory, which is otherwise defined
automatically by kdesrc-build
for each project it builds,
to cmake-options
:
module recoll
repository https://framagit.org/medoc92/recoll.git
cmake-options \
-DRECOLL_QT6_BUILD=1 \
-DRECOLL_ENABLE_SYSTEMD=0 \
-DRECOLL_ENABLE_WEBENGINE=1 \
-DRECOLL_ENABLE_X11MON=0 \
-S /kde/src/recoll/src
branch master
end module
Fortunately, kdesrc-build
appends
cmake-options
the normal cmake
arguments, so
my -S
path overrides the path that
kdesrc-build
defines.