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

Contents of /eclass/qt4.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Thu Nov 17 13:48:46 2005 UTC (8 years, 7 months ago) by caleb
Branch: MAIN
My initial commit of a qt4 eclass (highly mirrored off of qt3)

1 # Copyright 2005 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/eclass/qt3.eclass,v 1.12 2005/09/19 15:28:17 greg_g 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 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 QT4VERSIONS="4.0.1 4.0.0"
19
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