From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org)
	by finch.gentoo.org with esmtp (Exim 4.60)
	(envelope-from <gentoo-commits+bounces-453103-garchives=archives.gentoo.org@lists.gentoo.org>)
	id 1SNOX2-00070H-TP
	for garchives@archives.gentoo.org; Thu, 26 Apr 2012 13:14:49 +0000
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 1CED2E066E;
	Thu, 26 Apr 2012 13:14:42 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	by pigeon.gentoo.org (Postfix) with ESMTP id E5152E066E
	for <gentoo-commits@lists.gentoo.org>; Thu, 26 Apr 2012 13:14:41 +0000 (UTC)
Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163])
	(using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 544781B402B
	for <gentoo-commits@lists.gentoo.org>; Thu, 26 Apr 2012 13:14:41 +0000 (UTC)
Received: from localhost.localdomain (localhost [127.0.0.1])
	by hornbill.gentoo.org (Postfix) with ESMTP id 7E510E5402
	for <gentoo-commits@lists.gentoo.org>; Thu, 26 Apr 2012 13:06:25 +0000 (UTC)
From: "Davide Pesavento" <pesa@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Davide Pesavento" <pesa@gentoo.org>
Message-ID: <1335445556.50d2cfbb2709a8b3e641c1927f5a54942cb01749.pesa@gentoo>
Subject: [gentoo-commits] proj/qt:master commit in: eclass/
X-VCS-Repository: proj/qt
X-VCS-Files: eclass/qt4-build.eclass
X-VCS-Directories: eclass/
X-VCS-Committer: pesa
X-VCS-Committer-Name: Davide Pesavento
X-VCS-Revision: 50d2cfbb2709a8b3e641c1927f5a54942cb01749
X-VCS-Branch: master
Date: Thu, 26 Apr 2012 13:06:25 +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
Content-Transfer-Encoding: quoted-printable
X-Archives-Salt: 497a0428-f77e-4487-8dcd-db490eb6284c
X-Archives-Hash: ee3a3dea7fa66d8a4a3bb04a4e1f88d6

commit:     50d2cfbb2709a8b3e641c1927f5a54942cb01749
Author:     Davide Pesavento <davidepesa <AT> gmail <DOT> com>
AuthorDate: Thu Apr 26 13:05:56 2012 +0000
Commit:     Davide Pesavento <pesa <AT> gentoo <DOT> org>
CommitDate: Thu Apr 26 13:05:56 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=3Dproj/qt.git;a=3Dco=
mmit;h=3D50d2cfbb

[qt4-build.eclass] Sync with portage.

---
 eclass/qt4-build.eclass |   27 ++++++++++++++++++++++-----
 1 files changed, 22 insertions(+), 5 deletions(-)

diff --git a/eclass/qt4-build.eclass b/eclass/qt4-build.eclass
index 366629f..e27f19b 100644
--- a/eclass/qt4-build.eclass
+++ b/eclass/qt4-build.eclass
@@ -1,6 +1,6 @@
 # Copyright 1999-2012 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/qt4-build.eclass,v 1.125 2012/=
04/19 14:52:12 pesa Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/qt4-build.eclass,v 1.126 2012/=
04/25 17:43:50 grobian Exp $
=20
 # @ECLASS: qt4-build.eclass
 # @MAINTAINER:
@@ -504,21 +504,38 @@ qt4-build_src_test() {
 # being used, to avoid complications with some more or less stupid packa=
ges.
 fix_includes() {
 	if use aqua && [[ ${CHOST##*-darwin} -ge 9 ]]; then
+		local frw dest f h rdir
 		# Some packages tend to include <Qt/...>
 		dodir "${QTHEADERDIR#${EPREFIX}}"/Qt
=20
-		# Fake normal headers when frameworks are installed... eases life late=
r on
-		local dest f h
+		# Fake normal headers when frameworks are installed... eases life late=
r
+		# on, make sure we use relative links though, as some ebuilds assume
+		# these dirs exist in src_install to add additional files
+		f=3D${QTHEADERDIR}
+		h=3D${QTLIBDIR}
+		while [[ -n ${f} && ${f%%/*} =3D=3D ${h%%/*} ]] ; do
+			f=3D${f#*/}
+			h=3D${h#*/}
+		done
+		rdir=3D${h}
+		f=3D"../"
+		while [[ ${h} =3D=3D */* ]] ; do
+			f=3D"${f}../"
+			h=3D${h#*/}
+		done
+		rdir=3D"${f}${rdir}"
+
 		for frw in "${D}${QTLIBDIR}"/*.framework; do
 			[[ -e "${frw}"/Headers ]] || continue
 			f=3D$(basename ${frw})
 			dest=3D"${QTHEADERDIR#${EPREFIX}}"/${f%.framework}
-			dosym "${QTLIBDIR#${EPREFIX}}"/${f}/Headers "${dest}"
+			dosym "${rdir}"/${f}/Headers "${dest}"
=20
 			# Link normal headers as well.
 			for hdr in "${D}/${QTLIBDIR}/${f}"/Headers/*; do
 				h=3D$(basename ${hdr})
-				dosym "${QTLIBDIR#${EPREFIX}}"/${f}/Headers/${h} "${QTHEADERDIR#${EP=
REFIX}}"/Qt/${h}
+				dosym "../${rdir}"/${f}/Headers/${h} \
+					"${QTHEADERDIR#${EPREFIX}}"/Qt/${h}
 			done
 		done
 	fi