diff options
| author | Andreas Sturmlechner <andreas.sturmlechner@gmail.com> | 2016-01-07 18:40:12 +0100 |
|---|---|---|
| committer | Michael Palimaka <kensington@gentoo.org> | 2016-02-01 03:21:47 +1100 |
| commit | 7e4a53919ff347857cb86bddc887f686185831cb (patch) | |
| tree | ea2286c1b6907c0ecbb0dbf3dc2970154bb2b96d /eclass/kde5-functions.eclass | |
| parent | 87f295e2e641ffb819c6746e35e6ba9a87d108a0 (diff) | |
| download | kde-7e4a53919ff347857cb86bddc887f686185831cb.tar.gz kde-7e4a53919ff347857cb86bddc887f686185831cb.tar.bz2 kde-7e4a53919ff347857cb86bddc887f686185831cb.zip | |
kde5-functions.eclass: Introduce add_qt_dep for consistent Qt version deps
_add_kdecategory_dep -> _add_category_dep
Diffstat (limited to 'eclass/kde5-functions.eclass')
| -rw-r--r-- | eclass/kde5-functions.eclass | 37 |
1 files changed, 31 insertions, 6 deletions
diff --git a/eclass/kde5-functions.eclass b/eclass/kde5-functions.eclass index 7b021d298b1..f8b3b30ecd8 100644 --- a/eclass/kde5-functions.eclass +++ b/eclass/kde5-functions.eclass @@ -93,11 +93,12 @@ _check_gcc_version() { fi } -# @FUNCTION: _add_kdecategory_dep +# @FUNCTION: _add_category_dep # @INTERNAL # @DESCRIPTION: -# Implementation of add_plasma_dep and add_frameworks_dep. -_add_kdecategory_dep() { +# Implementation of add_plasma_dep, add_frameworks_dep, add_kdeapps_dep, +# and finally, add_qt_dep. +_add_category_dep() { debug-print-function ${FUNCNAME} "$@" local category=${1} @@ -145,7 +146,7 @@ add_frameworks_dep() { version=${FRAMEWORKS_MINIMAL} fi - _add_kdecategory_dep kde-frameworks "${1}" "${2}" "${version}" + _add_category_dep kde-frameworks "${1}" "${2}" "${version}" } # @FUNCTION: add_plasma_dep @@ -171,7 +172,7 @@ add_plasma_dep() { version=${PLASMA_MINIMAL} fi - _add_kdecategory_dep kde-plasma "${1}" "${2}" "${version}" + _add_category_dep kde-plasma "${1}" "${2}" "${version}" } # @FUNCTION: add_kdeapps_dep @@ -202,7 +203,31 @@ add_kdeapps_dep() { fi fi - _add_kdecategory_dep kde-apps "${1}" "${2}" "${version}" + _add_category_dep kde-apps "${1}" "${2}" "${version}" +} + +# @FUNCTION: add_qt_dep +# @USAGE: <package> [USE flags] [minimum version] +# @DESCRIPTION: +# Create proper dependency for dev-qt/ dependencies. +# This takes 1 to 3 arguments. The first being the package name, the optional +# second is additional USE flags to append, and the optional third is the +# version to use instead of the automatic version (use sparingly). +# The output of this should be added directly to DEPEND/RDEPEND, and may be +# wrapped in a USE conditional (but not an || conditional without an extra set +# of parentheses). +add_qt_dep() { + debug-print-function ${FUNCNAME} "$@" + + local version + + if [[ -n ${3} ]]; then + version=${3} + elif [[ -z "${version}" ]] ; then + version=${QT_MINIMAL} + fi + + _add_category_dep dev-qt "${1}" "${2}" "${version}" } # @FUNCTION: get_kde_version |
