aboutsummaryrefslogtreecommitdiff
path: root/x11
diff options
context:
space:
mode:
authorRaphael Kubo da Costa <rakuco@FreeBSD.org>2012-07-18 20:23:09 +0000
committerRaphael Kubo da Costa <rakuco@FreeBSD.org>2012-07-18 20:23:09 +0000
commit9a18a279b6e8f055775a1d215688b240b17c5805 (patch)
treeb3ab1f734de31cfbeff966d01e06b365faf9146d /x11
parent27628fdfd887cfe3994f74b1c5cc55e029ed3137 (diff)
downloadports-9a18a279b6e8f055775a1d215688b240b17c5805.tar.gz
ports-9a18a279b6e8f055775a1d215688b240b17c5805.zip
Add my upstream patch to make these Qt ports build with libc++.
The original patch was written by Jan Beich in the PR mentioned below. I haven't been able to fully build x11/qt4-opengl yet due to other errors which show up later, but at least this one problem is solved, and the fix will be included in the next Qt 4.8 release. No PORTREVISION bump, as users of other standard C++ libraries are not affected, and no dependencies have been changed. PR: ports/169871 Submitted by: Jan Beich <jbeich@tormail.org>
Notes
Notes: svn path=/head/; revision=301122
Diffstat (limited to 'x11')
-rw-r--r--x11/qt4-opengl/files/patch-src__corelib__tools__qiterator.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/x11/qt4-opengl/files/patch-src__corelib__tools__qiterator.h b/x11/qt4-opengl/files/patch-src__corelib__tools__qiterator.h
new file mode 100644
index 000000000000..9a2a2ca2daa7
--- /dev/null
+++ b/x11/qt4-opengl/files/patch-src__corelib__tools__qiterator.h
@@ -0,0 +1,38 @@
+commit 5210d47aa66214e3cb16f394d0510a91f770c1b1
+Author: Raphael Kubo da Costa <rakuco@FreeBSD.org>
+Date: Mon Jul 16 23:39:07 2012 -0300
+
+ Only forward-declare some std classes if QT_NO_STL is defined.
+
+ If that is not done, building with clang, libc++ and C++11 support
+ does not work: libc++ defines the iterator tag classes in an inline
+ namespace inside the std namespace, and forward-declaring those
+ classes inside the std namespace itself in qiterator.h causes an
+ ambiguity that clang solves by choosing the incomplete-declared class
+ declared in the enclosing std namespace.
+
+ This is probably the "clang build problem" reported in commit
+ 19e2b4d6eb733d9fd4eb69c0622b699fd08a3203 to qtbase, which cannot be
+ directly cherry-picked without breaking other classes due to QT_NO_STL
+ still being present in Qt 4.
+
+ Change-Id: I26e33915347d3f94ef2e10b68fca6b2099ec9491
+ Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
+
+diff --git a/src/corelib/tools/qiterator.h b/src/corelib/tools/qiterator.h
+index 0747940..b9d8da6 100644
+--- ./src/corelib/tools/qiterator.h
++++ ./src/corelib/tools/qiterator.h
+@@ -46,10 +46,12 @@
+
+ QT_BEGIN_HEADER
+
++#ifdef QT_NO_STL
+ namespace std {
+ struct bidirectional_iterator_tag;
+ struct random_access_iterator_tag;
+ }
++#endif
+
+ QT_BEGIN_NAMESPACE
+