[109576] trunk/dports/aqua/qt4-mac

jeremyhu at macports.org jeremyhu at macports.org
Sat Aug 17 11:12:27 PDT 2013


Revision: 109576
          https://trac.macports.org/changeset/109576
Author:   jeremyhu at macports.org
Date:     2013-08-17 11:12:27 -0700 (Sat, 17 Aug 2013)
Log Message:
-----------
qt4-mac: Some stabs at fixing build failures with libc++

Modified Paths:
--------------
    trunk/dports/aqua/qt4-mac/Portfile

Added Paths:
-----------
    trunk/dports/aqua/qt4-mac/files/patch-libc++.diff

Modified: trunk/dports/aqua/qt4-mac/Portfile
===================================================================
--- trunk/dports/aqua/qt4-mac/Portfile	2013-08-17 18:01:33 UTC (rev 109575)
+++ trunk/dports/aqua/qt4-mac/Portfile	2013-08-17 18:12:27 UTC (rev 109576)
@@ -234,6 +234,12 @@
 patchfiles-append   \
     patch-tools_macdeployqt_shared_shared.cpp.diff
 
+# (24) Fix build against libc++ (eg: Mavericks)
+#      TODO: More changes needed
+
+patchfiles-append   \
+    patch-libc++.diff
+
 ###############################################
 
 # disable CCACHE for now (ticket #34856)

Added: trunk/dports/aqua/qt4-mac/files/patch-libc++.diff
===================================================================
--- trunk/dports/aqua/qt4-mac/files/patch-libc++.diff	                        (rev 0)
+++ trunk/dports/aqua/qt4-mac/files/patch-libc++.diff	2013-08-17 18:12:27 UTC (rev 109576)
@@ -0,0 +1,71 @@
+From 48baeef0766ba145d26d374561e152b40245f3b8 Mon Sep 17 00:00:00 2001
+From: Bradley T. Hughes <bradley.hughes at nokia.com>
+Date: Wed, 30 May 2012 11:49:40 +0200
+Subject: [PATCH] Compile with clang's libc++
+
+An overload for std::swap() what works with std::pair<A,B> is included
+in libc++ (but not libstdc++). Avoid ambiguity in HashTable.h by
+omitting the version there and using the std::swap() version.
+
+Collector.cpp needs to include pthread.h directly, as it is not
+automatically included by libc++'s headers (libstdc++ does pull in
+pthread.h though).
+
+Change-Id: I20ffe5a745900d1cfa1e489ebf4376e454eded5f
+Reviewed-by: Kent Hansen <kent.hansen at nokia.com>
+Reviewed-by: Thiago Macieira <thiago.macieira at intel.com>
+---
+ .../JavaScriptCore/runtime/Collector.cpp           |    2 ++
+ .../javascriptcore/JavaScriptCore/wtf/HashTable.h  |    4 ++--
+ 2 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp
+index a7744dd..36269ff 100644
+--- src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp
++++ src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp
+@@ -52,6 +52,8 @@
+ #include <mach/task.h>
+ #include <mach/thread_act.h>
+ #include <mach/vm_map.h>
++// clang's libc++ headers does not pull in pthread.h (but libstdc++ does)
++#include <pthread.h>
+ 
+ #elif OS(WINDOWS)
+ 
+diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/HashTable.h b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/HashTable.h
+index bea9daa..42a9233 100644
+--- src/3rdparty/javascriptcore/JavaScriptCore/wtf/HashTable.h
++++ src/3rdparty/javascriptcore/JavaScriptCore/wtf/HashTable.h
+@@ -257,8 +257,8 @@ namespace WTF {
+ 
+     using std::swap;
+ 
+-#if !COMPILER(MSVC) && !OS(QNX)
+-    // The Dinkumware C++ library (used by MSVC and QNX) has a swap for pairs defined.
++#if !COMPILER(MSVC) && !OS(QNX) && !defined(_LIBCPP_VERSION)
++    // The Dinkumware C++ library (used by MSVC and QNX) and clang's libc++ have a swap for pairs defined.
+ 
+     // swap pairs by component, in case of pair members that specialize swap
+     template<typename T, typename U> inline void swap(pair<T, U>& a, pair<T, U>& b)
+-- 
+1.7.1
+
+
+And others...
+
+--- src/3rdparty/webkit/Source/JavaScriptCore/wtf/NullPtr.h.orig	2013-08-17 10:21:40.000000000 -0700
++++ src/3rdparty/webkit/Source/JavaScriptCore/wtf/NullPtr.h	2013-08-17 10:54:22.000000000 -0700
+@@ -31,11 +31,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBI
+ // nullptr_t type and nullptr object. They are defined in the same namespaces they
+ // would be in compiler and library that had the support.
+ 
+-#ifndef __has_feature
+-    #define __has_feature(feature) 0
+-#endif
+-
+-#if __has_feature(cxx_nullptr) || (GCC_VERSION_AT_LEAST(4, 6, 0) && defined(__GXX_EXPERIMENTAL_CXX0X__)) || (defined(_MSC_VER) && _MSC_VER >= 1600 && !COMPILER(INTEL))
++// <rdar://problem/14765535>
++#include <cstddef>
++#if defined(_LIBCPP_VERSION) || (GCC_VERSION_AT_LEAST(4, 6, 0) && defined(__GXX_EXPERIMENTAL_CXX0X__)) || (defined(_MSC_VER) && _MSC_VER >= 1600 && !COMPILER(INTEL))
+ 
+ #define HAVE_NULLPTR 1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130817/6d3c1035/attachment.html>


More information about the macports-changes mailing list