From: Michael Palimaka Date: Wed, 18 Mar 2015 13:04:35 +0000 (+0000) Subject: Sync with KDE overlay - introduce ECM_MINIMAL & KDE_SELINUX_MODULE, rename add_kdepla... X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=1ea6a81ed444e669983be05b905659d9f7073b67;p=gentoo.git Sync with KDE overlay - introduce ECM_MINIMAL & KDE_SELINUX_MODULE, rename add_kdeplasma_dep -> add_plasma_dep, raise dependencies, and miscellaneous improvements/fixes. --- diff --git a/eclass/ChangeLog b/eclass/ChangeLog index 26969bf3ee48..faa5c257e677 100644 --- a/eclass/ChangeLog +++ b/eclass/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for eclass directory # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1566 2015/03/17 19:39:43 grknight Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1567 2015/03/18 13:04:35 kensington Exp $ + + 18 Mar 2015; Michael Palimaka kde5-functions.eclass, + kde5.eclass: + Sync with KDE overlay - introduce ECM_MINIMAL & KDE_SELINUX_MODULE, rename + add_kdeplasma_dep -> add_plasma_dep, raise dependencies, and miscellaneous + improvements/fixes. 17 Mar 2015; mysql-multilib.eclass: Move flag modifications to apply once for all ABIs; Use tc-ld-disable-gold diff --git a/eclass/kde5-functions.eclass b/eclass/kde5-functions.eclass index 651510b1c822..06c75b2db62b 100644 --- a/eclass/kde5-functions.eclass +++ b/eclass/kde5-functions.eclass @@ -1,6 +1,6 @@ # 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: @@ -23,10 +23,25 @@ case ${EAPI} in *) 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: @@ -79,7 +94,7 @@ _check_gcc_version() { # @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} "$@" @@ -95,7 +110,7 @@ _add_kdecategory_dep() { 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 @@ -124,11 +139,6 @@ add_frameworks_dep() { 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 @@ -136,52 +146,57 @@ add_frameworks_dep() { _add_kdecategory_dep kde-frameworks "${1}" "${2}" "${version}" } -# @FUNCTION: add_kdeapps_dep +# @FUNCTION: add_plasma_dep # @USAGE: [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: [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 diff --git a/eclass/kde5.eclass b/eclass/kde5.eclass index cc3f7a250cce..33b1578bc335 100644 --- a/eclass/kde5.eclass +++ b/eclass/kde5.eclass @@ -1,6 +1,6 @@ # 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: @@ -35,7 +35,7 @@ EXPORT_FUNCTIONS pkg_pretend pkg_setup src_unpack src_prepare src_configure src_ # @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: @@ -83,6 +83,13 @@ else : ${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 @@ -100,20 +107,40 @@ fi 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 @@ -161,6 +188,14 @@ case ${KDE_TEST} in ;; 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 @@ -236,7 +271,14 @@ _calculate_live_repo() { # 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 @@ -260,7 +302,7 @@ _calculate_live_repo() { _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 @@ -349,9 +391,10 @@ kde5_src_prepare() { # 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 @@ -375,9 +418,6 @@ kde5_src_configure() { 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)