Lines 1-18
Link Here
|
1 |
# Copyright 2005 Gentoo Foundation |
1 |
# Copyright 2005 Gentoo Foundation |
2 |
# Distributed under the terms of the GNU General Public License v2 |
2 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
# $Header: /var/cvsroot/gentoo-x86/eclass/qt3.eclass,v 1.28 2007/07/31 13:42:23 caleb Exp $ |
3 |
# $Header: /var/cvsroot/gentoo-x86/eclass/qt3.eclass,v 1.28 2007/07/31 13:42:23 caleb Exp $ |
4 |
# |
4 |
|
5 |
# Author Caleb Tennis <caleb@gentoo.org> |
5 |
# @ECLASS: qt3.eclass |
6 |
# |
6 |
# @MAINTAINER: |
7 |
# This eclass is simple. Inherit it, and in your depend, do something like this: |
7 |
# Caleb Tennis <caleb@gentoo.org> |
8 |
# |
8 |
# @BLURB: |
9 |
# DEPEND="$(qt_min_version 3.1)" |
9 |
# Eclass for Qt3 packages |
10 |
# |
10 |
# @DESCRIPTION: |
11 |
# and it handles the rest for you |
11 |
# This eclass contains various functions that may be useful |
12 |
# |
12 |
# when dealing with packages using Qt3 libraries. Furthermore, |
13 |
# Caveats: |
13 |
# if you inherit this eclass in an ebuild, the flag 'debug' |
14 |
# |
14 |
# is automatically added to IUSE for that package. |
15 |
# Currently, the ebuild assumes that a minimum version of Qt3 is NOT satisfied by Qt4 |
|
|
16 |
|
15 |
|
17 |
inherit toolchain-funcs versionator |
16 |
inherit toolchain-funcs versionator |
18 |
|
17 |
|
Lines 26-36
Link Here
|
26 |
QTDIR="/usr/qt/3" |
25 |
QTDIR="/usr/qt/3" |
27 |
fi |
26 |
fi |
28 |
|
27 |
|
29 |
PATH="${QTDIR}/bin:${PATH}" |
|
|
30 |
|
31 |
addwrite "${QTDIR}/etc/settings" |
28 |
addwrite "${QTDIR}/etc/settings" |
32 |
addpredict "${QTDIR}/etc/settings" |
29 |
addpredict "${QTDIR}/etc/settings" |
33 |
|
30 |
|
|
|
31 |
# @FUNCTION: qt_min_version |
32 |
# @USAGE: [minimum version] |
33 |
# @DESCRIPTION: |
34 |
# This function is simple. In your depend, do something like this: |
35 |
# DEPEND="$(qt_min_version 3.1)" |
36 |
# and it handles the rest for you. Currently, the eclass assumes |
37 |
# that a minimum version of Qt3 is not satisfied by Qt4. |
34 |
qt_min_version() { |
38 |
qt_min_version() { |
35 |
local list=$(qt_min_version_list "$@") |
39 |
local list=$(qt_min_version_list "$@") |
36 |
if [[ ${list%% *} == "${list}" ]]; then |
40 |
if [[ ${list%% *} == "${list}" ]]; then |
Lines 66-71
Link Here
|
66 |
echo ${VERSIONS} |
70 |
echo ${VERSIONS} |
67 |
} |
71 |
} |
68 |
|
72 |
|
|
|
73 |
# @FUNCTION: eqmake3 |
74 |
# @USAGE: [.pro file] [additional parameters to qmake] |
75 |
# @DESCRIPTION: |
76 |
# Runs qmake on the specified .pro file (defaults to |
77 |
# ${PN}.pro if eqmake3 was called with no argument). |
78 |
# Additional parameters are passed unmodified to qmake. |
69 |
eqmake3() { |
79 |
eqmake3() { |
70 |
local LOGFILE="${T}/qmake-$$.out" |
80 |
local LOGFILE="${T}/qmake-$$.out" |
71 |
local projprofile="${1}" |
81 |
local projprofile="${1}" |
Lines 101-106
Link Here
|
101 |
fi |
111 |
fi |
102 |
|
112 |
|
103 |
${QTDIR}/bin/qmake ${projprofile} \ |
113 |
${QTDIR}/bin/qmake ${projprofile} \ |
|
|
114 |
QTDIR=${QTDIR} \ |
104 |
QMAKE=${QTDIR}/bin/qmake \ |
115 |
QMAKE=${QTDIR}/bin/qmake \ |
105 |
QMAKE_CC=$(tc-getCC) \ |
116 |
QMAKE_CC=$(tc-getCC) \ |
106 |
QMAKE_CXX=$(tc-getCXX) \ |
117 |
QMAKE_CXX=$(tc-getCXX) \ |