QT5-BUILD.ECLASS

Section: eclass-manpages (5)
Updated: Oct 2024
Index Return to Main Contents

NAME

qt5-build.eclass - Eclass for Qt5 split ebuilds.

DESCRIPTION

This eclass contains various functions that are used when building Qt5.

SUPPORTED EAPIS

8

FUNCTIONS

qt5-build_src_prepare
Prepares the environment and patches the sources if necessary.
qt5-build_src_configure
Runs qmake in the target directories. For packages in qtbase, ./configure is also run before qmake.
qt5-build_src_compile
Runs emake in the target directories.
qt5-build_src_test
Runs tests in the target directories.
qt5-build_src_install
Runs emake install in the target directories.
qt5-build_pkg_postinst
Regenerate configuration after installation or upgrade/downgrade.
qt5-build_pkg_postrm
Regenerate configuration when a module is completely removed.
qt5_configure_oos_quirk <file> or <file> <path>
Quirk for out-of-source builds. Runs qmake in root directory, copies generated pri <file> from source <path> to build dir <path>. If no <path> is given, <file> is copied to ${QT5_BUILD_DIR}.
qt5_syncqt_version
Wrapper for Qt5 syncqt.pl to sync header files for ${PV} (required to run if headers are added/removed by patching)
qt5_symlink_binary_to_path <target binary name> [suffix]
Symlink a given binary from QT5_BINDIR to QT5_PREFIX/bin, with optional suffix
qt_use <flag> [feature] [enableval]
<flag> is the name of a flag in IUSE.

Outputs "-${enableval}-${feature}" if <flag> is enabled, "-no-${feature}" otherwise. If [feature] is not specified, <flag> is used in its place. If [enableval] is not specified, the "-${enableval}" prefix is omitted.

qt_use_compile_test <flag> [config]
<flag> is the name of a flag in IUSE. [config] is the argument of qtCompileTest, defaults to <flag>.

This function is useful to disable optional dependencies that are checked at qmake-time using the qtCompileTest() function. If <flag> is disabled, the compile test is skipped and the dependency is assumed to be unavailable, i.e. the corresponding feature will be disabled. Note that all invocations of this function must happen before calling qt5-build_src_configure.

qt_use_disable_config <flag> <config> <files...>
<flag> is the name of a flag in IUSE. <config> is the (lowercase) name of a Qt5 config entry. <files...> is a list of one or more qmake project files.

This function patches <files> to treat <config> as disabled when <flag> is disabled, otherwise it does nothing. This can be useful to avoid an automagic dependency when the config entry is enabled on the system but the corresponding USE flag is disabled.

qt_use_disable_mod <flag> <module> <files...>
<flag> is the name of a flag in IUSE. <module> is the (lowercase) name of a Qt5 module. <files...> is a list of one or more qmake project files.

This function patches <files> to treat <module> as not installed when <flag> is disabled, otherwise it does nothing. This can be useful to avoid an automagic dependency when the module is present on the system but the corresponding USE flag is disabled.

ECLASS VARIABLES

QT5_BUILD_TYPE = release
Default value is "release". If PV matches "*9999*", this is automatically set to "live".
QT5_KDEPATCHSET_REV (SET BEFORE INHERIT)
Downstream generated patchset revision pulled from KDE's Qt5PatchCollection, with the patchset having been generated in the following way from upstream's qt module git repository:
git format-patch v${PV}-lts-lgpl..origin/gentoo-kde/${PV} \
        -o ${QT5_MODULE}-${PV}-gentoo-kde-${QT5_KDEPATCHSET_REV}
Used for SRC_URI and applied in src_prepare. Must be set before inheriting the eclass.
QT5_MODULE ?= ${PN} (SET BEFORE INHERIT)
The upstream name of the module this package belongs to. Used for SRC_URI and EGIT_REPO_URI. Must be set before inheriting the eclass.
QT5_PV = $(ver_cut 1-3)
3-component version for use in dependency declarations on other dev-qt/ pkgs.
QT5_TARGET_SUBDIRS
Array variable containing the source directories that should be built. All paths must be relative to ${S}.
QT5_GENTOO_CONFIG
Array of <useflag:feature:macro> triplets that are evaluated in src_install to generate the per-package list of enabled QT_CONFIG features and macro definitions, which are then merged together with all other Qt5 packages installed on the system to obtain the global qconfig.{h,pri} files.
QT5_GENTOO_PRIVATE_CONFIG
Array of <useflag:feature> pairs that are evaluated in src_install to generate the per-package list of enabled QT.global_private features, which are then merged together with all other Qt5 packages installed on the system to obtain the global qmodule.pri file.
VIRTUALX_REQUIRED ?= manual (SET BEFORE INHERIT)
For proper description see virtualx.eclass man page. Here we redefine default value to be manual, if your package needs virtualx for tests you should proceed with setting VIRTUALX_REQUIRED=test.
QT5_BUILD_DIR ?= ${S}_build (GENERATED BY ECLASS)
Build directory for out-of-source builds.

AUTHORS

Davide Pesavento <pesa@gentoo.org>

MAINTAINERS

qt@gentoo.org

REPORTING BUGS

Please report bugs via https://bugs.gentoo.org/

FILES

qt5-build.eclass

SEE ALSO

ebuild(5)
https://gitweb.gentoo.org/repo/gentoo.git/log/eclass/qt5-build.eclass


Index

NAME
DESCRIPTION
SUPPORTED EAPIS
FUNCTIONS
ECLASS VARIABLES
AUTHORS
MAINTAINERS
REPORTING BUGS
FILES
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 03:27:01 GMT, October 07, 2024