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

Contents of /eclass/qt4.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (hide annotations) (download)
Mon May 8 11:13:57 2006 UTC (8 years, 6 months ago) by caleb
Branch: MAIN
Changes since 1.1: +2 -2 lines
Minor qt4 changes

1 caleb 1.1 # Copyright 2005 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 caleb 1.2 # $Header: /var/cvsroot/gentoo-x86/eclass/qt4.eclass,v 1.1 2005/11/17 13:48:46 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     # DEPEND="$(qt_min_version 4)"
10     #
11     # and it handles the rest for you
12     #
13    
14     inherit versionator
15    
16     QTPKG="x11-libs/qt-"
17     QT4MAJORVERSIONS="4.1 4.0"
18 caleb 1.2 QT4VERSIONS="4.1.2 4.1.1 4.1.0 4.0.1 4.0.0"
19 caleb 1.1
20     qt_min_version() {
21     echo "|| ("
22     qt_min_version_list "$@"
23     echo ")"
24     }
25    
26     qt_min_version_list() {
27     local MINVER="$1"
28     local VERSIONS=""
29    
30     case "${MINVER}" in
31     4|4.0|4.0.0) VERSIONS="=${QTPKG}4*";;
32     4.1|4.1.0)
33     for x in ${QT4MAJORVERSIONS}; do
34     if $(version_is_at_least "${MINVER}" "${x}"); then
35     VERSIONS="${VERSIONS} =${QTPKG}${x}*"
36     fi
37     done
38     ;;
39     4*)
40     for x in ${QT4VERSIONS}; do
41     if $(version_is_at_least "${MINVER}" "${x}"); then
42     VERSIONS="${VERSIONS} =${QTPKG}${x}"
43     fi
44     done
45     ;;
46     *) VERSIONS="=${QTPKG}4*";;
47     esac
48    
49     echo "${VERSIONS}"
50     }

  ViewVC Help
Powered by ViewVC 1.1.20