Lines 1-26
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/qt4.eclass,v 1.25 2007/08/08 12:58:31 caleb Exp $ |
3 |
# $Header: /var/cvsroot/gentoo-x86/eclass/qt4.eclass,v 1.25 2007/08/08 12:58:31 caleb 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="$(qt4_min_version 4)" |
10 |
# |
11 |
# and it handles the rest for you |
12 |
# |
13 |
# 08.16.06 - Renamed qt_min_* to qt4_min_* to avoid conflicts with the qt3 eclass. |
14 |
# - Caleb Tennis <caleb@gentoo.org> |
15 |
|
4 |
|
16 |
inherit eutils multilib toolchain-funcs versionator |
5 |
# @ECLASS: qt4.eclass |
|
|
6 |
# @MAINTAINER: |
7 |
# Caleb Tennis <caleb@gentoo.org> |
8 |
# @BLURB: |
9 |
# Eclass for Qt4 packages |
10 |
# @DESCRIPTION: |
11 |
# This eclass contains various functions that may be useful |
12 |
# when dealing with packages using Qt4 libraries. |
17 |
|
13 |
|
18 |
IUSE="${IUSE}" |
14 |
inherit eutils multilib toolchain-funcs versionator |
19 |
|
15 |
|
20 |
QTPKG="x11-libs/qt-" |
16 |
QTPKG="x11-libs/qt-" |
21 |
QT4MAJORVERSIONS="4.3 4.2 4.1 4.0" |
17 |
QT4MAJORVERSIONS="4.3 4.2 4.1 4.0" |
22 |
QT4VERSIONS="4.3.1 4.3.0-r2 4.3.0-r1 4.3.0 4.3.0_rc1 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" |
18 |
QT4VERSIONS="4.3.1 4.3.0-r2 4.3.0-r1 4.3.0 4.3.0_rc1 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" |
23 |
|
19 |
|
|
|
20 |
# @FUNCTION: qt4_min_version |
21 |
# @USAGE: [minimum version] |
22 |
# @DESCRIPTION: |
23 |
# This function is simple. In your depend, do something like this: |
24 |
# DEPEND="$(qt4_min_version 4.2)" |
25 |
# and it handles the rest for you. |
24 |
qt4_min_version() { |
26 |
qt4_min_version() { |
25 |
echo "|| (" |
27 |
echo "|| (" |
26 |
qt4_min_version_list "$@" |
28 |
qt4_min_version_list "$@" |
Lines 61-76
Link Here
|
61 |
done |
63 |
done |
62 |
} |
64 |
} |
63 |
|
65 |
|
|
|
66 |
# @FUNCTION: eqmake4 |
67 |
# @USAGE: [.pro file] [additional parameters to qmake] |
68 |
# @MAINTAINER: |
69 |
# Przemyslaw Maciag <troll@gentoo.org> |
70 |
# Davide Pesavento <davidepesa@gmail.com> |
71 |
# @DESCRIPTION: |
72 |
# Runs qmake on the specified .pro file (defaults to |
73 |
# ${PN}.pro if eqmake4 was called with no argument). |
74 |
# Additional parameters are passed unmodified to qmake. |
64 |
eqmake4() { |
75 |
eqmake4() { |
65 |
local LOGFILE="${T}/qmake-$$.out" |
76 |
local LOGFILE="${T}/qmake-$$.out" |
66 |
local projprofile="${1}" |
77 |
local projprofile="${1}" |
67 |
[ -z ${projprofile} ] && projprofile="${PN}.pro" |
78 |
[[ -z ${projprofile} ]] && projprofile="${PN}.pro" |
68 |
shift 1 |
79 |
shift 1 |
69 |
|
80 |
|
70 |
ebegin "Processing qmake ${projprofile}" |
81 |
ebegin "Processing qmake ${projprofile}" |
71 |
|
82 |
|
72 |
# file exists? |
83 |
# file exists? |
73 |
if [ ! -f ${projprofile} ]; then |
84 |
if [[ ! -f ${projprofile} ]]; then |
74 |
echo |
85 |
echo |
75 |
eerror "Project .pro file \"${projprofile}\" does not exists" |
86 |
eerror "Project .pro file \"${projprofile}\" does not exists" |
76 |
eerror "qmake cannot handle non-existing .pro files" |
87 |
eerror "qmake cannot handle non-existing .pro files" |
Lines 86-94
Link Here
|
86 |
|
97 |
|
87 |
# as a workaround for broken qmake, put everything into file |
98 |
# as a workaround for broken qmake, put everything into file |
88 |
if has debug ${IUSE} && use debug; then |
99 |
if has debug ${IUSE} && use debug; then |
89 |
echo -e "$CONFIG -= release\nCONFIG += no_fixpath debug" >> ${projprofile} |
100 |
echo -e "CONFIG -= release\nCONFIG += no_fixpath debug" >> ${projprofile} |
90 |
else |
101 |
else |
91 |
echo -e "$CONFIG -= debug\nCONFIG += no_fixpath release" >> ${projprofile} |
102 |
echo -e "CONFIG -= debug\nCONFIG += no_fixpath release" >> ${projprofile} |
92 |
fi |
103 |
fi |
93 |
|
104 |
|
94 |
/usr/bin/qmake ${projprofile} \ |
105 |
/usr/bin/qmake ${projprofile} \ |
Lines 110-116
Link Here
|
110 |
eend ${result} |
121 |
eend ${result} |
111 |
|
122 |
|
112 |
# was qmake successful? |
123 |
# was qmake successful? |
113 |
if [ ${result} -ne 0 ]; then |
124 |
if [[ ${result} -ne 0 ]]; then |
114 |
echo |
125 |
echo |
115 |
eerror "Running qmake on \"${projprofile}\" has failed" |
126 |
eerror "Running qmake on \"${projprofile}\" has failed" |
116 |
echo |
127 |
echo |