diff options
| author | Michael Palimaka <kensington@gentoo.org> | 2013-11-14 03:28:09 +1100 |
|---|---|---|
| committer | Michael Palimaka <kensington@gentoo.org> | 2013-11-14 03:28:09 +1100 |
| commit | 02e77a004b3c3dca66b8e1e542397fa893aaa737 (patch) | |
| tree | e060918d18bc845083146e2ca3bca3e3fc930dfe /eclass/kde4-functions.eclass | |
| parent | 47b081c9c7d83530c9adef4582b5ba1c47c296bd (diff) | |
| download | kde-02e77a004b3c3dca66b8e1e542397fa893aaa737.tar.gz kde-02e77a004b3c3dca66b8e1e542397fa893aaa737.tar.bz2 kde-02e77a004b3c3dca66b8e1e542397fa893aaa737.zip | |
[eclass] Add add_frameworks_dep function.
Diffstat (limited to 'eclass/kde4-functions.eclass')
| -rw-r--r-- | eclass/kde4-functions.eclass | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/eclass/kde4-functions.eclass b/eclass/kde4-functions.eclass index 9079fc2f894..cb6d331b67e 100644 --- a/eclass/kde4-functions.eclass +++ b/eclass/kde4-functions.eclass @@ -39,6 +39,9 @@ esac if [[ ${CATEGORY} = kde-base ]]; then debug-print "${ECLASS}: KDEBASE ebuild recognized" KDEBASE=kde-base +elif [[ ${CATEGORY} = kde-frameworks ]]; then + debug-print "${ECLASS}: KDEFRAMEWORKS ebuild recognized" + KDEBASE=kde-frameworks elif [[ ${KMNAME-${PN}} = kdevelop ]]; then debug-print "${ECLASS}: KDEVELOP ebuild recognized" KDEBASE=kdevelop @@ -358,6 +361,44 @@ add_kdebase_dep() { echo " >=kde-base/${1}-${ver}:4[aqua=${2:+,${2}}]" } +# @FUNCTION: add_frameworks_dep +# @DESCRIPTION: +# Create proper dependency for kde-frameworks/ 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_frameworks_dep() { + debug-print-function ${FUNCNAME} "$@" + + local ver + + if [[ -n ${3} ]]; then + ver=${3} + elif [[ -n ${KDE_OVERRIDE_MINIMAL} ]]; then + ver=${KDE_OVERRIDE_MINIMAL} + elif [[ ${KDEBASE} != kde-frameworks ]]; then + ver=${KDE_MINIMAL} + # if building stable-live version depend just on the raw KDE version + # to allow merging packages against more stable basic stuff + elif [[ ${PV} == *.9999 ]]; then + ver=$(get_kde_version) + else + ver=${PV} + fi + + [[ -z ${1} ]] && die "Missing parameter" + + local usedep= + if [[ -n ${2} ]] ; then + usedep="[${2}]" + fi + + echo " >=kde-frameworks/${1}-${ver}:5${usedep}" +} + # local function to enable specified translations for specified directory # used from kde4-functions_enable_selected_linguas function _enable_selected_linguas_dir() { |
