Gentoo Archives: gentoo-commits

From: Davide Pesavento <pesa@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/qt:master commit in: eclass/
Date: Fri, 29 Aug 2014 23:01:24
Message-Id: 1409353040.279a71a89cea2e9774cf6d465f05e5c82709bc2e.pesa@gentoo
1 commit: 279a71a89cea2e9774cf6d465f05e5c82709bc2e
2 Author: Davide Pesavento <pesa <AT> gentoo <DOT> org>
3 AuthorDate: Fri Aug 29 22:57:20 2014 +0000
4 Commit: Davide Pesavento <pesa <AT> gentoo <DOT> org>
5 CommitDate: Fri Aug 29 22:57:20 2014 +0000
6 URL: http://sources.gentoo.org/gitweb/?p=proj/qt.git;a=commit;h=279a71a8
7
8 [qt5-build.eclass] Make qt5_symlink_tools_to_build_dir() slightly smarter.
9
10 With the new behavior, we no longer symlink the tools that are about to
11 be built. For example, uic is not symlinked when emerging qtwidgets.
12
13 ---
14 eclass/qt5-build.eclass | 21 ++++++++++++++-------
15 1 file changed, 14 insertions(+), 7 deletions(-)
16
17 diff --git a/eclass/qt5-build.eclass b/eclass/qt5-build.eclass
18 index 226c17a..596e4bd 100644
19 --- a/eclass/qt5-build.eclass
20 +++ b/eclass/qt5-build.eclass
21 @@ -423,16 +423,23 @@ qt5_foreach_target_subdir() {
22 # Symlinks qmake and a few other tools to QT5_BUILD_DIR,
23 # so that they can be used when building other modules.
24 qt5_symlink_tools_to_build_dir() {
25 - mkdir -p "${QT5_BUILD_DIR}"/bin || die
26 + local tool= tools=()
27 + if [[ ${PN} != qtcore ]]; then
28 + tools+=(qmake moc rcc qlalr)
29 + [[ ${PN} != qdoc ]] && tools+=(qdoc)
30 + [[ ${PN} != qtdbus ]] && tools+=(qdbuscpp2xml qdbusxml2cpp)
31 + [[ ${PN} != qtwidgets ]] && tools+=(uic)
32 + fi
33
34 - [[ ${PN} == qtcore ]] && return
35 + mkdir -p "${QT5_BUILD_DIR}"/bin || die
36 + pushd "${QT5_BUILD_DIR}"/bin >/dev/null || die
37
38 - local bin
39 - for bin in "${QT5_BINDIR}"/{qmake,moc,rcc,qlalr,uic,qdbuscpp2xml,qdbusxml2cpp,qdoc}; do
40 - if [[ -e ${bin} ]]; then
41 - ln -s "${bin}" "${QT5_BUILD_DIR}"/bin || die "failed to symlink ${bin}"
42 - fi
43 + for tool in "${tools[@]}"; do
44 + [[ -e ${QT5_BINDIR}/${tool} ]] || continue
45 + ln -s "${QT5_BINDIR}/${tool}" . || die "failed to symlink ${tool}"
46 done
47 +
48 + popd >/dev/null || die
49 }
50
51 # @FUNCTION: qt5_base_configure