# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/kde5-functions.eclass,v 1.4 2015/01/09 18:26:26 mrueg Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/kde5-functions.eclass,v 1.5 2015/03/18 13:04:35 kensington Exp $
# @ECLASS: kde5-functions.eclass
# @MAINTAINER:
*) die "EAPI=${EAPI:-0} is not supported" ;;
esac
+# @ECLASS-VARIABLE: ECM_MINIMAL
+# @DESCRIPTION:
+# Minimal extra-cmake-modules version to require for the package.
+: ${ECM_MINIMAL:=1.7.0}
+
# @ECLASS-VARIABLE: FRAMEWORKS_MINIMAL
# @DESCRIPTION:
# Minimal Frameworks version to require for the package.
-: ${FRAMEWORKS_MINIMAL:=5.6.0}
+: ${FRAMEWORKS_MINIMAL:=5.7.0}
+
+# @ECLASS-VARIABLE: PLASMA_MINIMAL
+# @DESCRIPTION:
+# Minimal Plasma version to require for the package.
+: ${PLASMA_MINIMAL:=5.2.0}
+
+# @ECLASS-VARIABLE: KDE_APPS_MINIMAL
+# @DESCRIPTION:
+# Minimal KDE Applicaions version to require for the package.
+: ${KDE_APPS_MINIMAL:=14.12.0}
# @ECLASS-VARIABLE: KDEBASE
# @DESCRIPTION:
# @FUNCTION: _add_kdecategory_dep
# @INTERNAL
# @DESCRIPTION:
-# Implementation of add_kdeplasma_dep and add_frameworks_dep.
+# Implementation of add_plasma_dep and add_frameworks_dep.
_add_kdecategory_dep() {
debug-print-function ${FUNCNAME} "$@"
if [[ -n ${version} ]] ; then
local operator=">="
- local version="-${version}"
+ local version="-$(get_version_component_range 1-3 ${version})"
fi
if [[ ${SLOT} = 4 || ${SLOT} = 5 ]] && ! has kde5-meta-pkg ${INHERITED} ; then
version=${3}
elif [[ ${CATEGORY} = kde-frameworks ]]; then
version=$(get_version_component_range 1-2)
- elif [[ ${CATEGORY} = kde-base ]]; then
- case $(get_kde_version) in
- 5.1) version=5.3.0 ;;
- *) version=${FRAMEWORKS_MINIMAL} ;;
- esac
elif [[ -z "${version}" ]] ; then
version=${FRAMEWORKS_MINIMAL}
fi
_add_kdecategory_dep kde-frameworks "${1}" "${2}" "${version}"
}
-# @FUNCTION: add_kdeapps_dep
+# @FUNCTION: add_plasma_dep
# @USAGE: <package> [USE flags] [minimum version]
# @DESCRIPTION:
-# Create proper dependency for kde-apps/ dependencies.
+# Create proper dependency for kde-base/ 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_kdeapps_dep() {
+add_plasma_dep() {
debug-print-function ${FUNCNAME} "$@"
local version
if [[ -n ${3} ]]; then
version=${3}
- elif [[ ${CATEGORY} = kde-apps ]]; then
+ elif [[ ${CATEGORY} = kde-plasma ]]; then
version=${PV}
+ elif [[ -z "${version}" ]] ; then
+ version=${PLASMA_MINIMAL}
fi
- _add_kdecategory_dep kde-apps "${1}" "${2}" "${version}"
+ _add_kdecategory_dep kde-plasma "${1}" "${2}" "${version}"
}
-# @FUNCTION: add_kdeplasma_dep
+# @FUNCTION: add_kdeapps_dep
# @USAGE: <package> [USE flags] [minimum version]
# @DESCRIPTION:
-# Create proper dependency for kde-base/ dependencies.
+# Create proper dependency for kde-apps/ 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_kdeplasma_dep() {
+add_kdeapps_dep() {
debug-print-function ${FUNCNAME} "$@"
local version
if [[ -n ${3} ]]; then
version=${3}
- elif [[ ${CATEGORY} = kde-plasma ]]; then
+ elif [[ ${CATEGORY} = kde-apps ]]; then
version=${PV}
+ elif [[ -z "${version}" ]] ; then
+ # In KDE applications world, 5.9999 > yy.mm.x
+ [[ ${PV} = 5.9999 ]] && version=5.9999 || version=${KDE_APPS_MINIMAL}
fi
- _add_kdecategory_dep kde-plasma "${1}" "${2}" "${version}"
+ _add_kdecategory_dep kde-apps "${1}" "${2}" "${version}"
}
# @FUNCTION: get_kde_version
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/kde5.eclass,v 1.3 2015/02/10 22:21:26 johu Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/kde5.eclass,v 1.4 2015/03/18 13:04:35 kensington Exp $
# @ECLASS: kde5.eclass
# @MAINTAINER:
# @ECLASS-VARIABLE: QT_MINIMAL
# @DESCRIPTION:
# Minimal Qt version to require for the package.
-: ${QT_MINIMAL:=5.3.0}
+: ${QT_MINIMAL:=5.4.1}
# @ECLASS-VARIABLE: KDE_AUTODEPS
# @DESCRIPTION:
: ${KDE_TEST:=false}
fi
+# @ECLASS-VARIABLE: KDE_SELINUX_MODULE
+# @DESCRIPTION:
+# If set to "none", do nothing.
+# For any other value, add selinux to IUSE, and depending on that useflag
+# add a dependency on sec-policy/selinux-${KDE_SELINUX_MODULE} to (R)DEPEND
+: ${KDE_SELINUX_MODULE:=none}
+
if [[ ${KDEBASE} = kdevelop ]]; then
HOMEPAGE="http://www.kdevelop.org/"
else
case ${KDE_AUTODEPS} in
false) ;;
*)
+ if [[ ${CATEGORY} = kde-frameworks ]]; then
+ ECM_MINIMAL=1.$(get_version_component_range 2).0
+ fi
+
if [[ ${KDE_BUILD_TYPE} = live ]]; then
- ecm_version=9999
- elif [[ ${CATEGORY} = kde-frameworks ]]; then
- ecm_version=1.$(get_version_component_range 2).0
- else
- ecm_version=1.3.0
+ case ${CATEGORY} in
+ kde-frameworks)
+ ECM_MINIMAL=9999
+ FRAMEWORKS_MINIMAL=9999
+ ;;
+ kde-plasma)
+ ECM_MINIMAL=9999
+ FRAMEWORKS_MINIMAL=9999
+ ;;
+ *) ;;
+ esac
fi
- DEPEND+=" >=dev-libs/extra-cmake-modules-${ecm_version}"
+ DEPEND+=" >=dev-libs/extra-cmake-modules-${ECM_MINIMAL}"
RDEPEND+=" >=kde-frameworks/kf-env-3"
COMMONDEPEND+=" >=dev-qt/qtcore-${QT_MINIMAL}:5"
- if [[ ${CATEGORY} = kde-base ]]; then
- RDEPEND+=" !kde-base/kde-l10n:4"
+ if [[ ${CATEGORY} = kde-plasma ]]; then
+ RDEPEND+="
+ !kde-apps/kde-l10n[-minimal]
+ !kde-base/kde-l10n:4
+ "
+ fi
+
+ if [[ ${CATEGORY} == kde-apps ]]; then
+ RDEPEND+="
+ !kde-apps/${PN}:4
+ !kde-base/${PN}
+ "
fi
unset ecm_version
;;
esac
+case ${KDE_SELINUX_MODULE} in
+ none) ;;
+ *)
+ IUSE+=" selinux"
+ COMMONDEPEND+=" selinux? ( sec-policy/selinux-${KDE_SELINUX_MODULE} )"
+ ;;
+esac
+
DEPEND+=" ${COMMONDEPEND} dev-util/desktop-file-utils"
RDEPEND+=" ${COMMONDEPEND}"
unset COMMONDEPEND
# This variable allows easy overriding of default kde mirror service
# (anonsvn) with anything else you might want to use.
ESVN_MIRROR=${ESVN_MIRROR:=svn://anonsvn.kde.org/home/kde}
- ESVN_REPO_URI="${ESVN_MIRROR}/trunk/KDE/${PN}"
+
+ local branch_prefix="KDE"
+
+ if [[ -n ${KMNAME} ]]; then
+ branch_prefix="${KMNAME}"
+ fi
+
+ ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${branch_prefix}/${PN}"
;;
git)
# @ECLASS-VARIABLE: EGIT_MIRROR
_kmname=${PN}
fi
- if [[ ${PV} != 9999 && ${KDEBASE} = kde-base ]]; then
+ if [[ ${PV} != 9999 && ${CATEGORY} = kde-plasma ]]; then
EGIT_BRANCH="Plasma/$(get_version_component_range 1-2)"
fi
# only build unit tests when required
if ! use_if_iuse test ; then
comment_add_subdirectory autotests
+ comment_add_subdirectory tests
fi
- if [[ ${CATEGORY} = kde-base ]]; then
+ if [[ ${CATEGORY} = kde-plasma ]]; then
punt_bogus_deps
fi
cmakeargs+=( -DBUILD_TESTING=OFF )
fi
- # make sure config files go to /etc instead of /usr/etc
- cmakeargs+=(-DSYSCONF_INSTALL_DIR="${EPREFIX}"/etc)
-
# install mkspecs in the same directory as qt stuff
cmakeargs+=(-DKDE_INSTALL_USE_QT_SYS_PATHS=ON)