kdesrc-build supports building the Qt™ toolkit used by KDE software as a convenience to users. This support is handled by a special module named qt.
Qt™ is developed under a separate repository from KDE software located at http://code.qt.io/cgit/qt/.
In order to build Qt™, you should make sure that the qtdir setting is set to the directory you'd like to install Qt™ to, as described in the section called “Setting the Configuration Data”.
You should then ensure that the qt module is added to
.kdesrc-buildrc, before any other modules in the
file. If you are using the sample configuration file, you can simply
uncomment the existing qt module entry.
The first option is to build Qt™ using a mirror maintained on the KDE source repositories (no other changes are applied, it is simply a clone of the official source). This is highly recommended due to occasional issues with cloning the full Qt™ module from its official repository.
You can set the
repositoryoption for the qt module to
kde:qtto use this option.
Otherwise, to build the standard Qt™, set your
git://gitorious.org/qt/qt.git. Note that you may experience problems performing the initial clone of Qt™ from this repository.
In both cases, the branch option should be set to
master (unless you'd
like to build a different branch).
Nota Bene: this section does not apply to modules for which you have configured a custom toolchain, using e.g. cmake-toolchain.
To save you time, kdesrc-build adds some standard paths to your environment for you:
The path to the KDE and Qt™ libraries is added to the
LD_LIBRARY_PATHvariable automatically. This means that you do not need to edit libpath to include them.
The path to the KDE and Qt™ development support programs are added to the
PATHvariable automatically. This means that you do not need to edit binpath to include them.
The path to the KDE-provided pkg-config is added automatically to
PKG_CONFIG_PATH. This means that you do not need to use set-env to add these.
The setting for kdedir is automatically propagated to the
KDEDIRenvironment variable while building. (
KDEDIRSis not affected).
The setting for qtdir is automatically propagated to the
QTDIRenvironment variable while building.
Programs can run with different priority levels on Operating Systems, including Linux® and BSD. This allows the system to allocate time for the different programs in accordance with how important they are.
kdesrc-build will normally allocate itself a low priority so that the rest of the programs on your system are unaffected and can run normally. Using this technique, kdesrc-build will use extra CPU when it is available.
kdesrc-build will still maintain a high enough priority level so that it runs before routine batch processes and before CPU donation programs such as Seti@Home.
To alter kdesrc-build so that it uses a higher (or lower) priority level permanently, then you need to adjust the niceness setting in the configuration file. The niceness setting controls how “nice” kdesrc-build is to other programs. In other words, having a higher niceness gives kdesrc-build a lower priority. So to give kdesrc-build a higher priority, reduce the niceness (and vice versa). The niceness can go from 0 (not nice at all, highest priority) to 20 (super nice, lowest priority).
It is possible for some programs run by the super user to have a negative nice value, with a correspondingly even higher priority for such programs. Setting a negative (or even 0) niceness for kdesrc-build is not a great idea, as it will not help run time significantly, but will make your computer seem very sluggish should you still need to use it.
To run kdesrc-build with a niceness of 15 (a lower priority than normal):
Or, you can edit the configuration file to make the change permanent:
The niceness option only affects the usage of the computer's processor(s). One other major affect on computer performance relates to how much data input or output (I/O) a program uses. In order to control how much I/O a program can use, modern Linux® operating systems support a similar tool called ionice. kdesrc-build supports ionice, (but only to enable or disable it completely) using the use-idle-io-priority option, since kdesrc-build version 1.12.
You may wish to have kdesrc-build run the installation with super user privileges. This may be for the unrecommended system-wide installation. This is also useful when using a recommended single user KDE build, however. This is because some modules (especially kdebase) install programs that will briefly need elevated permissions when run. They are not able to achieve these permission levels unless they are installed with the elevated permissions.
You could simply run kdesrc-build as the super user directly, but this is not recommended, since the program has not been audited for that kind of use. Although it should be safe to run the program in this fashion, it is better to avoid running as the super user when possible.
To take care of this, kdesrc-build provides the make-install-prefix option. You can use this option to specify a command to use to perform the installation as another user. The recommended way to use this command is with the Sudo program, which will run the install command as the super user.