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

Contents of /eclass/qt4.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.13 - (hide annotations) (download)
Wed May 2 15:58:23 2007 UTC (7 years, 7 months ago) by genstef
Branch: MAIN
Changes since 1.12: +2 -2 lines
add 4.3 to qt4 mayor versions

1 caleb 1.1 # Copyright 2005 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 genstef 1.13 # $Header: /var/cvsroot/gentoo-x86/eclass/qt4.eclass,v 1.12 2007/05/01 13:49:55 caleb Exp $
4 caleb 1.1 #
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 nyhm 1.9 # DEPEND="$(qt4_min_version 4)"
10 caleb 1.1 #
11     # and it handles the rest for you
12     #
13 caleb 1.4 # 08.16.06 - Renamed qt_min_* to qt4_min_* to avoid conflicts with the qt3 eclass.
14     # - Caleb Tennis <caleb@gentoo.org>
15 caleb 1.1
16     inherit versionator
17    
18     QTPKG="x11-libs/qt-"
19 genstef 1.13 QT4MAJORVERSIONS="4.3 4.2 4.1 4.0"
20 caleb 1.12 QT4VERSIONS="4.3.0_beta1 4.2.3-r1 4.2.3 4.2.2 4.2.1 4.2.0-r2 4.2.0-r1 4.2.0 4.1.4-r2 4.1.4-r1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.0.1 4.0.0"
21 caleb 1.1
22 caleb 1.4 qt4_min_version() {
23 caleb 1.1 echo "|| ("
24 caleb 1.4 qt4_min_version_list "$@"
25 caleb 1.1 echo ")"
26     }
27    
28 caleb 1.4 qt4_min_version_list() {
29 caleb 1.1 local MINVER="$1"
30     local VERSIONS=""
31    
32     case "${MINVER}" in
33     4|4.0|4.0.0) VERSIONS="=${QTPKG}4*";;
34 flameeyes 1.6 4.1|4.1.0|4.2|4.2.0)
35 caleb 1.1 for x in ${QT4MAJORVERSIONS}; do
36     if $(version_is_at_least "${MINVER}" "${x}"); then
37     VERSIONS="${VERSIONS} =${QTPKG}${x}*"
38     fi
39     done
40     ;;
41     4*)
42     for x in ${QT4VERSIONS}; do
43     if $(version_is_at_least "${MINVER}" "${x}"); then
44     VERSIONS="${VERSIONS} =${QTPKG}${x}"
45     fi
46     done
47     ;;
48     *) VERSIONS="=${QTPKG}4*";;
49     esac
50    
51     echo "${VERSIONS}"
52     }

  ViewVC Help
Powered by ViewVC 1.1.20