From owner-svn-ports-head@FreeBSD.ORG Mon Sep 9 01:01:19 2013 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 88B198D1; Mon, 9 Sep 2013 01:01:19 +0000 (UTC) (envelope-from rakuco@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 767EA2A80; Mon, 9 Sep 2013 01:01:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8911JRM002634; Mon, 9 Sep 2013 01:01:19 GMT (envelope-from rakuco@svn.freebsd.org) Received: (from rakuco@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8911JSe002632; Mon, 9 Sep 2013 01:01:19 GMT (envelope-from rakuco@svn.freebsd.org) Message-Id: <201309090101.r8911JSe002632@svn.freebsd.org> From: Raphael Kubo da Costa Date: Mon, 9 Sep 2013 01:01:19 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r326778 - in head/devel/qt4-corelib: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Sep 2013 01:01:19 -0000 Author: rakuco Date: Mon Sep 9 01:01:18 2013 New Revision: 326778 URL: http://svnweb.freebsd.org/changeset/ports/326778 Log: Add an upstream commit to fix libc++-related issues. This should fix the build of unit tests in x11/kdelibs4 with clang and libc++, as reported in [1]. Bump PORTREVISION, as this changes an installed header. [1] http://lists.freebsd.org/pipermail/freebsd-ports/2013-September/085821.html Added: head/devel/qt4-corelib/files/patch-git_8d33f67 (contents, props changed) Modified: head/devel/qt4-corelib/Makefile Modified: head/devel/qt4-corelib/Makefile ============================================================================== --- head/devel/qt4-corelib/Makefile Mon Sep 9 00:53:36 2013 (r326777) +++ head/devel/qt4-corelib/Makefile Mon Sep 9 01:01:18 2013 (r326778) @@ -3,7 +3,7 @@ PORTNAME= corelib DISTVERSION= ${QT4_VERSION} -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES?= devel PKGNAMEPREFIX= qt4- Added: head/devel/qt4-corelib/files/patch-git_8d33f67 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/qt4-corelib/files/patch-git_8d33f67 Mon Sep 9 01:01:18 2013 (r326778) @@ -0,0 +1,81 @@ +From 8d33f673d3aaa7107c8e86d6591bd3f077f0313d Mon Sep 17 00:00:00 2001 +From: Raphael Kubo da Costa +Date: Fri, 10 May 2013 04:08:38 +0300 +Subject: [PATCH] Special-case the forward declaration of STL types for libc++. + +This is somewhat of a follow-up to 5210d47aa66214e3cb16f394d0510a91f770c1b1. +libc++ declares the STL types in an inline namespace within the "std" one if +clang is used. + +If one includes a header such as before a Qt one and builds with +QT_NO_STL, the following ends up happening: + + // + namespace std { + inline namespace __1 { + struct random_access_iterator ... ; + } + } + + // qiterator.h + #ifdef QT_NO_STL + namespace std { + struct random_access_iterator; + } + #endif + +qiterator.h's declaration shadows the original one, and the compiler +complains random_access_iterator lacks an actual declaration. + +Solve this by checking for libc++ and forward-declaring the iterator types +we need within the same inline namespace. + +Not backported from qtbase because QT_NO_STL does not exist in Qt 5. + +Change-Id: I6742d540f6538a30aa060a4447c288cfb9cd781d +Reviewed-by: Thiago Macieira +--- + src/corelib/tools/qiterator.h | 23 +++++++++++++++++++++++ + 1 file changed, 23 insertions(+) + +diff --git a/src/corelib/tools/qiterator.h b/src/corelib/tools/qiterator.h +index c859d37..54c331e 100644 +--- src/corelib/tools/qiterator.h ++++ src/corelib/tools/qiterator.h +@@ -47,10 +47,33 @@ + QT_BEGIN_HEADER + + #ifdef QT_NO_STL ++# include // No-op, indirectly include additional configuration headers. ++# if defined(_LIBCPP_VERSION) ++// libc++ may declare these structs in an inline namespace. Forward-declare ++// these iterators in the same namespace so that we do not shadow the original ++// declarations. ++ ++// Tell clang not to warn about the use of inline namespaces when not building ++// in C++11 mode. ++# if defined(Q_CC_CLANG) ++# pragma GCC diagnostic push ++# pragma GCC diagnostic ignored "-Wc++11-extensions" ++# endif ++ ++_LIBCPP_BEGIN_NAMESPACE_STD ++ struct bidirectional_iterator_tag; ++ struct random_access_iterator_tag; ++_LIBCPP_END_NAMESPACE_STD ++ ++# if defined(Q_CC_CLANG) ++# pragma GCC diagnostic pop ++# endif ++# else + namespace std { + struct bidirectional_iterator_tag; + struct random_access_iterator_tag; + } ++# endif + #endif + + QT_BEGIN_NAMESPACE +-- +1.8.4 +