1 |
caleb 07/12/31 18:55:54 |
2 |
|
3 |
Modified: qt4.eclass |
4 |
Log: |
5 |
In qt4_min_version, if we have EAPI >= 1, then use a slot dep to make the dependency much nicer/easier to look at. |
6 |
|
7 |
Also, in qt4_pkg_setup, if we are with Qt 4.4, do a little more scrutiny of the use flags since some use flags are not |
8 |
used anymore in Qt 4.4, and some are now split into other packages. |
9 |
|
10 |
Revision Changes Path |
11 |
1.31 eclass/qt4.eclass |
12 |
|
13 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/qt4.eclass?rev=1.31&view=markup |
14 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/qt4.eclass?rev=1.31&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/qt4.eclass?r1=1.30&r2=1.31 |
16 |
|
17 |
Index: qt4.eclass |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/eclass/qt4.eclass,v |
20 |
retrieving revision 1.30 |
21 |
retrieving revision 1.31 |
22 |
diff -u -r1.30 -r1.31 |
23 |
--- qt4.eclass 19 Dec 2007 18:07:47 -0000 1.30 |
24 |
+++ qt4.eclass 31 Dec 2007 18:55:53 -0000 1.31 |
25 |
@@ -1,6 +1,6 @@ |
26 |
# Copyright 2005 Gentoo Foundation |
27 |
# Distributed under the terms of the GNU General Public License v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/eclass/qt4.eclass,v 1.30 2007/12/19 18:07:47 caleb Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/eclass/qt4.eclass,v 1.31 2007/12/31 18:55:53 caleb Exp $ |
30 |
|
31 |
# @ECLASS: qt4.eclass |
32 |
# @MAINTAINER: |
33 |
@@ -28,9 +28,14 @@ |
34 |
# DEPEND="$(qt4_min_version 4.2)" |
35 |
# if package can be build with qt-4.2 or higher. |
36 |
qt4_min_version() { |
37 |
- echo "|| (" |
38 |
- qt4_min_version_list "$@" |
39 |
- echo ")" |
40 |
+ # This is much simpler for EAPI 1, we can use a slot dependency |
41 |
+ if [[ "${EAPI}" -ge 1 ]]; then |
42 |
+ echo ">=${QTPKG}${1}:4" |
43 |
+ else |
44 |
+ echo "|| (" |
45 |
+ qt4_min_version_list "$@" |
46 |
+ echo ")" |
47 |
+ fi |
48 |
} |
49 |
|
50 |
qt4_min_version_list() { |
51 |
@@ -72,10 +77,42 @@ |
52 |
# - QT4_OPTIONAL_BUILT_WITH_USE_CHECK - qt4 flags that provides some |
53 |
# functionality, but can alternatively be disabled in ${CATEGORY}/${PN} |
54 |
# (so qt4 don't have to be recompiled) |
55 |
+# |
56 |
+# flags to watch for for Qt4.4: |
57 |
+# zlib png | opengl dbus qt3support | sqlite3 ssl |
58 |
qt4_pkg_setup() { |
59 |
+ |
60 |
+ QT4_BEST_VERSION="$(best_version =x11-libs/qt-4*)" |
61 |
+ QT4_MINOR_VERSION="$(get_version_component_range 2 ${QT4_BEST_VERSION/*qt-/})" |
62 |
+ |
63 |
local requiredflags="" |
64 |
for x in ${QT4_BUILT_WITH_USE_CHECK}; do |
65 |
- if ! built_with_use =x11-libs/qt-4* ${x}; then |
66 |
+ if [[ "${QT4_MINOR_VERSION}" -ge 4 ]]; then |
67 |
+ # The use flags are different in 4.4 and above, and it's a split package, so this is used to catch |
68 |
+ # the various use flag combos specified in the ebuilds to make sure we don't error out. |
69 |
+ |
70 |
+ if [[ ${x} == zlib || ${x} == png ]]; then |
71 |
+ # Qt 4.4+ is built with zlib and png by default, so the use flags aren't needed |
72 |
+ continue; |
73 |
+ elif [[ ${x} == opengl || ${x} == dbus || ${x} == qt3support ]]; then |
74 |
+ # Make sure the qt-${x} package has been already installed |
75 |
+ |
76 |
+ if ! has_version x11-libs/qt-${x}; then |
77 |
+ eerror "You must first install the x11-libs/qt-${x} package." |
78 |
+ die |
79 |
+ fi |
80 |
+ elif [ ${x} == ssl ]; then |
81 |
+ if [ ! has_version x11-libs/qt-core || ! built_with_use x11-libs/qt-core ssl ]; then |
82 |
+ eerror "You must first install the x11-libs/qt-core package with the ssl flag enabled." |
83 |
+ die |
84 |
+ fi |
85 |
+ elif [ ${x} == sqlite3 ]; then |
86 |
+ if [ ! has_version x11-libs/qt-sql || ! built_with_use x11-libs/qt-sql sqlite ]; then |
87 |
+ eerror "You must first install the x11-libs/qt-sql package with the sqlite flag enabled." |
88 |
+ die |
89 |
+ fi |
90 |
+ fi |
91 |
+ elif ! built_with_use =x11-libs/qt-4* ${x}; then |
92 |
requiredflags="${requiredflags} ${x}" |
93 |
fi |
94 |
done |
95 |
|
96 |
|
97 |
|
98 |
-- |
99 |
gentoo-commits@g.o mailing list |