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

Contents of /eclass/qt.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.13 - (show annotations) (download)
Thu Jul 7 04:12:18 2005 UTC (9 years, 4 months ago) by caleb
Branch: MAIN
CVS Tags: HEAD
Changes since 1.12: +1 -1 lines
FILE REMOVED
Rename qt.eclass to qt3.eclass

1 # Copyright 2005 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/eclass/qt.eclass,v 1.12 2005/07/06 20:23:20 agriffis Exp $
4 #
5 # Author Caleb Tennis <caleb@gentoo.org>
6 #
7 # This eclass is simple. Inherit it, and in your depend, do something like this:
8 #
9 # DEPEND="$(qt_min_version 3.1)"
10 #
11 # and it handles the rest for you
12 #
13 # Caveats:
14 #
15 # Currently, the ebuild assumes that a minimum version of Qt3 is NOT satisfied by Qt4
16
17 inherit versionator
18
19
20 QTPKG="x11-libs/qt-"
21 QT3VERSIONS="3.3.4-r5 3.3.4-r4 3.3.4-r3 3.3.4-r2 3.3.4-r1 3.3.4 3.3.3-r3 3.3.3-r2 3.3.3-r1 3.3.3 3.3.2 3.3.1-r2 3.3.1-r1 3.3.1 3.3.0-r1 3.3.0 3.2.3-r1 3.2.3 3.2.2-r1 3.2.2 3.2.1-r2 3.2.1-r1 3.2.1 3.2.0 3.1.2-r4 3.1.2-r3 3.1.2-r2 3.1.2-r1 3.1.2 3.1.1-r2 3.1.1-r1 3.1.1 3.1.0-r3 3.1.0-r2 3.1.0-r1 3.1.0"
22 QT4VERSIONS="4.0.0"
23
24 qt_pkg_setup() {
25 if has_version =x11-libs/qt-3*; then
26 if [[ -z $QTDIR ]]; then
27 QTDIR="/usr/qt/3"
28 fi
29
30 [[ -d "$QTDIR/etc/settings" ]] && addwrite "$QTDIR/etc/settings"
31 addpredict "$QTDIR/etc/settings"
32 fi
33 }
34
35 qt_min_version() {
36 echo "|| ("
37 qt_min_version_list "$@"
38 echo ")"
39 }
40
41 qt_min_version_list() {
42 local MINVER=$1
43 local VERSIONS=""
44
45 case $MINVER in
46 3|3.0|3.0.0) VERSIONS="=${QTPKG}3*";;
47 4|4.0|4.0.0) VERSIONS="=${QTPKG}4*";;
48 3*)
49 for x in $QT3VERSIONS; do
50 if $(version_is_at_least $MINVER $x); then
51 VERSIONS="${VERSIONS} =${QTPKG}${x}"
52 fi
53 done
54 ;;
55 4*)
56 for x in $QT4VERSIONS; do
57 if $(version_is_at_least $MINVER $x); then
58 VERSIONS="${VERSIONS} =${QTPKG}${x}"
59 fi
60 done
61 ;;
62 *)
63 die "qt_min_version called with invalid parameter: \"$1\""
64 ;;
65 esac
66
67 echo "$VERSIONS"
68 }
69
70 EXPORT_FUNCTIONS pkg_setup

  ViewVC Help
Powered by ViewVC 1.1.20