diff options
author | Jonathan Callen <abcd@gentoo.org> | 2011-06-15 00:11:05 +0000 |
---|---|---|
committer | Jonathan Callen <abcd@gentoo.org> | 2011-06-15 00:11:05 +0000 |
commit | 7047410312df06ffb23a4c876241d8f80d83ad8e (patch) | |
tree | b0585bfff228ac6926b4bb4f9d5f91bc71d85a02 /eclass | |
parent | Simplify blockers a bit for new version of add_blocker function and SLOT changes (diff) | |
download | gentoo-2-7047410312df06ffb23a4c876241d8f80d83ad8e.tar.gz gentoo-2-7047410312df06ffb23a4c876241d8f80d83ad8e.tar.bz2 gentoo-2-7047410312df06ffb23a4c876241d8f80d83ad8e.zip |
Sync eclasses from overlay
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/kde4-base.eclass | 14 | ||||
-rw-r--r-- | eclass/kde4-functions.eclass | 153 | ||||
-rw-r--r-- | eclass/kde4-meta.eclass | 16 |
3 files changed, 76 insertions, 107 deletions
diff --git a/eclass/kde4-base.eclass b/eclass/kde4-base.eclass index ba8c75534b49..77a64adfb260 100644 --- a/eclass/kde4-base.eclass +++ b/eclass/kde4-base.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-base.eclass,v 1.98 2011/06/09 21:05:45 tampakrap Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-base.eclass,v 1.99 2011/06/15 00:11:05 abcd Exp $ # @ECLASS: kde4-base.eclass # @MAINTAINER: @@ -572,6 +572,9 @@ _calculate_live_repo() { kdeplasma-addons | kdepim | kdepim-runtime | kdepimlibs | okular) EGIT_BRANCH="$(get_kde_version)" ;; + kdeedu) + EGIT_BRANCH="$(get_kde_version)" + ;; marble) EGIT_BRANCH="kde-$(get_kde_version)" ;; @@ -580,7 +583,14 @@ _calculate_live_repo() { ;; esac - EGIT_REPO_URI="${EGIT_MIRROR}/${_kmname}" + # default repo uri + case ${_kmname} in + kdeedu) + EGIT_REPO_URI="${EGIT_MIRROR}/${PN}" + ;; + *) + EGIT_REPO_URI="${EGIT_MIRROR}/${_kmname}" + esac debug-print "${FUNCNAME}: Repository: ${EGIT_REPO_URI}" debug-print "${FUNCNAME}: Branch: ${EGIT_BRANCH}" diff --git a/eclass/kde4-functions.eclass b/eclass/kde4-functions.eclass index c37cbdbf400e..cb5caead3876 100644 --- a/eclass/kde4-functions.eclass +++ b/eclass/kde4-functions.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-functions.eclass,v 1.51 2011/06/07 20:11:04 abcd Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-functions.eclass,v 1.52 2011/06/15 00:11:05 abcd Exp $ inherit versionator @@ -120,26 +120,24 @@ buildsycoca() { # We no longer need to run kbuildsycoca4, as kded does that automatically, as needed # fix permission for some directories - for x in share/{config,kde4}; do - [[ ${KDEDIR} == /usr ]] && DIRS=${EROOT}usr || DIRS="${EROOT}usr ${EROOT}${KDEDIR}" - for y in ${DIRS}; do - [[ -d "${y}/${x}" ]] || break # nothing to do if directory does not exist - # fixes Bug 318237 - if use userland_BSD ; then - [[ $(stat -f %p "${y}/${x}") != 40755 ]] - local stat_rtn="$?" - else - [[ $(stat --format=%a "${y}/${x}") != 755 ]] - local stat_rtn=$? - fi - if [[ $stat_rtn != 1 ]] ; then - ewarn "QA Notice:" - ewarn "Package ${PN} is breaking ${y}/${x} permissions." - ewarn "Please report this issue to gentoo bugzilla." - einfo "Permissions will get adjusted automatically now." - find "${y}/${x}" -type d -print0 | xargs -0 chmod 755 - fi - done + for x in usr/share/{config,kde4}; do + DIRS=${EROOT}usr + [[ -d "${EROOT}${x}" ]] || break # nothing to do if directory does not exist + # fixes Bug 318237 + if use userland_BSD ; then + [[ $(stat -f %p "${EROOT}${x}") != 40755 ]] + local stat_rtn="$?" + else + [[ $(stat --format=%a "${EROOT}${x}") != 755 ]] + local stat_rtn=$? + fi + if [[ $stat_rtn != 1 ]] ; then + ewarn "QA Notice:" + ewarn "Package ${PN} is breaking ${EROOT}${x} permissions." + ewarn "Please report this issue to gentoo bugzilla." + einfo "Permissions will get adjusted automatically now." + find "${EROOT}${x}" -type d -print0 | xargs -0 chmod 755 + fi done } @@ -344,8 +342,15 @@ load_library_dependencies() { # Create blocks for the current package in other slots block_other_slots() { debug-print-function ${FUNCNAME} "$@" + local slot - _do_blocker ${PN} 0:${SLOT} + # Temporary HACK, remove this function after slotmove + # (moved from _do_blocker, as this only needs a very specialized listing) + for slot in "${KDE_SLOTS[@]}" "${KDE_LIVE_SLOTS[@]}"; do + if [[ ${slot} != ${SLOT} ]]; then + echo " !kde-base/${PN}:${slot}" + fi + done } # @FUNCTION: add_blocker @@ -354,26 +359,21 @@ block_other_slots() { # Useful for file-collision blocks. # Parameters are package and version(s) to block. # add_blocker kdelibs 4.2.4 -# If no version is specified, then all versions will be blocked -# If any arguments (from 2 on) contain a ":", then different versions -# are blocked in different slots. (Unlisted slots get the version without -# a ":", if none, then all versions are blocked). The parameter is then of -# the form VERSION:SLOT. Any VERSION of 0 means that no blocker will be -# added for that slot (or, if no slot, then for any unlisted slot). -# A parameter of the form :SLOT means to block all versions from that slot. -# If VERSION begins with "<", then "!<foo" will be used instead of "!<=foo". -# As a special case, if a parameter with slot "3.5" is passed, then that slot -# may also be blocked. +# If no version is specified, then all versions will be blocked. +# If the version is 0, then no versions will be blocked. +# If a second version ending in ":3.5" is passed, then the version listed for +# that slot will be blocked as well. +# +# Examples: +# # Block all versions of kdelibs +# add_blocker kdelibs # -# Versions that match "4.x.50" are equivalent to all slots up to (and including) -# "4.x", but nothing following slot "4.x" +# # Block all versions of kdelibs older than 4.3.50 +# add_blocker kdelibs 4.3.50 # -# As an example, if SLOT=live, then -# add_blocker kdelibs 0 :4.3 '<4.3.96:4.4' 9999:live -# will add the following to RDEPEND: -# !kde-base/kdelibs:4.3 -# !<kde-base/kdelibs-4.3.96:4.4 -# !<=kde-base/kdelibs-9999:live +# # Block kdelibs 3.5.10 and older, but not any version of +# # kdelibs from KDE 4 +# add_blocker kdelibs 0 3.5.10:3.5 add_blocker() { debug-print-function ${FUNCNAME} "$@" @@ -401,12 +401,6 @@ add_kdebase_dep() { ver=${KDE_OVERRIDE_MINIMAL} elif [[ ${KDEBASE} != kde-base ]]; then ver=${KDE_MINIMAL} - # FIXME remove hack when kdepim-4.4.* is gone - elif [[ ( ${KMNAME} == kdepim || ${PN} == kdepim-runtime ) && $(get_kde_version) == 4.4 && ${1} =~ ^(kde(pim)?libs|oxygen-icons)$ ]]; then - ver=4.4.5 - # FIXME remove hack when kdepim-4.6beta is gone - elif [[ ( ${KMNAME} == kdepim || ${PN} == kdepim-runtime ) && ${PV} == 4.5.98 && ${1} =~ ^(kde(pim)?libs|oxygen-icons)$ ]]; then - ver=4.5.90 # if building stable-live version depend just on slot # to allow merging packages against more stable basic stuff elif [[ ${PV} == *.9999 ]]; then @@ -417,13 +411,7 @@ add_kdebase_dep() { [[ -z ${1} ]] && die "Missing parameter" - local use=${2:+,${2}} - - if [[ ${ver} == live ]]; then - echo " kde-base/${1}:live[aqua=${use}]" - else - echo " >=kde-base/${1}-${ver}[aqua=${use}]" - fi + echo " >=kde-base/${1}-${ver}[aqua=${2:+,${2}}]" } # _greater_max_in_slot ver slot @@ -472,53 +460,24 @@ _do_blocker() { pkg=${pkg%\[*\]} fi - local param slot def="unset" var atom - # The following variables will hold parameters that contain ":" - # - block_3_5 - # - block_4_1 - # - block_4_2 - # - block_4_3 - # - block_4_4 - # - block_live - for slot in 3.5 ${KDE_SLOTS[@]} ${KDE_LIVE_SLOTS[@]}; do - local block_${slot//./_}="unset" - done - - # This construct goes through each parameter passed, and sets - # either def or block_* to the version passed - for param; do - # If the parameter does not have a ":" in it... - if [[ ${param/:} == ${param} ]]; then - def=${param} - else # the parameter *does* have a ":" in it - # so everything after the : is the slot... - slot=${param#*:} - # ...and everything before the : is the version - local block_${slot//./_}=${param%:*} - fi - done + local slot ver="$1" atom old_ver="unset" + [[ "$2" == *:3.5 ]] && old_ver=${2::-4} for slot in ${KDE_SLOTS[@]} ${KDE_LIVE_SLOTS[@]}; do - # ${var} contains the name of the variable we care about for this slot - # ${!var} is it's value - var=block_${slot//./_} - # if we didn't pass *:${slot}, then use the unsloted value - [[ ${!var} == "unset" ]] && var=def - # If no version was passed, or the version is greater than the maximum # possible version in this slot, block all versions in this slot - if [[ ${!var} == "unset" ]] || [[ -z ${!var} ]] || _greater_max_in_slot ${!var#<} ${slot}; then + if [[ ${ver} == "unset" ]] || [[ -z ${ver} ]] || _greater_max_in_slot ${ver#<} ${slot}; then atom=${pkg} # If the version is "0" or less than the minimum possible version in # this slot, do nothing - elif [[ ${!var} == "0" ]] || _less_min_in_slot ${!var#<} ${slot}; then + elif [[ ${ver} == "0" ]] || _less_min_in_slot ${ver#<} ${slot}; then continue # If the version passed begins with a "<", then use "<" instead of "<=" - elif [[ ${!var:0:1} == "<" ]]; then + elif [[ ${ver::1} == "<" ]]; then # this also removes the first character of the version, which is a "<" - atom="<${pkg}-${!var:1}" + atom="<${pkg}-${ver:1}" else - atom="<=${pkg}-${!var}" + atom="<=${pkg}-${ver}" fi echo " !${atom}:${slot}${use:+[${use}]}" done @@ -527,13 +486,13 @@ _do_blocker() { # default version passed, and no blocker is output *unless* a version # is passed, or ":3.5" is passed to explicitly request a block on all # 3.5 versions. - if [[ ${block_3_5} != "unset" && ${block_3_5} != "0" ]]; then - if [[ -z ${block_3_5} ]]; then + if [[ ${old_ver} != "unset" && ${old_ver} != "0" ]]; then + if [[ -z ${old_ver} ]]; then atom=${pkg} - elif [[ ${block_3_5:0:1} == "<" ]]; then - atom="<${pkg}-${block_3_5:1}" + elif [[ ${old_ver::1} == "<" ]]; then + atom="<${pkg}-${old_ver:1}" else - atom="<=${pkg}-${block_3_5}" + atom="<=${pkg}-${old_ver}" fi echo " !${atom}:3.5${use:+[${use}]}" fi @@ -597,9 +556,9 @@ get_kde_version() { local major=$(get_major_version ${ver}) local minor=$(get_version_component_range 2 ${ver}) local micro=$(get_version_component_range 3 ${ver}) - [[ ${ver} == 9999 ]] && echo live - (( major == 4 && micro == 9999 )) && echo ${major}.${minor} - if (( major == 4 && micro != 9999 )); then + if [[ ${ver} == 9999 ]]; then + echo live + else (( micro < 50 )) && echo ${major}.${minor} || echo ${major}.$((minor + 1)) fi } diff --git a/eclass/kde4-meta.eclass b/eclass/kde4-meta.eclass index 81503a0dc966..15498473f7ec 100644 --- a/eclass/kde4-meta.eclass +++ b/eclass/kde4-meta.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-meta.eclass,v 1.54 2011/06/07 20:11:04 abcd Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-meta.eclass,v 1.55 2011/06/15 00:11:05 abcd Exp $ # # @ECLASS: kde4-meta.eclass # @MAINTAINER: @@ -180,29 +180,29 @@ kde4-meta_src_extract() { case ${KDE_SCM} in svn) - local rsync_options subdir kmnamedir targetdir wc_path escm + local rsync_options subdir targetdir wc_path escm rsync_options="--group --links --owner --perms --quiet --exclude=.svn/ --exclude=.git/" wc_path="${ESVN_WC_PATH}" escm="{ESVN}" # Copy ${KMNAME} non-recursively (toplevel files) - rsync ${rsync_options} "${wc_path}"/${kmnamedir}* "${S}" \ + rsync ${rsync_options} "${wc_path}"/* "${S}" \ || die "${escm}: can't export toplevel files to '${S}'." # Copy cmake directory - if [[ -d "${wc_path}/${kmnamedir}cmake" ]]; then - rsync --recursive ${rsync_options} "${wc_path}/${kmnamedir}cmake" "${S}" \ + if [[ -d "${wc_path}/cmake" ]]; then + rsync --recursive ${rsync_options} "${wc_path}/cmake" "${S}" \ || die "${escm}: can't export cmake files to '${S}'." fi # Copy all subdirectories for subdir in $(__list_needed_subdirectories); do targetdir="" - if [[ $subdir = doc/* && ! -e "$wc_path/$kmnamedir$subdir" ]]; then + if [[ $subdir = doc/* && ! -e "$wc_path/$subdir" ]]; then continue fi [[ ${subdir%/} = */* ]] && targetdir=${subdir%/} && targetdir=${targetdir%/*} && mkdir -p "${S}/${targetdir}" - rsync --recursive ${rsync_options} "${wc_path}/${kmnamedir}${subdir%/}" "${S}/${targetdir}" \ + rsync --recursive ${rsync_options} "${wc_path}/${subdir%/}" "${S}/${targetdir}" \ || die "${escm}: can't export subdirectory '${subdir}' to '${S}/${targetdir}'." done ;; @@ -305,7 +305,7 @@ kde4-meta_create_extractlists() { # Note that this actually doesn't include KMEXTRA handling. # In those cases you should care to add the relevant files to KMEXTRACTONLY case ${KMNAME} in - kdebase | kdebase-apps | kde-base-apps) + kdebase | kdebase-apps | kde-baseapps) KMEXTRACTONLY+=" config-apps.h.cmake ConfigureChecks.cmake" |