From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-739796-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	by finch.gentoo.org (Postfix) with ESMTP id C880B1387FF
	for <garchives@archives.gentoo.org>; Mon, 20 Oct 2014 23:50:47 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 131F4E06FE;
	Mon, 20 Oct 2014 23:50:46 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id BBD1BE06FE
	for <gentoo-commits@lists.gentoo.org>; Mon, 20 Oct 2014 23:50:45 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 9E70C3404D1
	for <gentoo-commits@lists.gentoo.org>; Mon, 20 Oct 2014 23:50:44 +0000 (UTC)
Received: from localhost.localdomain (localhost [127.0.0.1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 2D73A85A6
	for <gentoo-commits@lists.gentoo.org>; Mon, 20 Oct 2014 23:50:43 +0000 (UTC)
From: "Davide Pesavento" <pesa@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Davide Pesavento" <pesa@gentoo.org>
Message-ID: <1413848970.a9c4dc873d09da96d3d54f72aa8f1901861208eb.pesa@gentoo>
Subject: [gentoo-commits] proj/qt:master commit in: eclass/
X-VCS-Repository: proj/qt
X-VCS-Files: eclass/qt4-build-multilib.eclass
X-VCS-Directories: eclass/
X-VCS-Committer: pesa
X-VCS-Committer-Name: Davide Pesavento
X-VCS-Revision: a9c4dc873d09da96d3d54f72aa8f1901861208eb
X-VCS-Branch: master
Date: Mon, 20 Oct 2014 23:50:43 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Archives-Salt: f9f9d486-0a57-494f-a88a-9fd018dcdaec
X-Archives-Hash: 806ddb37d656f996e18ff23c113ba8e2

commit:     a9c4dc873d09da96d3d54f72aa8f1901861208eb
Author:     Davide Pesavento <pesa <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 20 23:49:30 2014 +0000
Commit:     Davide Pesavento <pesa <AT> gentoo <DOT> org>
CommitDate: Mon Oct 20 23:49:30 2014 +0000
URL:        http://sources.gentoo.org/gitweb/?p=proj/qt.git;a=commit;h=a9c4dc87

[qt4-build-multilib.eclass] Make qt4_symlink_tools_to_build_dir more similar to the qt5 version.

---
 eclass/qt4-build-multilib.eclass | 23 ++++++++++++++---------
 1 file changed, 14 insertions(+), 9 deletions(-)

diff --git a/eclass/qt4-build-multilib.eclass b/eclass/qt4-build-multilib.eclass
index 338e050..9d25622 100644
--- a/eclass/qt4-build-multilib.eclass
+++ b/eclass/qt4-build-multilib.eclass
@@ -269,9 +269,7 @@ qt4-build-multilib_src_prepare() {
 qt4_multilib_src_configure() {
 	qt4_prepare_env
 
-	if [[ ${PN} != qtcore ]]; then
-		qt4_symlink_tools_to_build_dir
-	fi
+	qt4_symlink_tools_to_build_dir
 
 	# toolchain setup
 	tc-export CC CXX OBJCOPY STRIP
@@ -519,16 +517,23 @@ qt4_foreach_target_subdir() {
 # @FUNCTION: qt4_symlink_tools_to_build_dir
 # @INTERNAL
 # @DESCRIPTION:
-# Symlinks qtcore tools to BUILD_DIR, so they can be used during compilation.
+# Symlinks qtcore tools to BUILD_DIR,
+# so that they can be used when building other modules.
 qt4_symlink_tools_to_build_dir() {
+	local tool= tools=()
+	if [[ ${PN} != qtcore ]]; then
+		tools+=(qmake moc rcc uic)
+	fi
+
 	mkdir -p "${BUILD_DIR}"/bin || die
+	pushd "${BUILD_DIR}"/bin >/dev/null || die
 
-	local bin
-	for bin in "${QT4_BINDIR}"/{qmake,moc,rcc,uic}; do
-		if [[ -e ${bin} ]]; then
-			ln -s "${bin}" "${BUILD_DIR}"/bin/ || die "failed to symlink ${bin}"
-		fi
+	for tool in "${tools[@]}"; do
+		[[ -e ${QT4_BINDIR}/${tool} ]] || continue
+		ln -s "${QT4_BINDIR}/${tool}" . || die "failed to symlink ${tool}"
 	done
+
+	popd >/dev/null || die
 }
 
 # @FUNCTION: qt4_qmake