< Project:Qt
Project:Qt/Policies
General policies
- Do not add random new packages to the
dev-qt
category, it is reserved for the Qt framework modules and directly related libraries and development applications from the upstream Qt Project.
- Changes to Qt packages should be reviewed by a project member prior to being committed.
- In the case of minor changes (e.g. typos, pkgmoved dependencies, etc.), please notify the team. Most of our packages are bumped out of the overlay and tree changes will be lost if not also made there.
Dependencies
- Explicitly depend on all Qt modules that are used - do not rely on transitive dependencies (including dev-qt/qtcore).
- Specify the correct slot - most Qt modules have two major versions.
- The
:=
subslot dependency operator must only be used for packages that are known to use a private part of the Qt API.
Handling different versions of Qt
Warning
Qt 4 is deprecated and should be avoided wherever possible.
Qt 4 is deprecated and should be avoided wherever possible.
We recommend all packages with a Qt dependency follow these recommendations to ensure a consistent user experience.
Avoiding unnecessary REQUIRED_USE
is important to minimise user interaction, especially as USE="qt4 qt5"
becomes a common configuration.
Optional support for a single Qt version
For example, a CLI application with an optional Qt GUI.
- Depending on the Qt version required, implement the appropriate USE flag: qt4 or qt5.
Optional support for one of two Qt versions
For example, a CLI application with an optional GUI that can be built with Qt 4 or Qt 5.
- Implement both qt4 and qt5 USE flags
- When both qt4 and qt5 USE flags are enabled, prefer qt5
- Do not use
REQUIRED_USE="?? ( qt4 qt5 )"
Optional support for two Qt versions
For example, a library with both Qt 4 and Qt 5 bindings (example: app-text/poppler).
- Implement both qt4 and qt5 USE flags
Requires one of two Qt versions
For example, a Qt-based media player that can be built with either Qt 4 or Qt 5 (example: net-irc/quassel).
- Implement a qt5 USE flag to choose Qt 5
- Do not implement a qt4 USE flag and do not use
REQUIRED_USE="^^ ( qt4 qt5 )"
Requires at least one Qt version
For example, a library with a SONAME that changes based on which Qt version it was built against (example: media-libs/phonon).
- Implement both qt4 and qt5 USE flags
- Enable the qt4 USE flag by default:
USE="+qt4"
- Add
REQUIRED_USE="|| ( qt4 qt5 )"
- Use multibuild eclass instead of revision slotting (-r400, -r500)
This article is issued from Gentoo. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.