1 |
commit: 8150517e34f5b825bc3ba8216a0682a9a44cce94 |
2 |
Author: Davide Pesavento <pesa <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Aug 27 02:05:06 2014 +0000 |
4 |
Commit: Davide Pesavento <pesa <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Aug 27 02:05:06 2014 +0000 |
6 |
URL: http://sources.gentoo.org/gitweb/?p=proj/qt.git;a=commit;h=8150517e |
7 |
|
8 |
[qt5-build.eclass] Don't symlink tools for non-qtbase packages. |
9 |
|
10 |
Just run qmake directly from QT5_BINDIR. |
11 |
|
12 |
--- |
13 |
eclass/qt5-build.eclass | 35 +++++++++++++++++++++-------------- |
14 |
1 file changed, 21 insertions(+), 14 deletions(-) |
15 |
|
16 |
diff --git a/eclass/qt5-build.eclass b/eclass/qt5-build.eclass |
17 |
index 18218df..226c17a 100644 |
18 |
--- a/eclass/qt5-build.eclass |
19 |
+++ b/eclass/qt5-build.eclass |
20 |
@@ -163,11 +163,13 @@ qt5-build_src_unpack() { |
21 |
|
22 |
# @FUNCTION: qt5-build_src_prepare |
23 |
# @DESCRIPTION: |
24 |
-# Prepares the sources before the configure phase. |
25 |
+# Prepares the environment and patches the sources if necessary. |
26 |
qt5-build_src_prepare() { |
27 |
qt5_prepare_env |
28 |
|
29 |
if [[ ${QT5_MODULE} == qtbase ]]; then |
30 |
+ qt5_symlink_tools_to_build_dir |
31 |
+ |
32 |
# Avoid unnecessary qmake recompilations |
33 |
sed -i -re "s|^if true;.*(\[ '\!').*(\"\\\$outpath/bin/qmake\".*)|if \1 -e \2 then|" \ |
34 |
configure || die "sed failed (skip qmake bootstrap)" |
35 |
@@ -191,10 +193,6 @@ qt5-build_src_prepare() { |
36 |
|| die "sed failed (config.tests)" |
37 |
fi |
38 |
|
39 |
- if [[ ${PN} != qtcore ]]; then |
40 |
- qt5_symlink_tools_to_build_dir |
41 |
- fi |
42 |
- |
43 |
# apply patches |
44 |
[[ ${PATCHES[@]} ]] && epatch "${PATCHES[@]}" |
45 |
epatch_user |
46 |
@@ -202,7 +200,8 @@ qt5-build_src_prepare() { |
47 |
|
48 |
# @FUNCTION: qt5-build_src_configure |
49 |
# @DESCRIPTION: |
50 |
-# Runs qmake, possibly preceded by ./configure. |
51 |
+# Runs qmake in the target directories. For packages |
52 |
+# in qtbase, ./configure is also run before qmake. |
53 |
qt5-build_src_configure() { |
54 |
if [[ ${QT5_MODULE} == qtbase ]]; then |
55 |
qt5_base_configure |
56 |
@@ -213,14 +212,14 @@ qt5-build_src_configure() { |
57 |
|
58 |
# @FUNCTION: qt5-build_src_compile |
59 |
# @DESCRIPTION: |
60 |
-# Compiles the code in target directories. |
61 |
+# Runs emake in the target directories. |
62 |
qt5-build_src_compile() { |
63 |
qt5_foreach_target_subdir emake |
64 |
} |
65 |
|
66 |
# @FUNCTION: qt5-build_src_test |
67 |
# @DESCRIPTION: |
68 |
-# Runs tests in target directories. |
69 |
+# Runs tests in the target directories. |
70 |
qt5-build_src_test() { |
71 |
echo ">>> Test phase [QtTest]: ${CATEGORY}/${PF}" |
72 |
|
73 |
@@ -252,7 +251,7 @@ qt5-build_src_test() { |
74 |
|
75 |
# @FUNCTION: qt5-build_src_install |
76 |
# @DESCRIPTION: |
77 |
-# Performs the actual installation of target directories. |
78 |
+# Runs emake install in the target directories. |
79 |
qt5-build_src_install() { |
80 |
qt5_foreach_target_subdir emake INSTALL_ROOT="${D}" install |
81 |
|
82 |
@@ -421,14 +420,17 @@ qt5_foreach_target_subdir() { |
83 |
# @FUNCTION: qt5_symlink_tools_to_build_dir |
84 |
# @INTERNAL |
85 |
# @DESCRIPTION: |
86 |
-# Symlinks qtcore tools to QT5_BUILD_DIR, so they can be used when building other modules. |
87 |
+# Symlinks qmake and a few other tools to QT5_BUILD_DIR, |
88 |
+# so that they can be used when building other modules. |
89 |
qt5_symlink_tools_to_build_dir() { |
90 |
mkdir -p "${QT5_BUILD_DIR}"/bin || die |
91 |
|
92 |
+ [[ ${PN} == qtcore ]] && return |
93 |
+ |
94 |
local bin |
95 |
- for bin in "${QT5_BINDIR}"/{qmake,moc,rcc,uic,qdoc,qdbuscpp2xml,qdbusxml2cpp}; do |
96 |
+ for bin in "${QT5_BINDIR}"/{qmake,moc,rcc,qlalr,uic,qdbuscpp2xml,qdbusxml2cpp,qdoc}; do |
97 |
if [[ -e ${bin} ]]; then |
98 |
- ln -s "${bin}" "${QT5_BUILD_DIR}"/bin/ || die "failed to symlink ${bin}" |
99 |
+ ln -s "${bin}" "${QT5_BUILD_DIR}"/bin || die "failed to symlink ${bin}" |
100 |
fi |
101 |
done |
102 |
} |
103 |
@@ -586,7 +588,6 @@ qt5_base_configure() { |
104 |
"${myconf[@]}" |
105 |
) |
106 |
|
107 |
- mkdir -p "${QT5_BUILD_DIR}" || die |
108 |
pushd "${QT5_BUILD_DIR}" >/dev/null || die |
109 |
|
110 |
einfo "Configuring with: ${conf[@]}" |
111 |
@@ -602,8 +603,14 @@ qt5_base_configure() { |
112 |
# Intended to be called by qt5_foreach_target_subdir(). |
113 |
qt5_qmake() { |
114 |
local projectdir=${PWD/#${QT5_BUILD_DIR}/${S}} |
115 |
+ local qmakepath= |
116 |
+ if [[ ${QT5_MODULE} == qtbase ]]; then |
117 |
+ qmakepath=${QT5_BUILD_DIR}/bin |
118 |
+ else |
119 |
+ qmakepath=${QT5_BINDIR} |
120 |
+ fi |
121 |
|
122 |
- "${QT5_BUILD_DIR}"/bin/qmake \ |
123 |
+ "${qmakepath}"/qmake \ |
124 |
QMAKE_AR="$(tc-getAR) cqs" \ |
125 |
QMAKE_CC="$(tc-getCC)" \ |
126 |
QMAKE_LINK_C="$(tc-getCC)" \ |