1 |
commit: e4068d3606c944381de83e24f97d5bdcb3ee0e23 |
2 |
Author: Tomas Chvatal <scarabeus <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Mar 24 10:37:59 2011 +0000 |
4 |
Commit: Tomas Chvatal <scarabeus <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Mar 24 10:37:59 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/kde.git;a=commit;h=e4068d36 |
7 |
|
8 |
kde4-base calculate slots more gracefully. |
9 |
|
10 |
--- |
11 |
eclass/kde4-base.eclass | 26 +++++++++++++++----------- |
12 |
1 files changed, 15 insertions(+), 11 deletions(-) |
13 |
|
14 |
diff --git a/eclass/kde4-base.eclass b/eclass/kde4-base.eclass |
15 |
index 3d7e02a..f30aff8 100644 |
16 |
--- a/eclass/kde4-base.eclass |
17 |
+++ b/eclass/kde4-base.eclass |
18 |
@@ -20,7 +20,7 @@ |
19 |
# for tests you should proceed with setting VIRTUALX_REQUIRED=test. |
20 |
: ${VIRTUALX_REQUIRED:=manual} |
21 |
|
22 |
-inherit kde4-functions fdo-mime gnome2-utils base virtualx eutils |
23 |
+inherit kde4-functions fdo-mime gnome2-utils base virtualx versionator eutils |
24 |
|
25 |
if [[ ${BUILD_TYPE} = live ]]; then |
26 |
case ${KDE_SCM} in |
27 |
@@ -64,15 +64,19 @@ KDE_MINIMAL="${KDE_MINIMAL:-4.4}" |
28 |
# Set slot for KDEBASE known packages |
29 |
case ${KDEBASE} in |
30 |
kde-base) |
31 |
+ major=$(get_major_version) |
32 |
+ minor=$(get_version_component_range 2) |
33 |
+ micro=$(get_version_component_range 3) |
34 |
# Determine SLOT from PVs |
35 |
- case ${PV} in |
36 |
- *.9999*) SLOT="${PV/.9999*/}" ;; # stable live |
37 |
- 4.6* | 4.5.[6-9][0-9]*) SLOT="4.6" ;; |
38 |
- 4.5* | 4.4.[6-9][0-9]*) SLOT="4.5" ;; |
39 |
- 4.4* | 4.3.[6-9][0-9]*) SLOT="4.4" ;; |
40 |
- 9999*) SLOT="live" ;; # regular live |
41 |
- *) die "Unsupported ${PV}" ;; |
42 |
- esac |
43 |
+ [[ ${PV} == 9999* ]] && SLOT=live # regular live |
44 |
+ [[ ${major} -eq 4 && ${micro} == 9999 ]] && SLOT=${major}.${minor} # stable live |
45 |
+ if [[ ${major} -eq 4 && ${micro} != 9999 ]]; then |
46 |
+ [[ ${micro} -lt 60 ]] && \ |
47 |
+ SLOT=${major}.${minor} |
48 |
+ [[ ${micro} -ge 60 ]] && |
49 |
+ SLOT=${major}.$(($minor + 1)) |
50 |
+ fi |
51 |
+ [[ -z ${SLOT} ]] && die "Unsupported ${PV}" |
52 |
KDE_MINIMAL="${SLOT}" |
53 |
;; |
54 |
koffice) |
55 |
@@ -387,8 +391,8 @@ fi |
56 |
if [[ ${KDEBASE} != "kde-base" ]] && [[ -n ${KDE_LINGUAS} ]] && has "${EAPI:-0}" 4; then |
57 |
usedep='' |
58 |
for _lingua in ${KDE_LINGUAS}; do |
59 |
- [[ -n ${usedep} ]] && usedep="${usedep}," |
60 |
- usedep="${usedep}linguas_${_lingua}(+)?" |
61 |
+ [[ -n ${usedep} ]] && usedep+="," |
62 |
+ usedep+="linguas_${_lingua}(+)?" |
63 |
done |
64 |
# if our package has lignuas pull in kde-l10n with selected lingua |
65 |
kderdepend+=" $(add_kdebase_dep kde-l10n ${usedep})" |