diff options
| author | Tomas Chvatal <scarabeus@gentoo.org> | 2011-04-02 08:50:02 +0200 |
|---|---|---|
| committer | Tomas Chvatal <scarabeus@gentoo.org> | 2011-04-02 16:31:43 +0200 |
| commit | 4994ef4c437eb2ade6cda33e934d82efad90bcba (patch) | |
| tree | e328c88f7b07be303a2d39a6f649baa4b956dbf7 | |
| parent | bfdb4fac1f571f4941876562d15b2f418537a496 (diff) | |
| download | kde-4994ef4c437eb2ade6cda33e934d82efad90bcba.tar.gz kde-4994ef4c437eb2ade6cda33e934d82efad90bcba.tar.bz2 kde-4994ef4c437eb2ade6cda33e934d82efad90bcba.zip | |
[kde4-*] fix some quoting, move to old git eclass so we can move this to main tree
| -rw-r--r-- | eclass/kde4-base.eclass | 12 | ||||
| -rw-r--r-- | eclass/kde4-functions.eclass | 28 | ||||
| -rw-r--r-- | eclass/kde4-meta.eclass | 25 |
3 files changed, 33 insertions, 32 deletions
diff --git a/eclass/kde4-base.eclass b/eclass/kde4-base.eclass index 77db5ad1d9b..68f3ddf4c2d 100644 --- a/eclass/kde4-base.eclass +++ b/eclass/kde4-base.eclass @@ -25,7 +25,7 @@ inherit kde4-functions fdo-mime gnome2-utils base virtualx versionator eutils if [[ ${BUILD_TYPE} = live ]]; then case ${KDE_SCM} in svn) inherit subversion ;; - git) inherit git-2 ;; + git) inherit git ;; esac fi @@ -717,7 +717,7 @@ kde4-base_src_unpack() { subversion_src_unpack ;; git) - git-2_src_unpack + git_src_unpack ;; esac else @@ -909,7 +909,7 @@ kde4-base_src_test() { if [[ ${VIRTUALX_REQUIRED} == always || ${VIRTUALX_REQUIRED} == test ]]; then # check for sanity if anyone already redefined VIRTUALX_COMMAND from the default - if [[ ${VIRTUALX_COMMAND} != "emake" ]]; then + if [[ ${VIRTUALX_COMMAND} != emake ]]; then # surprise- we are already INSIDE virtualmake!!! debug-print "QA Notice: This version of kde4-base.eclass includes the virtualx functionality." debug-print " You may NOT set VIRTUALX_COMMAND or call virtualmake from the ebuild." @@ -938,10 +938,10 @@ kde4-base_src_install() { local doc if ! has kde4-meta ${INHERITED}; then for doc in "${S}"/{AUTHORS,CHANGELOG,ChangeLog*,README*,NEWS,TODO,HACKING}; do - [[ -f "${doc}" ]] && [[ -s "${doc}" ]] && dodoc "${doc}" + [[ -f ${doc} && -s ${doc} ]] && dodoc "${doc}" done for doc in "${S}"/*/{AUTHORS,CHANGELOG,ChangeLog*,README*,NEWS,TODO,HACKING}; do - [[ -f "${doc}" ]] && [[ -s "${doc}" ]] && newdoc "${doc}" "$(basename $(dirname ${doc})).$(basename ${doc})" + [[ -f ${doc} && -s ${doc} ]] && newdoc "${doc}" "$(basename $(dirname ${doc})).$(basename ${doc})" done fi @@ -995,7 +995,7 @@ kde4-base_pkg_postinst() { echo fi # for all 3rd party soft tell user that he SHOULD install kdebase-startkde or kdebase-runtime-meta - if [[ ${KDEBASE} != "kde-base" ]] && \ + if [[ ${KDEBASE} != kde-base ]] && \ ! has_version 'kde-base/kdebase-runtime-meta' && \ ! has_version 'kde-base/kdebase-startkde'; then if [[ ${KDE_REQUIRED} == always ]] || ( [[ ${KDE_REQUIRED} == optional ]] && use kde ); then diff --git a/eclass/kde4-functions.eclass b/eclass/kde4-functions.eclass index b5b6c5cd0e7..6dfe6a00250 100644 --- a/eclass/kde4-functions.eclass +++ b/eclass/kde4-functions.eclass @@ -181,7 +181,7 @@ enable_selected_linguas() { # Default value is set to "po". if [[ "$(declare -p KDE_LINGUAS_DIR 2>/dev/null 2>&1)" == "declare -a"* ]]; then debug-print "$FUNCNAME: we have these subfolders defined: ${KDE_LINGUAS_DIR}" - for x in "${KDE_LINGUAS_DIR[@]}"; do + for x in ${KDE_LINGUAS_DIR[@]}; do _enable_selected_linguas_dir ${x} done else @@ -212,8 +212,8 @@ enable_selected_doc_linguas() { local handbookdir=`dirname ${pattern}` local translationdir=`basename ${pattern}` # Do filename pattern supplied, treat as directory - [[ "${handbookdir}" = '.' ]] && handbookdir=${translationdir} && translationdir= - [[ -d "${handbookdir}" ]] || die 'wrong doc dir specified' + [[ ${handbookdir} = '.' ]] && handbookdir=${translationdir} && translationdir= + [[ -d ${handbookdir} ]] || die 'wrong doc dir specified' if ! use handbook; then # Disable whole directory @@ -226,8 +226,8 @@ enable_selected_doc_linguas() { # Add requested translations local lingua for lingua in en ${KDE_LINGUAS}; do - if [[ ${lingua} = 'en' ]] || use linguas_${lingua}; then - if [[ -d "${handbookdir}/${translationdir//%lingua/${lingua}}" ]]; then + if [[ ${lingua} = en ]] || use linguas_${lingua}; then + if [[ -d ${handbookdir}/${translationdir//%lingua/${lingua}} ]]; then sed -e "/add_subdirectory[[:space:]]*([[:space:]]*${translationdir//%lingua/${lingua}}/s/^#DONOTCOMPILE //" \ -e "/ADD_SUBDIRECTORY[[:space:]]*([[:space:]]*${translationdir//%lingua/${lingua}}/s/^#DONOTCOMPILE //" \ -i "${handbookdir}"/CMakeLists.txt && ! has ${lingua} ${linguas} && linguas="${linguas} ${lingua}" @@ -252,7 +252,7 @@ migrate_store_dir() { local cleandir="${ESVN_STORE_DIR}/KDE" - if [[ -d "${cleandir}" ]]; then + if [[ -d ${cleandir} ]]; then ewarn "'${cleandir}' has been found. Moving contents to new location." addwrite "${ESVN_STORE_DIR}" # Split kdebase @@ -331,7 +331,7 @@ load_library_dependencies() { for pn in ${KMLOADLIBS} ; do ((i++)) depsfile="${EPREFIX}/var/lib/kde/${pn}:${SLOT}" - [[ -r "${depsfile}" ]] || die "Depsfile '${depsfile}' not accessible. You probably need to reinstall ${pn}." + [[ -r ${depsfile} ]] || die "Depsfile '${depsfile}' not accessible. You probably need to reinstall ${pn}." sed -i -e "${i}iINCLUDE(\"${depsfile}\")" "${S}/CMakeLists.txt" || \ die "Failed to include library dependencies for ${pn}" done @@ -554,7 +554,7 @@ _enable_selected_linguas_dir() { local lingua linguas sr_mess wp local dir=${1} - [[ -d "${dir}" ]] || die "linguas dir \"${dir}\" does not exist" + [[ -d ${dir} ]] || die "linguas dir \"${dir}\" does not exist" comment_all_add_subdirectory "${dir}" pushd "${dir}" > /dev/null @@ -563,8 +563,8 @@ _enable_selected_linguas_dir() { # fail at any point sr_mess="sr@latn sr@latin sr@Latin" for wp in ${sr_mess}; do - [[ -e "${wp}.po" ]] && mv "${wp}.po" "sr@Latn.po" - if [[ -d "${wp}" ]]; then + [[ -e ${wp}.po ]] && mv "${wp}.po" "sr@Latn.po" + if [[ -d ${wp} ]]; then # move dir and fix cmakelists mv "${wp}" "sr@Latn" sed -i \ @@ -574,26 +574,26 @@ _enable_selected_linguas_dir() { done for lingua in ${KDE_LINGUAS}; do - if [[ -e "${lingua}.po" ]]; then + if [[ -e ${lingua}.po ]]; then mv "${lingua}.po" "${lingua}.po.old" fi done for lingua in ${KDE_LINGUAS}; do if use linguas_${lingua} ; then - if [[ -d "${lingua}" ]]; then + if [[ -d ${lingua} ]]; then linguas="${linguas} ${lingua}" sed -e "/add_subdirectory([[:space:]]*${lingua}[[:space:]]*)[[:space:]]*$/ s/^#DONOTCOMPILE //" \ -e "/ADD_SUBDIRECTORY([[:space:]]*${lingua}[[:space:]]*)[[:space:]]*$/ s/^#DONOTCOMPILE //" \ -i CMakeLists.txt || die "Sed to uncomment linguas_${lingua} failed." fi - if [[ -e "${lingua}.po.old" ]]; then + if [[ -e ${lingua}.po.old ]]; then linguas="${linguas} ${lingua}" mv "${lingua}.po.old" "${lingua}.po" fi fi done - [[ -n "${linguas}" ]] && echo ">>> Enabling languages: ${linguas}" + [[ -n ${linguas} ]] && echo ">>> Enabling languages: ${linguas}" popd > /dev/null } diff --git a/eclass/kde4-meta.eclass b/eclass/kde4-meta.eclass index 74b3bbcbc38..7601115a25b 100644 --- a/eclass/kde4-meta.eclass +++ b/eclass/kde4-meta.eclass @@ -78,7 +78,7 @@ debug-print "line ${LINENO} ${ECLASS}: RDEPEND ${RDEPEND} - after metapackage-sp # Useful to build kde4-meta style stuff from extragear/playground (plasmoids etc) case ${BUILD_TYPE} in live) - if [[ "${KDE_SCM}" == "svn" ]]; then + if [[ ${KDE_SCM} == svn ]]; then case ${KMNAME} in extragear*|playground*) ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}" @@ -162,8 +162,8 @@ kde4-meta_pkg_setup() { # @FUNCTION: kde4-meta_src_unpack # @DESCRIPTION: -# This function unpacks the source for split ebuilds. See also -# kde4-meta-src_extract. +# This function unpacks the source for split ebuilds. +# Further more is processed in kde4-meta_src_extract kde4-meta_src_unpack() { debug-print-function ${FUNCNAME} "$@" @@ -178,18 +178,16 @@ kde4-meta_src_unpack() { subversion_bootstrap ;; git) - git-2_src_unpack + git_src_unpack ;; esac fi kde4-meta_src_extract } -# FIXME: the difference between kde4-meta_src_extract and kde4-meta_src_unpack? - # @FUNCTION: kde4-meta_src_extract # @DESCRIPTION: -# A function to unpack the source for a split KDE ebuild. +# A function to extract the source for a split KDE ebuild. # Also see KMMODULE, KMNOMODULE, KMEXTRA, KMCOMPILEONLY, KMEXTRACTONLY and # KMTARPARAMS. kde4-meta_src_extract() { @@ -200,7 +198,7 @@ kde4-meta_src_extract() { einfo "Exporting parts of working copy to ${S}" kde4-meta_create_extractlists - case "${KDE_SCM}" in + case ${KDE_SCM} in svn) local rsync_options subdir kmnamedir targetdir wc_path escm @@ -294,7 +292,7 @@ kde4-meta_src_extract() { if [[ -n ${KDE4_STRICTER} ]]; then for f in $(__list_needed_subdirectories fatal); do - if [[ ! -e "${S}/${f#*/}" ]]; then + if [[ ! -e ${S}/${f#*/} ]]; then eerror "'${f#*/}' is missing" abort=true fi @@ -325,7 +323,7 @@ kde4-meta_create_extractlists() { fi # Add default handbook locations - if [[ -z ${KMNOMODULE} ]] && { [[ ${KDE_HANDBOOK} = always ]] || { [[ ${KDE_HANDBOOK} = optional ]] && use handbook; }; }; then + if [[ -z ${KMNOMODULE} && ( [[ ${KDE_HANDBOOK} = always ]] || ( [[ ${KDE_HANDBOOK} = optional ]] && use handbook; ) ) then KMEXTRA_NONFATAL+=" doc/${KMMODULE##*/}" fi @@ -491,13 +489,16 @@ kde4-meta_src_prepare() { kde4-base_src_prepare } -# FIXME: no comment here? +# @FUNCTION: _change_cmakelists_parent_dirs +# @DESCRIPTION: +# Adjust CMakeLists.txt to shadow subdirectories +# that are not required for the build. _change_cmakelists_parent_dirs() { debug-print-function ${FUNCNAME} "$@" local _olddir _dir _dir="${S}"/${1} - until [[ ${_dir} == "${S}" ]]; do + until [[ ${_dir} == ${S} ]]; do _olddir=$(basename "${_dir}") _dir=$(dirname "${_dir}") debug-print "${LINENO}: processing ${_dir} CMakeLists.txt searching for ${_olddir}" |
