Skip to content

Commit

Permalink
qt5-build.eclass: Symlink necessary tools to /usr/bin
Browse files Browse the repository at this point in the history
According to upstream discussion on Qt6 recommended tools to be in PATH.
See also: https://lists.qt-project.org/pipermail/development/2020-November/040626.html

With '5' suffix:
- qmake
- qml
- qtdiag
- qtpaths
- designer

Without suffix:
- assistant
- qdbus
- qdbusviewer
- linguist

Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
  • Loading branch information
a17r committed Nov 22, 2020
1 parent 50b586d commit ac597d4
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions eclass/qt5-build.eclass
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,20 @@ qt5-build_src_install() {

qt5_install_module_config

if ver_test ${PV} -ge 5.15.2; then
case ${PN} in
qtcore) qt5_symlink_binary_to_path qmake 5 ;;
qtdeclarative) qt5_symlink_binary_to_path qml 5 ;;
qtdiag) qt5_symlink_binary_to_path qtdiag 5 ;;
qtpaths) qt5_symlink_binary_to_path qtpaths 5 ;;
designer) qt5_symlink_binary_to_path designer 5 ;;
assistant) qt5_symlink_binary_to_path assistant ;;
qdbus) qt5_symlink_binary_to_path qdbus ;;
qdbusviewer) qt5_symlink_binary_to_path qdbusviewer ;;
linguist) qt5_symlink_binary_to_path linguist ;;
esac
fi

# prune libtool files
find "${D}" -name '*.la' -type f -delete || die
}
Expand Down Expand Up @@ -469,6 +483,15 @@ qt5_symlink_tools_to_build_dir() {
popd >/dev/null || die
}

# @FUNCTION: qt5_symlink_binary_to_path
# @USAGE: <target binary name> [suffix]
# @INTERNAL
# @DESCRIPTION:
# Symlink a given binary from QT5_BINDIR to QT5_PREFIX/bin, with optional suffix
qt5_symlink_binary_to_path() {
dosym ../../"${QT5_BINDIR#${EPREFIX}/}"/${1} /usr/bin/${1}${2}
}

# @FUNCTION: qt5_base_configure
# @INTERNAL
# @DESCRIPTION:
Expand Down

0 comments on commit ac597d4

Please sign in to comment.