/[gentoo-x86]/eclass/kde-dirs.eclass
Gentoo

Contents of /eclass/kde-dirs.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Wed Feb 6 20:38:10 2002 UTC (12 years, 7 months ago) by danarmak
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +1 -1 lines
FILE REMOVED
major eclass cleanup/restructuring. no change ni inheriting ebuilds necessary. more details shortly in updated docs
and in coming up gentoo-dev post.

1 # Copyright 1999-2000 Gentoo Technologies, Inc.
2 # Distributed under the terms of the GNU General Public License, v2 or later
3 # Author Dan Armak <danarmak@gentoo.org>
4 # $Header: /home/cvsroot/gentoo-x86/eclass/kde-dirs.eclass,v 1.4 2002/02/01 11:47:16 danarmak Exp $
5 # The kde eclass is inherited by all kde-* eclasses. Few ebuilds inherit straight from here.
6 ECLASS=kde-dirs
7
8 need-kde() {
9
10 debug-print-function $FUNCNAME $*
11 KDEVER="$1"
12
13 #newdepend ">=kde-base/kdelibs-$KDEVER"
14 min-kde-ver $KDEVER
15 newdepend ">=kde-base/kdelibs-${selected_version}"
16 set-kdedir $KDEVER
17
18 qtver-from-kdever $KDEVER
19 need-qt $selected_version
20
21 }
22
23 set-kdedir() {
24
25 debug-print-function $FUNCNAME $*
26
27 # for older make.globals versions which don't include the default KDE?DIR settings
28 [ -z "$KDE2DIR" ] && export KDE2DIR="/usr/kde/2"
29 [ -z "$KDE3DIR" ] && export KDE3DIR="/usr/kde/3"
30 # not defined at all by default
31 [ -z "$KDE2LIBSDIR" ] && export KDE2LIBSDIR="$KDE2DIR"
32 [ -z "$KDE3LIBSDIR" ] && export KDE3LIBSDIR="$KDE3DIR"
33
34 local KDEVER
35 KDEVER=$1
36
37 # select 1st element in dot-separated string
38 IFSBACKUP=$IFS
39 IFS="."
40 KDEMAJORVER=""
41 for x in $KDEVER; do
42 [ -z "$KDEMAJORVER" ] && KDEMAJORVER=$x
43 done
44 IFS=$IFSBACKUP
45
46 case $KDEMAJORVER in
47 2) export KDEDIR=${KDE2LIBSDIR};;
48 3) export KDEDIR=${KDE3LIBSDIR};;
49 esac
50
51 debug-print "$FUNCNAME: result: KDEDIR=$KDEDIR"
52
53 }
54
55 need-qt() {
56
57 debug-print-function $FUNCNAME $*
58 QTVER="$1"
59 #newdepend ">=x11-libs/qt-$QTVER"
60 min-qt-ver $QTVER
61 newdepend "=x11-libs/qt-$selected_version*"
62 set-qtdir $QTVER
63
64 }
65
66 set-qtdir() {
67
68 debug-print-function $FUNCNAME $*
69
70 local QTVER
71 QTVER=$1
72
73 # select 1st element in dot-separated string
74 IFSBACKUP=$IFS
75 IFS="."
76 QTMAJORVER=""
77 for x in $QTVER; do
78 [ -z "$QTMAJORVER" ] && QTMAJORVER=$x
79 done
80 IFS=$IFSBACKUP
81
82 export QTDIR="/usr/qt/$QTMAJORVER"
83
84 }
85
86 # returns minimal qt version needed for specified kde version
87 qtver-from-kdever() {
88
89 debug-print-function $FUNCNAME $*
90
91 local ver
92
93 case $1 in
94 2*) ver=2.3.1;;
95 3*) ver=3.0.1;;
96 *) echo "!!! error: $FUNCNAME() (kde.eclass) called with invalid parameter: \"$1\", please report bug" && exit 1;;
97 esac
98
99 selected_version="$ver"
100
101 }
102
103 # compat
104 need-kdelibs() {
105 echo "WARNING: need-kdelibs() called, where need-kde() is correct.
106 If this happens at the unmerging of an old ebuild, disregard; otherwise report."
107 need-kde $*
108 }
109
110 # for new schemes
111 min-kde-ver() {
112
113 debug-print-function $FUNCNAME $*
114
115 case $1 in
116 2*) selected_version="2.2.2-r2";;
117 3*) selected_version="3.0";;
118 *) echo "!!! error: $FUNCNAME() (kde.eclass) called with invalid parameter: \"$1\", please report bug" && exit 1;;
119 esac
120
121 }
122
123 min-qt-ver() {
124
125 debug-print-function $FUNCNAME $*
126
127 case $1 in
128 2*) selected_version="2.3";;
129 3*) selected_version="3";;
130 *) echo "!!! error: $FUNCNAME() (kde.eclass) called with invalid parameter: \"$1\", please report bug" && exit 1;;
131 esac
132
133 }

  ViewVC Help
Powered by ViewVC 1.1.20