Gentoo Archives: gentoo-commits

From: Tomas Chvatal <scarabeus@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/kde:master commit in: eclass/
Date: Sat, 02 Apr 2011 14:33:05
Message-Id: 4994ef4c437eb2ade6cda33e934d82efad90bcba.scarabeus@gentoo
1 commit: 4994ef4c437eb2ade6cda33e934d82efad90bcba
2 Author: Tomas Chvatal <scarabeus <AT> gentoo <DOT> org>
3 AuthorDate: Sat Apr 2 06:50:02 2011 +0000
4 Commit: Tomas Chvatal <scarabeus <AT> gentoo <DOT> org>
5 CommitDate: Sat Apr 2 14:31:43 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/kde.git;a=commit;h=4994ef4c
7
8 [kde4-*] fix some quoting, move to old git eclass so we can move this to main tree
9
10 ---
11 eclass/kde4-base.eclass | 12 ++++++------
12 eclass/kde4-functions.eclass | 28 ++++++++++++++--------------
13 eclass/kde4-meta.eclass | 25 +++++++++++++------------
14 3 files changed, 33 insertions(+), 32 deletions(-)
15
16 diff --git a/eclass/kde4-base.eclass b/eclass/kde4-base.eclass
17 index 77db5ad..68f3ddf 100644
18 --- a/eclass/kde4-base.eclass
19 +++ b/eclass/kde4-base.eclass
20 @@ -25,7 +25,7 @@ inherit kde4-functions fdo-mime gnome2-utils base virtualx versionator eutils
21 if [[ ${BUILD_TYPE} = live ]]; then
22 case ${KDE_SCM} in
23 svn) inherit subversion ;;
24 - git) inherit git-2 ;;
25 + git) inherit git ;;
26 esac
27 fi
28
29 @@ -717,7 +717,7 @@ kde4-base_src_unpack() {
30 subversion_src_unpack
31 ;;
32 git)
33 - git-2_src_unpack
34 + git_src_unpack
35 ;;
36 esac
37 else
38 @@ -909,7 +909,7 @@ kde4-base_src_test() {
39
40 if [[ ${VIRTUALX_REQUIRED} == always || ${VIRTUALX_REQUIRED} == test ]]; then
41 # check for sanity if anyone already redefined VIRTUALX_COMMAND from the default
42 - if [[ ${VIRTUALX_COMMAND} != "emake" ]]; then
43 + if [[ ${VIRTUALX_COMMAND} != emake ]]; then
44 # surprise- we are already INSIDE virtualmake!!!
45 debug-print "QA Notice: This version of kde4-base.eclass includes the virtualx functionality."
46 debug-print " You may NOT set VIRTUALX_COMMAND or call virtualmake from the ebuild."
47 @@ -938,10 +938,10 @@ kde4-base_src_install() {
48 local doc
49 if ! has kde4-meta ${INHERITED}; then
50 for doc in "${S}"/{AUTHORS,CHANGELOG,ChangeLog*,README*,NEWS,TODO,HACKING}; do
51 - [[ -f "${doc}" ]] && [[ -s "${doc}" ]] && dodoc "${doc}"
52 + [[ -f ${doc} && -s ${doc} ]] && dodoc "${doc}"
53 done
54 for doc in "${S}"/*/{AUTHORS,CHANGELOG,ChangeLog*,README*,NEWS,TODO,HACKING}; do
55 - [[ -f "${doc}" ]] && [[ -s "${doc}" ]] && newdoc "${doc}" "$(basename $(dirname ${doc})).$(basename ${doc})"
56 + [[ -f ${doc} && -s ${doc} ]] && newdoc "${doc}" "$(basename $(dirname ${doc})).$(basename ${doc})"
57 done
58 fi
59
60 @@ -995,7 +995,7 @@ kde4-base_pkg_postinst() {
61 echo
62 fi
63 # for all 3rd party soft tell user that he SHOULD install kdebase-startkde or kdebase-runtime-meta
64 - if [[ ${KDEBASE} != "kde-base" ]] && \
65 + if [[ ${KDEBASE} != kde-base ]] && \
66 ! has_version 'kde-base/kdebase-runtime-meta' && \
67 ! has_version 'kde-base/kdebase-startkde'; then
68 if [[ ${KDE_REQUIRED} == always ]] || ( [[ ${KDE_REQUIRED} == optional ]] && use kde ); then
69
70 diff --git a/eclass/kde4-functions.eclass b/eclass/kde4-functions.eclass
71 index b5b6c5c..6dfe6a0 100644
72 --- a/eclass/kde4-functions.eclass
73 +++ b/eclass/kde4-functions.eclass
74 @@ -181,7 +181,7 @@ enable_selected_linguas() {
75 # Default value is set to "po".
76 if [[ "$(declare -p KDE_LINGUAS_DIR 2>/dev/null 2>&1)" == "declare -a"* ]]; then
77 debug-print "$FUNCNAME: we have these subfolders defined: ${KDE_LINGUAS_DIR}"
78 - for x in "${KDE_LINGUAS_DIR[@]}"; do
79 + for x in ${KDE_LINGUAS_DIR[@]}; do
80 _enable_selected_linguas_dir ${x}
81 done
82 else
83 @@ -212,8 +212,8 @@ enable_selected_doc_linguas() {
84 local handbookdir=`dirname ${pattern}`
85 local translationdir=`basename ${pattern}`
86 # Do filename pattern supplied, treat as directory
87 - [[ "${handbookdir}" = '.' ]] && handbookdir=${translationdir} && translationdir=
88 - [[ -d "${handbookdir}" ]] || die 'wrong doc dir specified'
89 + [[ ${handbookdir} = '.' ]] && handbookdir=${translationdir} && translationdir=
90 + [[ -d ${handbookdir} ]] || die 'wrong doc dir specified'
91
92 if ! use handbook; then
93 # Disable whole directory
94 @@ -226,8 +226,8 @@ enable_selected_doc_linguas() {
95 # Add requested translations
96 local lingua
97 for lingua in en ${KDE_LINGUAS}; do
98 - if [[ ${lingua} = 'en' ]] || use linguas_${lingua}; then
99 - if [[ -d "${handbookdir}/${translationdir//%lingua/${lingua}}" ]]; then
100 + if [[ ${lingua} = en ]] || use linguas_${lingua}; then
101 + if [[ -d ${handbookdir}/${translationdir//%lingua/${lingua}} ]]; then
102 sed -e "/add_subdirectory[[:space:]]*([[:space:]]*${translationdir//%lingua/${lingua}}/s/^#DONOTCOMPILE //" \
103 -e "/ADD_SUBDIRECTORY[[:space:]]*([[:space:]]*${translationdir//%lingua/${lingua}}/s/^#DONOTCOMPILE //" \
104 -i "${handbookdir}"/CMakeLists.txt && ! has ${lingua} ${linguas} && linguas="${linguas} ${lingua}"
105 @@ -252,7 +252,7 @@ migrate_store_dir() {
106
107 local cleandir="${ESVN_STORE_DIR}/KDE"
108
109 - if [[ -d "${cleandir}" ]]; then
110 + if [[ -d ${cleandir} ]]; then
111 ewarn "'${cleandir}' has been found. Moving contents to new location."
112 addwrite "${ESVN_STORE_DIR}"
113 # Split kdebase
114 @@ -331,7 +331,7 @@ load_library_dependencies() {
115 for pn in ${KMLOADLIBS} ; do
116 ((i++))
117 depsfile="${EPREFIX}/var/lib/kde/${pn}:${SLOT}"
118 - [[ -r "${depsfile}" ]] || die "Depsfile '${depsfile}' not accessible. You probably need to reinstall ${pn}."
119 + [[ -r ${depsfile} ]] || die "Depsfile '${depsfile}' not accessible. You probably need to reinstall ${pn}."
120 sed -i -e "${i}iINCLUDE(\"${depsfile}\")" "${S}/CMakeLists.txt" || \
121 die "Failed to include library dependencies for ${pn}"
122 done
123 @@ -554,7 +554,7 @@ _enable_selected_linguas_dir() {
124 local lingua linguas sr_mess wp
125 local dir=${1}
126
127 - [[ -d "${dir}" ]] || die "linguas dir \"${dir}\" does not exist"
128 + [[ -d ${dir} ]] || die "linguas dir \"${dir}\" does not exist"
129 comment_all_add_subdirectory "${dir}"
130 pushd "${dir}" > /dev/null
131
132 @@ -563,8 +563,8 @@ _enable_selected_linguas_dir() {
133 # fail at any point
134 sr_mess="sr@latn sr@latin sr@Latin"
135 for wp in ${sr_mess}; do
136 - [[ -e "${wp}.po" ]] && mv "${wp}.po" "sr@××××.po"
137 - if [[ -d "${wp}" ]]; then
138 + [[ -e ${wp}.po ]] && mv "${wp}.po" "sr@××××.po"
139 + if [[ -d ${wp} ]]; then
140 # move dir and fix cmakelists
141 mv "${wp}" "sr@Latn"
142 sed -i \
143 @@ -574,26 +574,26 @@ _enable_selected_linguas_dir() {
144 done
145
146 for lingua in ${KDE_LINGUAS}; do
147 - if [[ -e "${lingua}.po" ]]; then
148 + if [[ -e ${lingua}.po ]]; then
149 mv "${lingua}.po" "${lingua}.po.old"
150 fi
151 done
152
153 for lingua in ${KDE_LINGUAS}; do
154 if use linguas_${lingua} ; then
155 - if [[ -d "${lingua}" ]]; then
156 + if [[ -d ${lingua} ]]; then
157 linguas="${linguas} ${lingua}"
158 sed -e "/add_subdirectory([[:space:]]*${lingua}[[:space:]]*)[[:space:]]*$/ s/^#DONOTCOMPILE //" \
159 -e "/ADD_SUBDIRECTORY([[:space:]]*${lingua}[[:space:]]*)[[:space:]]*$/ s/^#DONOTCOMPILE //" \
160 -i CMakeLists.txt || die "Sed to uncomment linguas_${lingua} failed."
161 fi
162 - if [[ -e "${lingua}.po.old" ]]; then
163 + if [[ -e ${lingua}.po.old ]]; then
164 linguas="${linguas} ${lingua}"
165 mv "${lingua}.po.old" "${lingua}.po"
166 fi
167 fi
168 done
169 - [[ -n "${linguas}" ]] && echo ">>> Enabling languages: ${linguas}"
170 + [[ -n ${linguas} ]] && echo ">>> Enabling languages: ${linguas}"
171
172 popd > /dev/null
173 }
174
175 diff --git a/eclass/kde4-meta.eclass b/eclass/kde4-meta.eclass
176 index 74b3bbc..7601115 100644
177 --- a/eclass/kde4-meta.eclass
178 +++ b/eclass/kde4-meta.eclass
179 @@ -78,7 +78,7 @@ debug-print "line ${LINENO} ${ECLASS}: RDEPEND ${RDEPEND} - after metapackage-sp
180 # Useful to build kde4-meta style stuff from extragear/playground (plasmoids etc)
181 case ${BUILD_TYPE} in
182 live)
183 - if [[ "${KDE_SCM}" == "svn" ]]; then
184 + if [[ ${KDE_SCM} == svn ]]; then
185 case ${KMNAME} in
186 extragear*|playground*)
187 ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}"
188 @@ -162,8 +162,8 @@ kde4-meta_pkg_setup() {
189
190 # @FUNCTION: kde4-meta_src_unpack
191 # @DESCRIPTION:
192 -# This function unpacks the source for split ebuilds. See also
193 -# kde4-meta-src_extract.
194 +# This function unpacks the source for split ebuilds.
195 +# Further more is processed in kde4-meta_src_extract
196 kde4-meta_src_unpack() {
197 debug-print-function ${FUNCNAME} "$@"
198
199 @@ -178,18 +178,16 @@ kde4-meta_src_unpack() {
200 subversion_bootstrap
201 ;;
202 git)
203 - git-2_src_unpack
204 + git_src_unpack
205 ;;
206 esac
207 fi
208 kde4-meta_src_extract
209 }
210
211 -# FIXME: the difference between kde4-meta_src_extract and kde4-meta_src_unpack?
212 -
213 # @FUNCTION: kde4-meta_src_extract
214 # @DESCRIPTION:
215 -# A function to unpack the source for a split KDE ebuild.
216 +# A function to extract the source for a split KDE ebuild.
217 # Also see KMMODULE, KMNOMODULE, KMEXTRA, KMCOMPILEONLY, KMEXTRACTONLY and
218 # KMTARPARAMS.
219 kde4-meta_src_extract() {
220 @@ -200,7 +198,7 @@ kde4-meta_src_extract() {
221 einfo "Exporting parts of working copy to ${S}"
222 kde4-meta_create_extractlists
223
224 - case "${KDE_SCM}" in
225 + case ${KDE_SCM} in
226 svn)
227 local rsync_options subdir kmnamedir targetdir wc_path escm
228
229 @@ -294,7 +292,7 @@ kde4-meta_src_extract() {
230
231 if [[ -n ${KDE4_STRICTER} ]]; then
232 for f in $(__list_needed_subdirectories fatal); do
233 - if [[ ! -e "${S}/${f#*/}" ]]; then
234 + if [[ ! -e ${S}/${f#*/} ]]; then
235 eerror "'${f#*/}' is missing"
236 abort=true
237 fi
238 @@ -325,7 +323,7 @@ kde4-meta_create_extractlists() {
239 fi
240
241 # Add default handbook locations
242 - if [[ -z ${KMNOMODULE} ]] && { [[ ${KDE_HANDBOOK} = always ]] || { [[ ${KDE_HANDBOOK} = optional ]] && use handbook; }; }; then
243 + if [[ -z ${KMNOMODULE} && ( [[ ${KDE_HANDBOOK} = always ]] || ( [[ ${KDE_HANDBOOK} = optional ]] && use handbook; ) ) then
244 KMEXTRA_NONFATAL+=" doc/${KMMODULE##*/}"
245 fi
246
247 @@ -491,13 +489,16 @@ kde4-meta_src_prepare() {
248 kde4-base_src_prepare
249 }
250
251 -# FIXME: no comment here?
252 +# @FUNCTION: _change_cmakelists_parent_dirs
253 +# @DESCRIPTION:
254 +# Adjust CMakeLists.txt to shadow subdirectories
255 +# that are not required for the build.
256 _change_cmakelists_parent_dirs() {
257 debug-print-function ${FUNCNAME} "$@"
258
259 local _olddir _dir
260 _dir="${S}"/${1}
261 - until [[ ${_dir} == "${S}" ]]; do
262 + until [[ ${_dir} == ${S} ]]; do
263 _olddir=$(basename "${_dir}")
264 _dir=$(dirname "${_dir}")
265 debug-print "${LINENO}: processing ${_dir} CMakeLists.txt searching for ${_olddir}"