Lines 1-6
Link Here
|
1 |
# Copyright 2005 Gentoo Foundation |
1 |
# Copyright 2005-2007 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.18 2007/06/20 11:57:28 caleb Exp $ |
3 |
# $Header: /var/cvsroot/gentoo-x86/eclass/qt4.eclass,v 1.4 2006/08/16 12:20:15 caleb Exp $ |
4 |
# |
4 |
# |
5 |
# Author Caleb Tennis <caleb@gentoo.org> |
5 |
# Author Caleb Tennis <caleb@gentoo.org> |
6 |
# |
6 |
# |
Lines 13-19
Link Here
|
13 |
# 08.16.06 - Renamed qt_min_* to qt4_min_* to avoid conflicts with the qt3 eclass. |
13 |
# 08.16.06 - Renamed qt_min_* to qt4_min_* to avoid conflicts with the qt3 eclass. |
14 |
# - Caleb Tennis <caleb@gentoo.org> |
14 |
# - Caleb Tennis <caleb@gentoo.org> |
15 |
|
15 |
|
16 |
inherit versionator eutils |
16 |
inherit eutils versionator toolchain-funcs |
|
|
17 |
|
18 |
IUSE="${IUSE} debug" |
17 |
|
19 |
|
18 |
QTPKG="x11-libs/qt-" |
20 |
QTPKG="x11-libs/qt-" |
19 |
QT4MAJORVERSIONS="4.3 4.2 4.1 4.0" |
21 |
QT4MAJORVERSIONS="4.3 4.2 4.1 4.0" |
Lines 51-63
Link Here
|
51 |
echo "${VERSIONS}" |
53 |
echo "${VERSIONS}" |
52 |
} |
54 |
} |
53 |
|
55 |
|
54 |
EXPORT_FUNCTIONS pkg_setup |
|
|
55 |
|
56 |
qt4_pkg_setup() { |
56 |
qt4_pkg_setup() { |
57 |
for x in $QT4_BUILT_WITH_USE_CHECK; do |
57 |
if use debug && ! built_with_use qt debug; then |
58 |
if ! built_with_use =x11-libs/qt-4* $x; then |
58 |
einfo |
59 |
die "This package requires Qt4 to be built with the ${x} use flag." |
59 |
einfo "You are trying to compile ${PN} package with active USE=\"debug\"" |
60 |
fi |
60 |
einfo "while qt4 is build without this particular flag. It will not" |
61 |
done |
61 |
einfo "work." |
62 |
|
62 |
einfo |
|
|
63 |
einfo "Possible solutions to this problem are:" |
64 |
einfo "a) install package ${PN} without debug USE flag" |
65 |
einfo "b) re-emerge qt4 with debug USE flag" |
66 |
einfo |
67 |
|
68 |
die "can't emerge ${PN} with debug USE flag" |
69 |
fi |
63 |
} |
70 |
} |
|
|
71 |
|
72 |
eqmake4() { |
73 |
local projprofile="${1}" |
74 |
[ -z ${projprofile} ] && projprofile="${PN}.pro" |
75 |
|
76 |
einfo "Processing qmake ${projprofile}" |
77 |
|
78 |
# file exists? |
79 |
if [[ ! -f ${projprofile} ]]; then |
80 |
echo |
81 |
eerror "Project pro file \"${projprofile}\" does not exists" |
82 |
eerror "qmake cannot handle non-existing pro files" |
83 |
echo |
84 |
eerror "This shouldn't happen - send a bug report to bugs.gentoo.org" |
85 |
echo |
86 |
die "non existing pro file in ${PN} sources" |
87 |
fi |
88 |
|
89 |
# as a workaround for broken qmake, put everything into file |
90 |
if use debug; then |
91 |
echo -e "$CONFIG -= release\nCONFIG += no_fixpath debug" >> ${projprofile} |
92 |
else |
93 |
echo -e "$CONFIG -= debug\nCONFIG += no_fixpath release" >> ${projprofile} |
94 |
fi |
95 |
|
96 |
# any special qmake options should be passed as a second eqmake parameter |
97 |
/usr/bin/qmake ${projprofile} \ |
98 |
QMAKE=/usr/bin/qmake \ |
99 |
QMAKE_CC=$(tc-getCC) \ |
100 |
QMAKE_CXX=$(tc-getCXX) \ |
101 |
QMAKE_LINK=$(tc-getCXX) \ |
102 |
QMAKE_CFLAGS_RELEASE="${CFLAGS}" \ |
103 |
QMAKE_CFLAGS_DEBUG="${CFLAGS}" \ |
104 |
QMAKE_CXXFLAGS_RELEASE="${CXXFLAGS}" \ |
105 |
QMAKE_CXXFLAGS_DEBUG="${CXXFLAGS}" \ |
106 |
QMAKE_LFLAGS_RELEASE="${LDFLAGS}" \ |
107 |
QMAKE_LFLAGS_DEBUG="${LDFLAGS}" \ |
108 |
QMAKE_RPATH= \ |
109 |
${2} |
110 |
|
111 |
local result=$? |
112 |
eend ${result} |
113 |
|
114 |
# successfull qmake? |
115 |
if [[ ${result} -ne 0 ]]; then |
116 |
echo |
117 |
eerror "Running qmake on \"${projprofile}\" has failed" |
118 |
echo |
119 |
eerror "This shouldn't happen - send a bug report to bugs.gentoo.org" |
120 |
echo |
121 |
die "qmake has failed on ${projprofile}" |
122 |
fi |
123 |
} |
124 |
|
125 |
EXPORT_FUNCTIONS pkg_setup |