/[gentoo-x86]/eclass/depend.eclass
Gentoo

Contents of /eclass/depend.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Fri Jan 25 19:00:31 2002 UTC (12 years, 8 months ago) by danarmak
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
removing long-ago deprecated depend.eclass (it's now mostly replaced by kde-dirs.eclass)
fix in inherit.eclass
completely rewrote the eclass-howto.  it's up to date now.

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/depend.eclass,v 1.1 2001/11/16 12:50:41 danarmak Exp $
5 # This provides the need-kdelibs and need-qt functions, which handle setting KDEDIR
6 # and QTDIR for the multi-qt and multi-kdelibs schemes. The functions set-kdedir and
7 # set-qtdir are called from kde.eclass; the need-* functions from the ebuild.
8
9 set-kdedir() {
10
11 debug-print-function set-kdedir $*
12
13 biglist="`ls -d1 /usr/lib/kdelibs-*`"
14 debug-print "set-kdedir: \$biglist:
15 ${biglist}"
16
17 # filter $biglist to create $list
18 list=""
19 for x in $biglist; do
20 # strip path, leave version number
21 x="`echo $x | sed -e 's:/usr/lib/kdelibs-::'`"
22 # do comparison
23 if [[ ( $x > $1 ) || ( $x = $1 ) ]]; then
24 # add path back on
25 list="$list /usr/lib/kdelibs-$x"
26 fi
27 done
28
29 debug-print "set-kdedir: filtered \$biglist and got this \$list:
30 $list"
31
32 # see if we found anything that matches
33 if [ -z "$list" ]; then
34 debug-print "set-kdedir: WARNING kdelibs dependency version $1 requested, but
35 no matching installed library has been found. Must be an old system."
36 else
37 # select last item in sorted list
38 for KDEDIR in $list; do true; done
39 debug-print "set-kdedir: request for $1 resolved to $KDEDIR"
40 fi
41
42 }
43
44 need-kdelibs() {
45
46 debug-print-function need-kdelibs $*
47
48 if [ -z "$1" ]; then
49 kde_version="0"
50 else
51 kde_version="$1"
52 fi
53
54 debug-print "need-kdelibs: version number is $kde_version"
55
56 newdepend ">=kde-base/kdelibs-$kde_version"
57
58 }
59
60 set-qtdir() {
61
62 debug-print-function set-qtdir $*
63
64 biglist="`ls -d1 /usr/lib/qt-x11-*`"
65 debug-print "set-qtdir: \$biglist:
66 ${biglist}"
67
68 # filter $biglist to create $list
69 list=""
70 for x in $biglist; do
71 # strip path, leave version number
72 x="`echo $x | sed -e 's:/usr/lib/qt-x11-::'`"
73 # do comparison
74 if [[ $x > $1 ]]; then
75 list="$list /usr/lib/qt-x11-$x"
76 fi
77 done
78
79 debug-print "set-qtdir: filtered \$biglist and got this \$list:
80 $list"
81
82 # see if we found anything that matches
83 if [ -z "$list" ]; then
84 debug-print "set-qtdir: WARNING qt dependency version $1 requested, but
85 no matching installed library has been found. Must be an old system."
86 else
87 # select last item in sorted list
88 for QTDIR in $list; do true; done
89 debug-print "set-qtdir: request for $1 resolved to $QTDIR"
90 fi
91
92 }
93
94 need-qt() {
95
96 debug-print-function need-qt $*
97
98 if [ -z "$1" ]; then
99 qt_version="0"
100 else
101 qt_version="$1"
102 fi
103
104 debug-print "need-qt: version number is $qt_version"
105
106 newdepend ">=x11-libs/qt-x11-$qt_version"
107
108 }

  ViewVC Help
Powered by ViewVC 1.1.20