/[gentoo-x86]/eclass/kde4-functions.eclass
Gentoo

Contents of /eclass/kde4-functions.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.65 - (hide annotations) (download)
Wed Jul 3 09:22:39 2013 UTC (9 months, 2 weeks ago) by kensington
Branch: MAIN
Changes since 1.64: +10 -3 lines
Deprecate EAPI 3.

1 alexxy 1.63 # Copyright 1999-2013 Gentoo Foundation
2 ingmar 1.1 # Distributed under the terms of the GNU General Public License v2
3 kensington 1.65 # $Header: /var/cvsroot/gentoo-x86/eclass/kde4-functions.eclass,v 1.64 2013/04/07 17:33:18 kensington Exp $
4 ingmar 1.1
5 alexxy 1.25 inherit versionator
6    
7 ingmar 1.1 # @ECLASS: kde4-functions.eclass
8     # @MAINTAINER:
9     # kde@gentoo.org
10 scarabeus 1.10 # @BLURB: Common ebuild functions for KDE 4 packages
11 ingmar 1.1 # @DESCRIPTION:
12     # This eclass contains all functions shared by the different eclasses,
13 scarabeus 1.10 # for KDE 4 ebuilds.
14    
15 kensington 1.64 if [[ ${___ECLASS_ONCE_KDE4_FUNCTIONS} != "recur -_+^+_- spank" ]] ; then
16     ___ECLASS_ONCE_KDE4_FUNCTIONS="recur -_+^+_- spank"
17    
18 scarabeus 1.10 # @ECLASS-VARIABLE: EAPI
19     # @DESCRIPTION:
20 kensington 1.65 # Currently kde4 eclasses support EAPI 4 and 5.
21 scarabeus 1.14 case ${EAPI:-0} in
22 kensington 1.65 3)
23     eqawarn "${CATEGORY}/${PF}: EAPI 3 support is now deprecated."
24     eqawarn "If you are the package maintainer, please"
25     eqawarn "update this package to a newer EAPI."
26     eqawarn "Support for EAPI 3 for kde-*.eclass will be dropped"
27     eqawarn "at the beginning August."
28     ;;
29     4|5) : ;;
30 reavertm 1.32 *) die "EAPI=${EAPI} is not supported" ;;
31 scarabeus 1.10 esac
32 ingmar 1.1
33 scarabeus 1.45 # @ECLASS-VARIABLE: KDE_OVERRIDE_MINIMAL
34     # @DESCRIPTION:
35     # For use only in very few well-defined cases; normally it should be unset.
36     # If this variable is set, all calls to add_kdebase_dep return a dependency on
37     # at least this version, independent of the version of the package itself.
38     # If you know exactly that one specific NEW KDE component builds and runs fine
39     # with all the rest of KDE at an OLDER version, you can set this old version here.
40     # Warning- may lead to general instability and kill your pet targh.
41    
42 ingmar 1.1 # @ECLASS-VARIABLE: KDEBASE
43     # @DESCRIPTION:
44     # This gets set to a non-zero value when a package is considered a kde or
45 johu 1.61 # kdevelop ebuild.
46 scarabeus 1.15 if [[ ${CATEGORY} = kde-base ]]; then
47 ingmar 1.1 debug-print "${ECLASS}: KDEBASE ebuild recognized"
48 scarabeus 1.10 KDEBASE=kde-base
49 scarabeus 1.45 elif [[ ${KMNAME-${PN}} = kdevelop ]]; then
50 reavertm 1.31 debug-print "${ECLASS}: KDEVELOP ebuild recognized"
51 scarabeus 1.45 KDEBASE=kdevelop
52 ingmar 1.1 fi
53    
54 scarabeus 1.45 # determine the build type
55 abcd 1.51 if [[ ${PV} = *9999* ]]; then
56 johu 1.60 KDE_BUILD_TYPE="live"
57 scarabeus 1.45 else
58 johu 1.60 KDE_BUILD_TYPE="release"
59 scarabeus 1.45 fi
60 johu 1.60 export KDE_BUILD_TYPE
61 scarabeus 1.45
62 johu 1.60 # Set reponame and SCM for modules that have fully migrated to git
63 scarabeus 1.45 # (hack - it's here because it needs to be before SCM inherits from kde4-base)
64 johu 1.60 if [[ ${KDE_BUILD_TYPE} == live ]]; then
65 scarabeus 1.45 case "${KMNAME}" in
66     kdebase-workspace)
67     EGIT_REPONAME=${EGIT_REPONAME:=kde-workspace}
68     ;;
69     kdebase-runtime)
70     EGIT_REPONAME=${EGIT_REPONAME:=kde-runtime}
71     ;;
72     kdebase-apps)
73     EGIT_REPONAME=${EGIT_REPONAME:=kde-baseapps}
74     ;;
75     esac
76     fi
77    
78     # @ECLASS-VARIABLE: KDE_SCM
79     # @DESCRIPTION:
80     # If this is a live package which scm does it use
81 alexxy 1.63 # Everything else uses git by default
82     KDE_SCM="${KDE_SCM:-git}"
83 scarabeus 1.45 case ${KDE_SCM} in
84     svn|git) ;;
85     *) die "KDE_SCM: ${KDE_SCM} is not supported" ;;
86     esac
87    
88     # @ECLASS-VARIABLE: KDE_LINGUAS
89     # @DESCRIPTION:
90     # This is a whitespace-separated list of translations this ebuild supports.
91     # These translations are automatically added to IUSE. Therefore ebuilds must set
92     # this variable before inheriting any eclasses. To enable only selected
93     # translations, ebuilds must call enable_selected_linguas(). kde4-{base,meta}.eclass does
94     # this for you.
95     #
96 johu 1.61 # Example: KDE_LINGUAS="de en_GB nl"
97 johu 1.60 if [[ ${KDE_BUILD_TYPE} != live || -n ${KDE_LINGUAS_LIVE_OVERRIDE} ]]; then
98 scarabeus 1.45 for _lingua in ${KDE_LINGUAS}; do
99     IUSE="${IUSE} linguas_${_lingua}"
100     done
101     fi
102    
103 ingmar 1.1 # @FUNCTION: buildsycoca
104     # @DESCRIPTION:
105     # Function to rebuild the KDE System Configuration Cache.
106     # All KDE ebuilds should run this in pkg_postinst and pkg_postrm.
107     buildsycoca() {
108     debug-print-function ${FUNCNAME} "$@"
109 scarabeus 1.19
110 alexxy 1.25 # We no longer need to run kbuildsycoca4, as kded does that automatically, as needed
111 scarabeus 1.15
112     # fix permission for some directories
113 abcd 1.52 for x in usr/share/{config,kde4}; do
114     DIRS=${EROOT}usr
115     [[ -d "${EROOT}${x}" ]] || break # nothing to do if directory does not exist
116     # fixes Bug 318237
117     if use userland_BSD ; then
118     [[ $(stat -f %p "${EROOT}${x}") != 40755 ]]
119     local stat_rtn="$?"
120     else
121     [[ $(stat --format=%a "${EROOT}${x}") != 755 ]]
122     local stat_rtn=$?
123     fi
124     if [[ $stat_rtn != 1 ]] ; then
125     ewarn "QA Notice:"
126     ewarn "Package ${PN} is breaking ${EROOT}${x} permissions."
127     ewarn "Please report this issue to gentoo bugzilla."
128     einfo "Permissions will get adjusted automatically now."
129     find "${EROOT}${x}" -type d -print0 | xargs -0 chmod 755
130     fi
131 scarabeus 1.15 done
132 ingmar 1.1 }
133    
134     # @FUNCTION: comment_all_add_subdirectory
135     # @USAGE: [list of directory names]
136     # @DESCRIPTION:
137 scarabeus 1.10 # Recursively comment all add_subdirectory instructions in listed directories,
138     # except those in cmake/.
139 ingmar 1.1 comment_all_add_subdirectory() {
140     find "$@" -name CMakeLists.txt -print0 | grep -vFzZ "./cmake" | \
141 wired 1.22 xargs -0 sed -i \
142     -e '/^[[:space:]]*add_subdirectory/s/^/#DONOTCOMPILE /' \
143     -e '/^[[:space:]]*ADD_SUBDIRECTORY/s/^/#DONOTCOMPILE /' \
144     -e '/^[[:space:]]*macro_optional_add_subdirectory/s/^/#DONOTCOMPILE /' \
145     -e '/^[[:space:]]*MACRO_OPTIONAL_ADD_SUBDIRECTORY/s/^/#DONOTCOMPILE /' \
146     || die "${LINENO}: Initial sed died"
147 ingmar 1.1 }
148    
149 zlin 1.5 # @FUNCTION: enable_selected_linguas
150     # @DESCRIPTION:
151 scarabeus 1.10 # Enable translations based on LINGUAS settings and translations supported by
152     # the package (see KDE_LINGUAS). By default, translations are found in "${S}"/po
153 zlin 1.5 # but this default can be overridden by defining KDE_LINGUAS_DIR.
154     enable_selected_linguas() {
155 wired 1.22 debug-print-function ${FUNCNAME} "$@"
156    
157 alexxy 1.37 local x
158 scarabeus 1.10
159 scarabeus 1.19 # if there is no linguas defined we enable everything
160 scarabeus 1.20 if ! $(env | grep -q "^LINGUAS="); then
161     return 0
162     fi
163 wired 1.22
164     # @ECLASS-VARIABLE: KDE_LINGUAS_DIR
165     # @DESCRIPTION:
166     # Specified folder where application translations are located.
167 alexxy 1.37 # Can be defined as array of folders where translations are located.
168     # Note that space separated list of dirs is not supported.
169     # Default value is set to "po".
170     if [[ "$(declare -p KDE_LINGUAS_DIR 2>/dev/null 2>&1)" == "declare -a"* ]]; then
171     debug-print "$FUNCNAME: we have these subfolders defined: ${KDE_LINGUAS_DIR}"
172 scarabeus 1.45 for x in ${KDE_LINGUAS_DIR[@]}; do
173 alexxy 1.37 _enable_selected_linguas_dir ${x}
174     done
175     else
176     KDE_LINGUAS_DIR=${KDE_LINGUAS_DIR:="po"}
177     _enable_selected_linguas_dir ${KDE_LINGUAS_DIR}
178     fi
179 wired 1.22 }
180    
181     # @FUNCTION: enable_selected_doc_linguas
182     # @DESCRIPTION:
183     # Enable only selected linguas enabled doc folders.
184     enable_selected_doc_linguas() {
185     debug-print-function ${FUNCNAME} "$@"
186    
187     # @ECLASS-VARIABLE: KDE_DOC_DIRS
188     # @DESCRIPTION:
189     # Variable specifying whitespace separated patterns for documentation locations.
190     # Default is "doc/%lingua"
191     KDE_DOC_DIRS=${KDE_DOC_DIRS:='doc/%lingua'}
192     local linguas
193     for pattern in ${KDE_DOC_DIRS}; do
194    
195     local handbookdir=`dirname ${pattern}`
196     local translationdir=`basename ${pattern}`
197     # Do filename pattern supplied, treat as directory
198 scarabeus 1.45 [[ ${handbookdir} = '.' ]] && handbookdir=${translationdir} && translationdir=
199     [[ -d ${handbookdir} ]] || die 'wrong doc dir specified'
200 wired 1.22
201     if ! use handbook; then
202     # Disable whole directory
203     sed -e "/add_subdirectory[[:space:]]*([[:space:]]*${handbookdir}[[:space:]]*)/s/^/#DONOTCOMPILE /" \
204     -e "/ADD_SUBDIRECTORY[[:space:]]*([[:space:]]*${handbookdir}[[:space:]]*)/s/^/#DONOTCOMPILE /" \
205     -i CMakeLists.txt || die 'failed to comment out all handbooks'
206     else
207 dilfridge 1.59 # if there is no linguas defined we enable everything (i.e. comment out nothing)
208     if ! $(env | grep -q "^LINGUAS="); then
209     return 0
210     fi
211    
212 wired 1.22 # Disable subdirectories recursively
213     comment_all_add_subdirectory "${handbookdir}"
214     # Add requested translations
215     local lingua
216     for lingua in en ${KDE_LINGUAS}; do
217 scarabeus 1.45 if [[ ${lingua} = en ]] || use linguas_${lingua}; then
218     if [[ -d ${handbookdir}/${translationdir//%lingua/${lingua}} ]]; then
219 wired 1.22 sed -e "/add_subdirectory[[:space:]]*([[:space:]]*${translationdir//%lingua/${lingua}}/s/^#DONOTCOMPILE //" \
220     -e "/ADD_SUBDIRECTORY[[:space:]]*([[:space:]]*${translationdir//%lingua/${lingua}}/s/^#DONOTCOMPILE //" \
221     -i "${handbookdir}"/CMakeLists.txt && ! has ${lingua} ${linguas} && linguas="${linguas} ${lingua}"
222     fi
223     fi
224     done
225     fi
226    
227     done
228     [[ -n "${linguas}" ]] && einfo "Enabling handbook translations:${linguas}"
229 zlin 1.5 }
230    
231 scarabeus 1.11 # @FUNCTION: migrate_store_dir
232     # @DESCRIPTION:
233 scarabeus 1.15 # Universal store dir migration
234     # * performs split of kdebase to kdebase-apps when needed
235     # * moves playground/extragear kde4-base-style to toplevel dir
236 scarabeus 1.11 migrate_store_dir() {
237 scarabeus 1.45 if [[ ${KDE_SCM} != svn ]]; then
238     die "migrate_store_dir() only makes sense for subversion"
239     fi
240    
241 scarabeus 1.15 local cleandir="${ESVN_STORE_DIR}/KDE"
242 scarabeus 1.45
243     if [[ -d ${cleandir} ]]; then
244 scarabeus 1.11 ewarn "'${cleandir}' has been found. Moving contents to new location."
245     addwrite "${ESVN_STORE_DIR}"
246     # Split kdebase
247     local module
248     if pushd "${cleandir}"/kdebase/kdebase > /dev/null; then
249     for module in `find . -maxdepth 1 -type d -name [a-z0-9]\*`; do
250     module="${module#./}"
251     mkdir -p "${ESVN_STORE_DIR}/kdebase-${module}" && mv -f "${module}" "${ESVN_STORE_DIR}/kdebase-${module}" || \
252     die "Failed to move to '${ESVN_STORE_DIR}/kdebase-${module}'."
253     done
254     popd > /dev/null
255     rm -fr "${cleandir}/kdebase" || \
256     die "Failed to remove ${cleandir}/kdebase. You need to remove it manually."
257     fi
258     # Move the rest
259     local pkg
260     for pkg in "${cleandir}"/*; do
261 scarabeus 1.15 mv -f "${pkg}" "${ESVN_STORE_DIR}"/ || eerror "Failed to move '${pkg}'"
262 scarabeus 1.11 done
263 scarabeus 1.45 rmdir "${cleandir}" || die "Could not move obsolete KDE store dir. Please move '${cleandir}' contents to appropriate location (possibly ${ESVN_STORE_DIR}) and manually remove '${cleandir}' in order to continue."
264 scarabeus 1.11 fi
265 scarabeus 1.15
266 ssuominen 1.55 if ! has kde4-meta ${INHERITED}; then
267 scarabeus 1.15 case ${KMNAME} in
268     extragear*|playground*)
269 scarabeus 1.45 local scmlocalpath="${ESVN_STORE_DIR}"/"${KMNAME}"/"${PN}"
270     if [[ -d "${scmlocalpath}" ]]; then
271 scarabeus 1.15 local destdir="${ESVN_STORE_DIR}"/"${ESVN_PROJECT}"/"`basename "${ESVN_REPO_URI}"`"
272 scarabeus 1.45 ewarn "'${scmlocalpath}' has been found."
273 scarabeus 1.15 ewarn "Moving contents to new location: ${destdir}"
274     addwrite "${ESVN_STORE_DIR}"
275 scarabeus 1.45 mkdir -p "${ESVN_STORE_DIR}"/"${ESVN_PROJECT}" && mv -f "${scmlocalpath}" "${destdir}" \
276     || die "Failed to move to '${scmlocalpath}'"
277 scarabeus 1.15 # Try cleaning empty directories
278 scarabeus 1.45 rmdir "`dirname "${scmlocalpath}"`" 2> /dev/null
279 scarabeus 1.15 fi
280     ;;
281     esac
282     fi
283 scarabeus 1.11 }
284    
285 scarabeus 1.10 # Functions handling KMLOADLIBS and KMSAVELIBS
286 ingmar 1.1
287 scarabeus 1.10 # @FUNCTION: save_library_dependencies
288     # @DESCRIPTION:
289     # Add exporting CMake dependencies for current package
290     save_library_dependencies() {
291 abcd 1.51 local depsfile="${T}/${PN}"
292 scarabeus 1.10
293 scarabeus 1.15 ebegin "Saving library dependencies in ${depsfile##*/}"
294 scarabeus 1.10 echo "EXPORT_LIBRARY_DEPENDENCIES(\"${depsfile}\")" >> "${S}/CMakeLists.txt" || \
295     die "Failed to save the library dependencies."
296     eend $?
297 ingmar 1.1 }
298    
299 scarabeus 1.10 # @FUNCTION: install_library_dependencies
300 ingmar 1.1 # @DESCRIPTION:
301 scarabeus 1.10 # Install generated CMake library dependencies to /var/lib/kde
302     install_library_dependencies() {
303 abcd 1.51 local depsfile="${T}/${PN}"
304 scarabeus 1.15
305     ebegin "Installing library dependencies as ${depsfile##*/}"
306 abcd 1.28 insinto /var/lib/kde
307 scarabeus 1.10 doins "${depsfile}" || die "Failed to install library dependencies."
308     eend $?
309     }
310 ingmar 1.1
311 scarabeus 1.10 # @FUNCTION: load_library_dependencies
312     # @DESCRIPTION:
313     # Inject specified library dependencies in current package
314     load_library_dependencies() {
315     local pn i depsfile
316 scarabeus 1.15 ebegin "Injecting library dependencies from '${KMLOADLIBS}'"
317 scarabeus 1.10
318     i=0
319     for pn in ${KMLOADLIBS} ; do
320     ((i++))
321 abcd 1.51 depsfile="${EPREFIX}/var/lib/kde/${pn}"
322     [[ -r ${depsfile} ]] || depsfile="${EPREFIX}/var/lib/kde/${pn}:$(get_kde_version)"
323 scarabeus 1.45 [[ -r ${depsfile} ]] || die "Depsfile '${depsfile}' not accessible. You probably need to reinstall ${pn}."
324 scarabeus 1.10 sed -i -e "${i}iINCLUDE(\"${depsfile}\")" "${S}/CMakeLists.txt" || \
325     die "Failed to include library dependencies for ${pn}"
326     done
327     eend $?
328 ingmar 1.1 }
329 scarabeus 1.23
330     # @FUNCTION: add_blocker
331     # @DESCRIPTION:
332     # Create correct RDEPEND value for blocking correct package.
333 alexxy 1.25 # Useful for file-collision blocks.
334     # Parameters are package and version(s) to block.
335     # add_blocker kdelibs 4.2.4
336 abcd 1.52 # If no version is specified, then all versions will be blocked.
337     # If the version is 0, then no versions will be blocked.
338     # If a second version ending in ":3.5" is passed, then the version listed for
339     # that slot will be blocked as well.
340     #
341     # Examples:
342     # # Block all versions of kdelibs
343     # add_blocker kdelibs
344 alexxy 1.25 #
345 abcd 1.52 # # Block all versions of kdelibs older than 4.3.50
346     # add_blocker kdelibs 4.3.50
347 alexxy 1.25 #
348 abcd 1.52 # # Block kdelibs 3.5.10 and older, but not any version of
349     # # kdelibs from KDE 4
350     # add_blocker kdelibs 0 3.5.10:3.5
351 scarabeus 1.23 add_blocker() {
352     debug-print-function ${FUNCNAME} "$@"
353    
354 abcd 1.54 [[ -z ${1} ]] && die "Missing parameter"
355     local pkg=kde-base/$1 atom old_ver="unset" use
356     if [[ $pkg == *\[*\] ]]; then
357     use=${pkg/#*\[/[}
358     pkg=${pkg%\[*\]}
359     fi
360    
361     [[ "$3" == *:3.5 ]] && old_ver=${3%:3.5}
362    
363     # If the version passed is "0", do nothing
364     if [[ ${2} != 0 ]]; then
365     # If no version was passed, block all versions in this slot
366     if [[ -z ${2} ]]; then
367     atom=${pkg}
368     # If the version passed begins with a "<", then use "<" instead of "<="
369     elif [[ ${2::1} == "<" ]]; then
370     # this also removes the first character of the version, which is a "<"
371     atom="<${pkg}-${2:1}"
372     else
373     atom="<=${pkg}-${2}"
374     fi
375     RDEPEND+=" !${atom}:4${use}"
376     fi
377    
378     # Do the same thing as above for :3.5, except that we don't want any
379     # output if no parameter was passed.
380     if [[ ${old_ver} != "unset" ]]; then
381     if [[ -z ${old_ver} ]]; then
382     atom=${pkg}
383     elif [[ ${old_ver::1} == "<" ]]; then
384     atom="<${pkg}-${old_ver:1}"
385     else
386     atom="<=${pkg}-${old_ver}"
387     fi
388     RDEPEND+=" !${atom}:3.5${use}"
389     fi
390 alexxy 1.25 }
391    
392 alexxy 1.37 # @FUNCTION: add_kdebase_dep
393     # @DESCRIPTION:
394 abcd 1.54 # Create proper dependency for kde-base/ dependencies.
395 scarabeus 1.45 # This takes 1 to 3 arguments. The first being the package name, the optional
396     # second is additional USE flags to append, and the optional third is the
397     # version to use instead of the automatic version (use sparingly).
398     # The output of this should be added directly to DEPEND/RDEPEND, and may be
399     # wrapped in a USE conditional (but not an || conditional without an extra set
400     # of parentheses).
401 alexxy 1.37 add_kdebase_dep() {
402     debug-print-function ${FUNCNAME} "$@"
403    
404 scarabeus 1.45 local ver
405    
406     if [[ -n ${3} ]]; then
407     ver=${3}
408     elif [[ -n ${KDE_OVERRIDE_MINIMAL} ]]; then
409     ver=${KDE_OVERRIDE_MINIMAL}
410     elif [[ ${KDEBASE} != kde-base ]]; then
411     ver=${KDE_MINIMAL}
412 abcd 1.54 # if building stable-live version depend just on the raw KDE version
413 scarabeus 1.45 # to allow merging packages against more stable basic stuff
414     elif [[ ${PV} == *.9999 ]]; then
415 abcd 1.51 ver=$(get_kde_version)
416 scarabeus 1.45 else
417     ver=${PV}
418     fi
419    
420 alexxy 1.37 [[ -z ${1} ]] && die "Missing parameter"
421    
422 abcd 1.54 echo " >=kde-base/${1}-${ver}:4[aqua=${2:+,${2}}]"
423 alexxy 1.25 }
424    
425 alexxy 1.37 # local function to enable specified translations for specified directory
426     # used from kde4-functions_enable_selected_linguas function
427     _enable_selected_linguas_dir() {
428     local lingua linguas sr_mess wp
429     local dir=${1}
430 alexxy 1.25
431 scarabeus 1.45 [[ -d ${dir} ]] || die "linguas dir \"${dir}\" does not exist"
432 alexxy 1.37 comment_all_add_subdirectory "${dir}"
433     pushd "${dir}" > /dev/null
434 alexxy 1.25
435 alexxy 1.37 # fix all various crazy sr@Latn variations
436     # this part is only ease for ebuilds, so there wont be any die when this
437     # fail at any point
438     sr_mess="sr@latn sr@latin sr@Latin"
439     for wp in ${sr_mess}; do
440 scarabeus 1.45 [[ -e ${wp}.po ]] && mv "${wp}.po" "sr@Latn.po"
441     if [[ -d ${wp} ]]; then
442 alexxy 1.37 # move dir and fix cmakelists
443     mv "${wp}" "sr@Latn"
444     sed -i \
445 scarabeus 1.45 -e "s:${wp}:sr@Latn:g" \
446 alexxy 1.37 CMakeLists.txt
447     fi
448     done
449 alexxy 1.25
450 alexxy 1.37 for lingua in ${KDE_LINGUAS}; do
451 scarabeus 1.45 if [[ -e ${lingua}.po ]]; then
452 alexxy 1.37 mv "${lingua}.po" "${lingua}.po.old"
453 reavertm 1.35 fi
454 alexxy 1.37 done
455    
456     for lingua in ${KDE_LINGUAS}; do
457     if use linguas_${lingua} ; then
458 scarabeus 1.45 if [[ -d ${lingua} ]]; then
459 alexxy 1.37 linguas="${linguas} ${lingua}"
460     sed -e "/add_subdirectory([[:space:]]*${lingua}[[:space:]]*)[[:space:]]*$/ s/^#DONOTCOMPILE //" \
461     -e "/ADD_SUBDIRECTORY([[:space:]]*${lingua}[[:space:]]*)[[:space:]]*$/ s/^#DONOTCOMPILE //" \
462     -i CMakeLists.txt || die "Sed to uncomment linguas_${lingua} failed."
463     fi
464 scarabeus 1.45 if [[ -e ${lingua}.po.old ]]; then
465 alexxy 1.37 linguas="${linguas} ${lingua}"
466     mv "${lingua}.po.old" "${lingua}.po"
467     fi
468 reavertm 1.34 fi
469 alexxy 1.37 done
470 scarabeus 1.45 [[ -n ${linguas} ]] && echo ">>> Enabling languages: ${linguas}"
471 alexxy 1.37
472     popd > /dev/null
473 scarabeus 1.23 }
474 scarabeus 1.45
475 abcd 1.51 # @FUNCTION: get_kde_version
476 vapier 1.56 # @DESCRIPTION:
477 abcd 1.51 # Translates an ebuild version into a major.minor KDE SC
478     # release version. If no version is specified, ${PV} is used.
479     get_kde_version() {
480 scarabeus 1.45 local ver=${1:-${PV}}
481     local major=$(get_major_version ${ver})
482     local minor=$(get_version_component_range 2 ${ver})
483     local micro=$(get_version_component_range 3 ${ver})
484 abcd 1.52 if [[ ${ver} == 9999 ]]; then
485     echo live
486     else
487 scarabeus 1.45 (( micro < 50 )) && echo ${major}.${minor} || echo ${major}.$((minor + 1))
488     fi
489     }
490 kensington 1.64
491     fi

  ViewVC Help
Powered by ViewVC 1.1.20