commit:     23d7e9fc35cab4f42325411503a488c8c7fb78bf
Author:     Jimi Huotari <chiitoo <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 19 11:19:22 2023 +0000
Commit:     Jimi Huotari <chiitoo <AT> gentoo <DOT> org>
CommitDate: Sun Mar 19 13:06:36 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=23d7e9fc

qt6-build.eclass: add 'qt6_symlink_binary_to_path'

Signed-off-by: Jimi Huotari <chiitoo <AT> gentoo.org>

 eclass/qt6-build.eclass | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/eclass/qt6-build.eclass b/eclass/qt6-build.eclass
index f92d37eba2f3..79c06f341ede 100644
--- a/eclass/qt6-build.eclass
+++ b/eclass/qt6-build.eclass
@@ -137,6 +137,16 @@ qt_feature() {
        echo "-DQT_FEATURE_${2:-$1}=$(usex $1 ON OFF)"
 }
 
+# @FUNCTION: qt6_symlink_binary_to_path
+# @USAGE: <target binary name> [suffix]
+# @DESCRIPTION:
+# Symlink a given binary from QT6_BINDIR to QT6_PREFIX/bin, with optional 
suffix
+qt6_symlink_binary_to_path() {
+    [[ $# -ge 1 ]] || die "${FUNCNAME}() requires at least one argument"
+
+    dosym -r "${QT6_BINDIR}"/${1} /usr/bin/${1}${2}
+}
+
 ######  Internal functions  ######
 
 # @FUNCTION: qt6_prepare_env

Reply via email to