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

michaelld at macports.org michaelld at macports.org
Tue May 6 05:13:33 PDT 2014


Revision: 119772
          https://trac.macports.org/changeset/119772
Author:   michaelld at macports.org
Date:     2014-05-06 05:13:33 -0700 (Tue, 06 May 2014)
Log Message:
-----------
qt4-mac:
+ update to 4.8.6;
+ remove libWebKitSystemInterfaceMavericks.a since it is no longer needed;
+ remove unused patches and fix those remaining;
+ whitepsace here and there;
+ remove unused variants and related code;
+ +cxx11 variant to not work with Clang/libc++; this has been fixed in the Qt5 series, but is not simple to back-port.

Modified Paths:
--------------
    trunk/dports/aqua/qt4-mac/Portfile
    trunk/dports/aqua/qt4-mac/files/patch-QtHelp_10.4_only.diff
    trunk/dports/aqua/qt4-mac/files/patch-configure.diff
    trunk/dports/aqua/qt4-mac/files/patch-cxx11.diff
    trunk/dports/aqua/qt4-mac/files/patch-qmake_qmake.pri.diff
    trunk/dports/aqua/qt4-mac/files/patch-src_tools_bootstrap_bootstrap.pro.diff
    trunk/dports/aqua/qt4-mac/files/patch-tools_macdeployqt_shared_shared.cpp.diff

Removed Paths:
-------------
    trunk/dports/aqua/qt4-mac/files/patch-libc++.diff
    trunk/dports/aqua/qt4-mac/files/patch-src_3rdparty_clucene_src_CLucene_search_FieldCacheImpl.cpp.diff
    trunk/dports/aqua/qt4-mac/files/patch-src_3rdparty_webkit_Source_WebCore_WebCore.pro.diff
    trunk/dports/aqua/qt4-mac/files/patch-src_3rdparty_webkit_Source_WebCore_platform_Timer.cpp.diff
    trunk/dports/aqua/qt4-mac/files/patch-src_3rdparty_webkit_Source_WebCore_platform_Timer.h.diff
    trunk/dports/aqua/qt4-mac/files/patch-src_3rdparty_webkit_Source_WebCore_platform_network_qt_QNetworkReplyHandler.cpp.diff
    trunk/dports/aqua/qt4-mac/files/patch-src_3rdparty_webkit_Source_WebKit_qt_Api_qgraphicswebview.cpp.diff
    trunk/dports/aqua/qt4-mac/files/patch-src_3rdparty_webkit_Source_WebKit_qt_QtWebKit.pro.diff
    trunk/dports/aqua/qt4-mac/files/patch-src_3rdparty_webkit_Source_WebKit_qt_WebCoreSupport_NotificationPresenterClientQt.cpp.diff
    trunk/dports/aqua/qt4-mac/files/patch-src_corelib_global_qglobal.h.diff
    trunk/dports/aqua/qt4-mac/files/patch-src_plugins_bearer_corewlan_qcorewlanengine.mm.diff

Modified: trunk/dports/aqua/qt4-mac/Portfile
===================================================================
--- trunk/dports/aqua/qt4-mac/Portfile	2014-05-06 10:08:33 UTC (rev 119771)
+++ trunk/dports/aqua/qt4-mac/Portfile	2014-05-06 12:13:33 UTC (rev 119772)
@@ -15,8 +15,7 @@
 # so this port cannot conflict with it.
 #conflicts           qt3 qt3-mac qt4-mac-devel
 conflicts           qt3 qt3-mac
-version             4.8.5
-revision            1
+version             4.8.6
 set branch          [join [lrange [split ${version} .] 0 1] .]
 
 categories          aqua
@@ -31,18 +30,11 @@
                     cross-platform GUI-based applications.
 
 distname            qt-everywhere-opensource-src-${version}
-extract.only        ${distname}${extract.suffix}
 
-master_sites        http://download.qt-project.org/official_releases/qt/${branch}/${version}/  \
-    http://trac.webkit.org/export/158483/trunk/WebKitLibraries/ \
-    https://trac.macports.org/export/112811/trunk/dports/aqua/qt4-mac/files/
+master_sites        http://download.qt-project.org/official_releases/qt/${branch}/${version}/
 
-checksums           ${distname}${extract.suffix} \
-                    rmd160  1e7bb099d5d1cda0b663cebe207c846c8d04750d \
-                    sha256  eb728f8268831dc4373be6403b7dd5d5dde03c169ad6882f9a8cb560df6aa138 \
-                    libWebKitSystemInterfaceMavericks.a \
-                    rmd160  b99bb61b3c433811ffa0ce68cf92ce4d51eef433 \
-                    sha256  d5026704ae94ba6b2d6574aa35e61c83de8e2c256df1b95e4abb3495dca8f5f7
+checksums           rmd160  0220d4e76ac761c9ecfb8ddab6f2c1dc6ad70c33 \
+                    sha256  8b14dd91b52862e09b8e6a963507b74bc2580787d171feda197badfa7034032c
 
 minimum_xcodeversions   {8 2.5}
 
@@ -130,22 +122,22 @@
 
 patchfiles-append   patch-mkspecs_features_qt_functions.prf.diff
 
-# (7.1) (a) Change "gcc" and "g++" to @'s for replacement in
+# (8) (a) Change "gcc" and "g++" to @'s for replacement in
 # post-patch; (b) add hooks for C++11.
 
 patchfiles-append   patch-mkspecs_common_g++-base.conf.diff
 
-# (7.2) Add default QMake variables for Objective C++.
+# (9) Add default QMake variables for Objective C++.
 
 patchfiles-append   patch-mkspecs_objective_cxx.diff
 
-# (8) Add "absolute_library_soname" to the default CONFIG variables,
+# (10) Add "absolute_library_soname" to the default CONFIG variables,
 # so that when a DYLIB is created, if "target.path" is set for it then
 # that path is prepended to its "install_name".
 
 patchfiles-append   patch-mkspecs_macx-g++_qmake.conf.diff
 
-# (9) Add QT_INSTALL_FRAMEWORKS and related variables to QMake, to
+# (11) Add QT_INSTALL_FRAMEWORKS and related variables to QMake, to
 # provide a default variable for the location of QMake installed
 # frameworks.
 
@@ -155,14 +147,14 @@
     patch-src_corelib_global_qlibraryinfo.cpp.diff \
     patch-src_corelib_global_qlibraryinfo.h.diff
 
-# (10) In QMake, disable default MKSPECS and FEATURES path
+# (12) In QMake, disable default MKSPECS and FEATURES path
 # concatinations if the shell environment variable QMAKE_NO_DEFAULTS
 # is set (to anything); we use this variable in this portfile to make
 # sure only internal paths (to the build) are searched by QMake.
 
 patchfiles-append   patch-qmake_project.cpp.diff
 
-# (10.1) In QMake: (a) enable correct "-framework foo,bar" parsing as
+# (13) In QMake: (a) enable correct "-framework foo,bar" parsing as
 # specified by Apple's LD; (b) disable "/Library/Frameworks" as a
 # default search path; use "PREFIX/Library/Frameworks" and replace
 # PREFIX in post-patch.  Also set "PREFIX/lib" as a default library
@@ -170,46 +162,33 @@
 
 patchfiles-append   patch-qmake_generators_unix_unixmakke.cpp.diff
 
-# (11) Allow easy replacement of MACOSX_DEPLOYMENT_TARGET: build for
+# (14) Allow easy replacement of MACOSX_DEPLOYMENT_TARGET: build for
 # just the user's current OS.
 
 patchfiles-append   \
     patch-qmake_qmake.pri.diff \
     patch-src_tools_bootstrap_bootstrap.pro.diff
 
-# (12) fix use of CARBON, found on PPC64; does not hurt others
+# (15) fix use of CARBON, found on PPC64; does not hurt others
 
 patchfiles-append   \
     patch-src_3rdparty_webkit_Source_WebCore_plugins_PluginView.h.diff \
     patch-src_3rdparty_webkit_Source_WebCore_plugins_mac_PluginViewMac.mm.diff
 
-# (13) fix MKSPECS install location for WebKit; fix WebCore to handle
-# 32-bit compiling correctly on x86 and ppc
-
-patchfiles-append   \
-    patch-src_3rdparty_webkit_Source_WebKit_qt_QtWebKit.pro.diff
-
-# (14) fix the corewlan qmake file to use non-standard Developer SDK
+# (16) fix the corewlan qmake file to use non-standard Developer SDK
 # location under 10.6 and newer, e.g., for some developers doing both
 # iOS and OSX.  This patch does not change behavior for 10.4 or 10.5.
 # Also include fix to use the correct SDK.
 
 patchfiles-append   patch-src_plugins_bearer_corewlan_corewlan.pro.diff
 
-# (15) fix the corewlan source to work: this patch create a new
-# (primary) file qcorewlanengine.mm for 10.7 and newer APIs and a
-# secondary one qcorewlanengine_10_6.mm for 10.6 and older APIs.  The
-# primary file internally selects which one to use.
-
-patchfiles-append   patch-src_plugins_bearer_corewlan_qcorewlanengine.mm.diff
-
-# (16) Use the "target.path" for libdir for core libraries instead of
+# (17) Use the "target.path" for libdir for core libraries instead of
 # the standard QT_INSTALL_LIBS; allows us to set for library or
 # framework elsewhere and have the install still work here.
 
 patchfiles-append   patch-src_qbase.pri.diff
 
-# (17) (a) Disable explicit disabling of framework or static install;
+# (18) (a) Disable explicit disabling of framework or static install;
 # i.e., install as a framework if that mode is selected, and as
 # library otherwise. (b) If installing as framework, use the new
 # QT_INSTALL_FRAMEWORKS directory; otherwise, use the old
@@ -227,13 +206,13 @@
     patch-tools_designer_src_uitools_uitools.pro.diff \
     patch-mkspecs_features_uitools.prf.diff
 
-# (18) fix 'macdeployqt' to look for the correct plugins location by
+# (19) fix 'macdeployqt' to look for the correct plugins location by
 # default.  This is paired with a "reinplace" in post-patch
 
 patchfiles-append   \
     patch-tools_macdeployqt_macdeployqt_main.cpp.diff
 
-# (19) Under 10.4 only: patch QMake build files using just "-lQtHelp"
+# (20) Under 10.4 only: patch QMake build files using just "-lQtHelp"
 # to do "-lQtHelp -lQtCLucene -lQtNetwork -lQtWebKit" instead.  For
 # some reason 10.5+ "knows" that how to do this correctly.
 
@@ -243,16 +222,11 @@
     }
 }
 
-# (20) fix the Mac timer's use of "mach_timebase_info"
+# (21) fix the Mac timer's use of "mach_timebase_info"
 
 patchfiles-append   \
     patch-src_corelib_tools_qelapsedtimer-mac.cpp.diff
 
-# (21) fix WebCore to handle 32-bit compiling correctly on x86 and ppc
-
-patchfiles-append   \
-    patch-src_3rdparty_webkit_Source_WebCore_WebCore.pro.diff
-
 # (22) Under 10.8 and 10.9: Patch to fix corelib linking
 
 platform darwin {
@@ -266,39 +240,6 @@
 patchfiles-append   \
     patch-tools_macdeployqt_shared_shared.cpp.diff
 
-# (24) Fix build against libc++
-
-patchfiles-append   \
-    patch-libc++.diff
-
-# (25) Fix CLuscene to build under 10.9 CLang
-# (26) Fix qglobals.h to build under 10.9 CLang
-# (27 a-e) Fix WebKit to build under 10.9 CLang
-
-platform darwin {
-    if {${MINOR} == 9} {
-        patchfiles-append \
-            patch-src_3rdparty_clucene_src_CLucene_search_FieldCacheImpl.cpp.diff \
-            patch-src_corelib_global_qglobal.h.diff \
-            patch-src_3rdparty_webkit_Source_WebCore_platform_Timer.h.diff \
-            patch-src_3rdparty_webkit_Source_WebCore_platform_Timer.cpp.diff \
-            patch-src_3rdparty_webkit_Source_WebKit_qt_WebCoreSupport_NotificationPresenterClientQt.cpp.diff \
-            patch-src_3rdparty_webkit_Source_WebKit_qt_Api_qgraphicswebview.cpp.diff \
-            patch-src_3rdparty_webkit_Source_WebCore_platform_network_qt_QNetworkReplyHandler.cpp.diff
-
-        # Copy new version of webkit's lib for OS X 10.9 only.
-        # Attached by reference:
-        # https://codereview.qt-project.org/#change,69328
-        # http://trac.webkit.org/browser/trunk/WebKitLibraries/ChangeLog?rev=157771
-
-        distfiles-append libWebKitSystemInterfaceMavericks.a
-        post-patch {
-            copy ${distpath}/libWebKitSystemInterfaceMavericks.a \
-                ${worksrcpath}/src/3rdparty/webkit/WebKitLibraries
-        }
-    }
-}
-
 # error out if trying to build on a new OSX version (> 10.9).
 
 platform darwin {
@@ -347,6 +288,7 @@
     # arch flag (join does not effect a single entry).  first "-arch"
     # is already in place in the 'configure' script (since there has
     # to be at least 1 arch).
+
     set ARCHES ""
     if {[variant_exists universal] && [variant_isset universal]} {
         set ARCHES [join ${universal_archs} " -arch "]
@@ -358,6 +300,7 @@
     # set MACOSX_DEPLOYMENT_TARGET version in various places.  These
     # were all patched in (2) above, and can be easily changed or
     # overridden by the user in a project-local qmake .pro script.
+
     set TARGET "10.${MINOR}"
     foreach fixfile {configure mkspecs/common/g++-macx.conf \
                      mkspecs/common/mac.conf qmake/qmake.pri \
@@ -367,6 +310,7 @@
     }
 
     # Fix OS version on Bearer CoreWLAN QMake file
+
     reinplace "s|@MACOSX_VERSION_MINOR@|${MINOR}|g" \
         ${worksrcpath}/src/plugins/bearer/corewlan/corewlan.pro
 
@@ -382,7 +326,8 @@
     reinplace "s, at DEVELOPER_SDK@,${SDK},g" \
         ${worksrcpath}/src/plugins/bearer/corewlan/corewlan.pro
 
-    # fix 'macdeployqt' to look for the correct plugins location by default.
+    # fix 'macdeployqt' to look for the correct
+    # plugins location by default.
 
     reinplace "s, at QT_PLUGINS_DIR@,${qt_plugins_dir},g" \
         ${worksrcpath}/tools/macdeployqt/macdeployqt/main.cpp
@@ -558,6 +503,7 @@
 
 # Stop configure script from searching for SQL Drivers
 #    not available from MacPorts.
+
 foreach driver {db2 ibase oci tds} {
     configure.args-append -no-sql-${driver}
 }
@@ -570,7 +516,9 @@
 }
 
 pre-configure {
+
     # use the corrected CPATH and LIBRARY_PATH for build
+
     compiler.cpath [join ${header_path} :]
     compiler.library_path [join ${library_path} :]
 
@@ -1030,63 +978,12 @@
 
 }
 
-pre-activate {
-    # make sure 'none' is selected by qt4_select, so that there is no
-    # conflict between it and this port.
-    if {[file exists ${prefix}/bin/qt4_select]} {
-        if {[exec ${prefix}/bin/qt4_select -s] ne "none"} {
-            ui_msg "Disabling 'qt4_select' selection."
-            system "exec ${prefix}/bin/qt4_select none"
-        }
-    }
-}
-
-variant framework description {Framework Legacy Compatibility Variant} {
-    ui_error "${name} variant +framework has been disabled because ${name} now installs as both libraries and frameworks.  Please install ${name} without +framework."
-    error "Variant disabled"
-}
-
-variant mysql description {MySQL Qt4 Plugin Legacy Compatibility Variant} {
-    ui_error "${name} variant +mysql has been replaced by the port 'qt4-mac-mysql55-plugin' and its subports.  Please install ${name} without +mysql, then install your desired MySQL Qt plugin."
-    error "Variant disabled"
-}
-
 variant odbc description {Enable iODBC SQL Driver} {
     depends_lib-append port:libiodbc
     configure.args-delete -no-sql-odbc
     configure.args-append -plugin-sql-odbc
 }
 
-variant psql83 conflicts psql84 psql90 psql91 \
-description {PostgreSQL 8.3 Qt4 Plugin Legacy Compatibility Variant} {}
-
-variant psql84 conflicts psql83 psql90 psql91 \
-description {PostgreSQL 8.4 Qt4 Plugin Legacy Compatibility Variant} {}
-
-variant psql90 conflicts psql83 psql84 psql91 \
-description {PostgreSQL 9.0 Qt4 Plugin Legacy Compatibility Variant} {}
-
-variant psql91 conflicts psql83 psql84 psql90 \
-description {PostgreSQL 9.1 Qt4 Plugin Legacy Compatibility Variant} {}
-
-global psql_version
-set psql_version ""
-
-if {[variant_isset psql83]} {
-    set psql_version "83"
-} elseif {[variant_isset psql84]} {
-    set psql_version "84"
-} elseif {[variant_isset psql90]} {
-    set psql_version "90"
-} elseif {[variant_isset psql91]} {
-    set psql_version "91"
-}
-
-if {${psql_version} ne ""} {
-    ui_error "${name} variant +psql${psql_version} has been replaced by the port 'qt4-mac-postgresql91-plugin' and its subports.  Please install ${name} without +psql${psql_version}, then install your desired PostgreSQL Qt plugin."
-    error "Variant disabled"
-}
-
 variant raster description {Use raster graphics system by default} {
     configure.args-append -graphicssystem raster
 }
@@ -1124,7 +1021,7 @@
     }
 }
 
-variant cxx11 description {Add library support for C++11 (EXPERIMENTAL)} {
+variant cxx11 description {Add library support for C++11 (EXPERIMENTAL; does not work with libc++)} {
 
     # Block compilers that do not support C++11. This variant seems to
     # work with MacPorts' clang 3.0 or newer and Apple clang newer
@@ -1133,9 +1030,23 @@
     compiler.blacklist-append \
         apple-gcc-4.2 gcc-4.2 llvm-gcc-4.2
 
+    pre-fetch {
+
+        # This variant does not work with Clang libc++
+
+        if {[info exists configure.cxx_stdlib] &&
+            ${configure.cxx_stdlib} eq "libc++" &&
+            [string match *clang* ${configure.cxx}]} {
+
+            ui_msg "\nERROR: C++11 support for Qt4 is not available when using Clang and libc++.\n"
+            error "unsupported platform for C++11 support"
+
+        }
+    }
+
     pre-extract {
 
-        ui_msg "WARNING: You have enabled C++11 support for Qt4, which is EXPERIMENTAL.  Qt's libraries and applications (not including QMake) will be compiled using C++11.  That said, C++11 will NOT be enabled by default when using QMake.  You can enable C++11 by specifying, e.g. \'CONFIG += c++11\', in any QMake build file."
+        ui_msg "\nWARNING: You have enabled C++11 support for Qt4, which is EXPERIMENTAL.  Qt's libraries and applications (not including QMake) will be compiled using C++11.  That said, C++11 will NOT be enabled by default when using QMake.  You can enable C++11 by specifying, e.g. \'CONFIG += c++11\', in any QMake build file.\n"
 
     }
 
@@ -1154,30 +1065,6 @@
     ui_msg "NOTE: Qt database plugins for mysql55, postgresql91, and sqlite2 are NOT installed by this port\; they are installed by qt4-mac-*-plugin instead."
 }
 
-#variant quartz conflicts x11
-#variant quartz \
-#description {Build for Native OSX Quartz GUI, not X11 (default)} {}
-
-#variant x11 conflicts quartz \
-#description {Build for X11 GUI, not Native OSX Quartz} {}
-
-# if neither +x11 or +quartz were specified, default to the latter
-#if {![variant_isset quartz] && ![variant_isset x11]} {
-#    default_variants +quartz
-#}
-
-# check to see if user specified just "-quartz", which can't work.
-#if {![variant_isset quartz] && ![variant_isset x11]} {
-#    return -code error \
-#"\n\nThe variant -quartz will not work alone.
-#Please select one of +quartz or +x11 as a variant.\n"
-#}
-
-#if {[variant_isset x11]} {
-#    return -code error "\n\nVariant +x11 is not yet functional; \
-#please use +quartz for now.\n"
-#}
-
 livecheck.type      regex
 livecheck.url       http://download.qt-project.org/official_releases/qt/${branch}/
 livecheck.regex     >(\[0-9.\]+)/<

Modified: trunk/dports/aqua/qt4-mac/files/patch-QtHelp_10.4_only.diff
===================================================================
--- trunk/dports/aqua/qt4-mac/files/patch-QtHelp_10.4_only.diff	2014-05-06 10:08:33 UTC (rev 119771)
+++ trunk/dports/aqua/qt4-mac/files/patch-QtHelp_10.4_only.diff	2014-05-06 12:13:33 UTC (rev 119772)
@@ -1,6 +1,6 @@
 --- tools/assistant/tools/assistant/assistant.pro.orig	2011-01-10 09:05:05.000000000 -0500
 +++ tools/assistant/tools/assistant/assistant.pro	2011-01-10 09:05:55.000000000 -0500
-@@ -108,3 +108,30 @@
+@@ -120,3 +120,30 @@
          DEFINES += USE_STATIC_SQLITE_PLUGIN
      }
  }
@@ -33,7 +33,7 @@
 +
 --- tools/assistant/tools/qcollectiongenerator/qcollectiongenerator.pro.orig	2011-01-10 09:05:05.000000000 -0500
 +++ tools/assistant/tools/qcollectiongenerator/qcollectiongenerator.pro	2011-01-10 09:05:55.000000000 -0500
-@@ -15,3 +15,27 @@
+@@ -19,3 +19,27 @@
      ../shared/collectionconfiguration.cpp
  HEADERS += ../shared/helpgenerator.h \
      ../shared/collectionconfiguration.h
@@ -63,7 +63,7 @@
 +LIBS_PRIVATE += -l$$qcwebkit
 --- tools/assistant/tools/qhelpconverter/qhelpconverter.pro.orig	2011-01-10 09:05:05.000000000 -0500
 +++ tools/assistant/tools/qhelpconverter/qhelpconverter.pro	2011-01-10 09:05:55.000000000 -0500
-@@ -45,3 +45,27 @@
+@@ -49,3 +49,27 @@
             outputpage.ui
  
  RESOURCES += qhelpconverter.qrc
@@ -93,7 +93,7 @@
 +LIBS_PRIVATE += -l$$qcwebkit
 --- tools/assistant/tools/qhelpgenerator/qhelpgenerator.pro.orig	2011-01-10 09:05:05.000000000 -0500
 +++ tools/assistant/tools/qhelpgenerator/qhelpgenerator.pro	2011-01-10 09:05:55.000000000 -0500
-@@ -12,3 +12,27 @@
+@@ -17,3 +17,27 @@
             main.cpp
  
  HEADERS += ../shared/helpgenerator.h

Modified: trunk/dports/aqua/qt4-mac/files/patch-configure.diff
===================================================================
--- trunk/dports/aqua/qt4-mac/files/patch-configure.diff	2014-05-06 10:08:33 UTC (rev 119771)
+++ trunk/dports/aqua/qt4-mac/files/patch-configure.diff	2014-05-06 12:13:33 UTC (rev 119772)
@@ -1,5 +1,5 @@
---- configure.orig	2013-11-11 12:18:47.000000000 -0500
-+++ configure	2013-11-11 12:21:48.000000000 -0500
+--- configure.orig	2014-04-25 09:50:32.000000000 -0400
++++ configure	2014-04-25 10:04:24.000000000 -0400
 @@ -924,12 +924,14 @@
  CFG_ICU=auto
  CFG_SYSTEM_PROXIES=no
@@ -48,7 +48,7 @@
      system-proxies)
          if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
              CFG_SYSTEM_PROXIES="$VAL"
-@@ -3450,6 +3462,53 @@
+@@ -3456,6 +3468,53 @@
      CFG_MAC_XARCH=no
  fi
  
@@ -102,7 +102,7 @@
  #auto-detect DWARF2 on the mac
  if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "auto" ]; then
      if "$mactests/dwarf2.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" $MAC_CONFIG_TEST_COMMANDLINE; then
-@@ -3459,15 +3518,6 @@
+@@ -3465,15 +3524,6 @@
      fi
  fi
  
@@ -118,7 +118,7 @@
  # don't autodetect support for separate debug info on objcopy when
  # cross-compiling as lots of toolchains seems to have problems with this
  if [ "$QT_CROSS_COMPILE" = "yes" ] && [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
-@@ -3694,6 +3744,19 @@
+@@ -3700,6 +3750,19 @@
      fi
      QT_INSTALL_LIBS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_LIBS"`
  
@@ -138,7 +138,7 @@
      #bins
      if [ -z "$QT_INSTALL_BINS" ]; then #default
          if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
-@@ -4761,6 +4824,7 @@
+@@ -4768,6 +4831,7 @@
  DOCUMENTATION_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_INSTALL_DOCS"`
  HEADERS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_INSTALL_HEADERS"`
  LIBRARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_libspath=$QT_INSTALL_LIBS"`
@@ -146,7 +146,7 @@
  BINARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_binspath=$QT_INSTALL_BINS"`
  PLUGINS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_plugpath=$QT_INSTALL_PLUGINS"`
  IMPORTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_impspath=$QT_INSTALL_IMPORTS"`
-@@ -4786,6 +4850,7 @@
+@@ -4793,6 +4857,7 @@
      HOSTDOCUMENTATION_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_HOST_PREFIX/doc"`
      HOSTHEADERS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_HOST_PREFIX/include"`
      HOSTLIBRARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_libspath=$QT_HOST_PREFIX/lib"`
@@ -154,7 +154,7 @@
      HOSTBINARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_binspath=$QT_HOST_PREFIX/bin"`
      HOSTPLUGINS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_plugpath=$QT_HOST_PREFIX/plugins"`
      HOSTIMPORTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_impspath=$QT_HOST_PREFIX/IMPORTS"`
-@@ -4803,6 +4868,7 @@
+@@ -4810,6 +4875,7 @@
  static const char qt_configure_documentation_path_str[256 + 12] = "$HOSTDOCUMENTATION_PATH_STR";
  static const char qt_configure_headers_path_str      [256 + 12] = "$HOSTHEADERS_PATH_STR";
  static const char qt_configure_libraries_path_str    [256 + 12] = "$HOSTLIBRARIES_PATH_STR";
@@ -162,7 +162,7 @@
  static const char qt_configure_binaries_path_str     [256 + 12] = "$HOSTBINARIES_PATH_STR";
  static const char qt_configure_plugins_path_str      [256 + 12] = "$HOSTPLUGINS_PATH_STR";
  static const char qt_configure_imports_path_str      [256 + 12] = "$HOSTIMPORTS_PATH_STR";
-@@ -4821,6 +4887,7 @@
+@@ -4828,6 +4894,7 @@
  static const char qt_configure_documentation_path_str[256 + 12] = "$DOCUMENTATION_PATH_STR";
  static const char qt_configure_headers_path_str      [256 + 12] = "$HEADERS_PATH_STR";
  static const char qt_configure_libraries_path_str    [256 + 12] = "$LIBRARIES_PATH_STR";
@@ -170,7 +170,7 @@
  static const char qt_configure_binaries_path_str     [256 + 12] = "$BINARIES_PATH_STR";
  static const char qt_configure_plugins_path_str      [256 + 12] = "$PLUGINS_PATH_STR";
  static const char qt_configure_imports_path_str      [256 + 12] = "$IMPORTS_PATH_STR";
-@@ -4846,6 +4913,7 @@
+@@ -4853,6 +4920,7 @@
  #define QT_CONFIGURE_DOCUMENTATION_PATH qt_configure_documentation_path_str + 12;
  #define QT_CONFIGURE_HEADERS_PATH qt_configure_headers_path_str + 12;
  #define QT_CONFIGURE_LIBRARIES_PATH qt_configure_libraries_path_str + 12;
@@ -178,7 +178,7 @@
  #define QT_CONFIGURE_BINARIES_PATH qt_configure_binaries_path_str + 12;
  #define QT_CONFIGURE_PLUGINS_PATH qt_configure_plugins_path_str + 12;
  #define QT_CONFIGURE_IMPORTS_PATH qt_configure_imports_path_str + 12;
-@@ -4958,7 +5026,7 @@
+@@ -4965,7 +5033,7 @@
          EXTRA_OBJS=
          EXTRA_SRCS=
          EXTRA_CFLAGS="\$(QMAKE_CFLAGS)"
@@ -187,16 +187,18 @@
          EXTRA_LFLAGS="\$(QMAKE_LFLAGS)"
  
          if [ "$PLATFORM" = "irix-cc" ] || [ "$PLATFORM" = "irix-cc-64" ]; then
-@@ -4997,7 +5065,7 @@
-             done
-         fi
-         if [ "$BUILD_ON_MAC" = "yes" ]; then
--            echo "export MACOSX_DEPLOYMENT_TARGET = 10.5" >> "$mkfile"
-+            echo "export MACOSX_DEPLOYMENT_TARGET = @MACOSX_DEPLOYMENT_TARGET@" >> "$mkfile"
-             echo "CARBON_LFLAGS =-framework ApplicationServices" >>"$mkfile"
-             echo "CARBON_CFLAGS =-fconstant-cfstrings" >>"$mkfile"
-             EXTRA_LFLAGS="$EXTRA_LFLAGS \$(CARBON_LFLAGS)"
-@@ -5005,20 +5073,11 @@
+@@ -5009,8 +5077,8 @@
+                 # Avoid overriding the default configuration settings when building with clang/libc++
+                 ;;
+             *)
+-                # For all other configurations require a minimum of 10.5
+-                echo "export MACOSX_DEPLOYMENT_TARGET = 10.5" >> "$mkfile"
++                # For all other configurations require a minimum of @MACOSX_DEPLOYMENT_TARGET@
++                echo "export MACOSX_DEPLOYMENT_TARGET = @MACOSX_DEPLOYMENT_TARGET@" >> "$mkfile"
+                 ;;
+             esac
+ 
+@@ -5021,20 +5089,11 @@
              EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(CARBON_CFLAGS)"
              EXTRA_OBJS="qsettings_mac.o qcore_mac.o"
              EXTRA_SRCS="\"$relpath/src/corelib/io/qsettings_mac.cpp\" \"$relpath/src/corelib/kernel/qcore_mac.cpp\""
@@ -214,15 +216,15 @@
 -		EXTRA_CXXFLAGS="$PPC_CFLAGS $EXTRA_CXXFLAGS"
 -                EXTRA_LFLAGS="$EXTRA_LFLAGS $PPC_LFLAGS"
 -            fi
-+           ARCH_CFLAGS="-arch @ARCHES@"
-+           ARCH_LFLAGS="-arch @ARCHES@"
-+           EXTRA_CFLAGS="$ARCH_CFLAGS $EXTRA_CFLAGS"
-+           EXTRA_CXXFLAGS="$ARCH_CFLAGS $EXTRA_CXXFLAGS"
-+           EXTRA_LFLAGS="$EXTRA_LFLAGS $ARCH_LFLAGS"
++            ARCH_CFLAGS="-arch @ARCHES@"
++            ARCH_LFLAGS="-arch @ARCHES@"
++            EXTRA_CFLAGS="$ARCH_CFLAGS $EXTRA_CFLAGS"
++            EXTRA_CXXFLAGS="$ARCH_CFLAGS $EXTRA_CXXFLAGS"
++            EXTRA_LFLAGS="$EXTRA_LFLAGS $ARCH_LFLAGS"
  	    if [ '!' -z "$CFG_SDK" ]; then
  		echo "SDK_LFLAGS =-Wl,-syslibroot,$CFG_SDK" >>"$mkfile"
  		echo "SDK_CFLAGS =-isysroot $CFG_SDK" >>"$mkfile"
-@@ -6957,7 +7016,7 @@
+@@ -6997,7 +7056,7 @@
  
  # detect OpenVG support
  if [ "$CFG_OPENVG" != "no" ] && [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then
@@ -231,7 +233,7 @@
          if [ "$CFG_OPENVG" = "auto" ]; then
              CFG_OPENVG=yes
          fi
-@@ -6988,7 +7047,7 @@
+@@ -7028,7 +7087,7 @@
              CFG_OPENVG=no
          fi
      fi
@@ -240,26 +242,28 @@
          CFG_OPENVG_SHIVA=yes
      fi
  fi
-@@ -7179,16 +7238,8 @@
+@@ -7219,19 +7278,7 @@
  
  # set the global Mac deployment target. This is overridden on an arch-by-arch basis
  # in some cases, see code further down
 -case "$PLATFORM,$CFG_MAC_COCOA" in
--    macx*,yes)
--	# Cocoa
--	QMakeVar set QMAKE_MACOSX_DEPLOYMENT_TARGET 10.5
--	;;
--    macx*,no)
--	# gcc, Carbon
--	QMakeVar set QMAKE_MACOSX_DEPLOYMENT_TARGET 10.4
--	;;
+-*macx-clang-libc++,yes)
+-    # Avoid overriding the default configuration setting when building with clang/libc++
+-    ;;
+-macx*,yes)
+-    # Cocoa
+-    QMakeVar set QMAKE_MACOSX_DEPLOYMENT_TARGET 10.5
+-    ;;
+-macx*,no)
+-    # gcc, Carbon
+-    QMakeVar set QMAKE_MACOSX_DEPLOYMENT_TARGET 10.4
+-    ;;
 -esac
-+
 +QMakeVar set QMAKE_MACOSX_DEPLOYMENT_TARGET @MACOSX_DEPLOYMENT_TARGET@
  
  # disable Qt 3 support on VxWorks, Symbian and INTEGRITY
  case "$XPLATFORM" in
-@@ -7467,6 +7518,10 @@
+@@ -7510,6 +7557,10 @@
      QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GUI"
  fi
  
@@ -270,56 +274,56 @@
  
  if [ "x$PLATFORM_MAC" = "xyes" ] && [ "$XPLATFORM_MINGW" != "yes" ] && [ "$XPLATFORM_SYMBIAN" != "yes" ]; then
      #On Mac we implicitly link against libz, so we
-@@ -7930,28 +7985,32 @@
- # env. variable. 
- if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_XARCH" != "no" ] ; then
-     if echo "$CFG_MAC_ARCHS" | grep '\<x86\>' > /dev/null 2>&1; then
--        QMakeVar add QMAKE_CFLAGS "-Xarch_i386 -mmacosx-version-min=10.4"
--        QMakeVar add QMAKE_CXXFLAGS "-Xarch_i386 -mmacosx-version-min=10.4"
--        QMakeVar add QMAKE_LFLAGS "-Xarch_i386 -mmacosx-version-min=10.4"
--        QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86 "-arch i386 -Xarch_i386 -mmacosx-version-min=10.4"
-+        QMakeVar add QMAKE_CFLAGS "-Xarch_i386 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@"
-+        QMakeVar add QMAKE_CXXFLAGS "-Xarch_i386 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@"
-+        QMakeVar add QMAKE_LFLAGS "-Xarch_i386 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@"
-+        QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86 "-arch i386 -Xarch_i386 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@"
-+        QMakeVar add QMAKE_OBJECTIVE_CXXFLAGS_X86 "-arch i386 -Xarch_i386 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@"
-     fi
-     if echo "$CFG_MAC_ARCHS" | grep '\<ppc\>' > /dev/null 2>&1; then
--        QMakeVar add QMAKE_CFLAGS "-Xarch_ppc -mmacosx-version-min=10.4"
--        QMakeVar add QMAKE_CXXFLAGS "-Xarch_ppc -mmacosx-version-min=10.4"
--        QMakeVar add QMAKE_LFLAGS "-Xarch_ppc -mmacosx-version-min=10.4"
--        QMakeVar add QMAKE_OBJECTIVE_CFLAGS_PPC "-arch ppc -Xarch_ppc -mmacosx-version-min=10.4"
-+        QMakeVar add QMAKE_CFLAGS "-Xarch_ppc -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@"
-+        QMakeVar add QMAKE_CXXFLAGS "-Xarch_ppc -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@"
-+        QMakeVar add QMAKE_LFLAGS "-Xarch_ppc -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@"
-+        QMakeVar add QMAKE_OBJECTIVE_CFLAGS_PPC "-arch ppc -Xarch_ppc -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@"
-+        QMakeVar add QMAKE_OBJECTIVE_CXXFLAGS_PPC "-arch ppc -Xarch_ppc -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@"
-     fi
-     if echo "$CFG_MAC_ARCHS" | grep '\<x86_64\>' > /dev/null 2>&1; then
--        QMakeVar add QMAKE_CFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5"
--        QMakeVar add QMAKE_CXXFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5"
--        QMakeVar add QMAKE_LFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5"
--        QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86_64 "-arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5"
-+        QMakeVar add QMAKE_CFLAGS "-Xarch_x86_64 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@"
-+        QMakeVar add QMAKE_CXXFLAGS "-Xarch_x86_64 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@"
-+        QMakeVar add QMAKE_LFLAGS "-Xarch_x86_64 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@"
-+        QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86_64 "-arch x86_64 -Xarch_x86_64 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@"
-+        QMakeVar add QMAKE_OBJECTIVE_CXXFLAGS_X86_64 "-arch x86_64 -Xarch_x86_64 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@"
-     fi
-     if echo "$CFG_MAC_ARCHS" | grep '\<ppc64\>' > /dev/null 2>&1; then
--        QMakeVar add QMAKE_CFLAGS "-Xarch_ppc64 -mmacosx-version-min=10.5"
--        QMakeVar add QMAKE_CXXFLAGS "-Xarch_ppc64 -mmacosx-version-min=10.5"
--        QMakeVar add QMAKE_LFLAGS "-Xarch_ppc64 -mmacosx-version-min=10.5"
--        QMakeVar add QMAKE_OBJECTIVE_CFLAGS_PPC_64 "-arch ppc64 -Xarch_ppc64 -mmacosx-version-min=10.5"
-+        QMakeVar add QMAKE_CFLAGS "-Xarch_ppc64 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@"
-+        QMakeVar add QMAKE_CXXFLAGS "-Xarch_ppc64 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@"
-+        QMakeVar add QMAKE_LFLAGS "-Xarch_ppc64 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@"
-+        QMakeVar add QMAKE_OBJECTIVE_CFLAGS_PPC_64 "-arch ppc64 -Xarch_ppc64 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@"
-+        QMakeVar add QMAKE_OBJECTIVE_CXXFLAGS_PPC_64 "-arch ppc64 -Xarch_ppc64 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@"
-     fi
- fi
- 
-@@ -8709,6 +8768,7 @@
+@@ -7981,28 +8032,32 @@
+         ;;
+     *)
+         if echo "$CFG_MAC_ARCHS" | grep '\<x86\>' > /dev/null 2>&1; then
+-            QMakeVar add QMAKE_CFLAGS "-Xarch_i386 -mmacosx-version-min=10.4"
+-            QMakeVar add QMAKE_CXXFLAGS "-Xarch_i386 -mmacosx-version-min=10.4"
+-            QMakeVar add QMAKE_LFLAGS "-Xarch_i386 -mmacosx-version-min=10.4"
+-            QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86 "-arch i386 -Xarch_i386 -mmacosx-version-min=10.4"
++            QMakeVar add QMAKE_CFLAGS "-Xarch_i386 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@"
++            QMakeVar add QMAKE_CXXFLAGS "-Xarch_i386 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@"
++            QMakeVar add QMAKE_LFLAGS "-Xarch_i386 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@"
++            QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86 "-arch i386 -Xarch_i386 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@"
++            QMakeVar add QMAKE_OBJECTIVE_CXXFLAGS_X86 "-arch i386 -Xarch_i386 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@"
+         fi
+         if echo "$CFG_MAC_ARCHS" | grep '\<ppc\>' > /dev/null 2>&1; then
+-            QMakeVar add QMAKE_CFLAGS "-Xarch_ppc -mmacosx-version-min=10.4"
+-            QMakeVar add QMAKE_CXXFLAGS "-Xarch_ppc -mmacosx-version-min=10.4"
+-            QMakeVar add QMAKE_LFLAGS "-Xarch_ppc -mmacosx-version-min=10.4"
+-            QMakeVar add QMAKE_OBJECTIVE_CFLAGS_PPC "-arch ppc -Xarch_ppc -mmacosx-version-min=10.4"
++            QMakeVar add QMAKE_CFLAGS "-Xarch_ppc -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@"
++            QMakeVar add QMAKE_CXXFLAGS "-Xarch_ppc -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@"
++            QMakeVar add QMAKE_LFLAGS "-Xarch_ppc -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@"
++            QMakeVar add QMAKE_OBJECTIVE_CFLAGS_PPC "-arch ppc -Xarch_ppc -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@"
++            QMakeVar add QMAKE_OBJECTIVE_CXXFLAGS_PPC "-arch ppc -Xarch_ppc -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@"
+         fi
+         if echo "$CFG_MAC_ARCHS" | grep '\<x86_64\>' > /dev/null 2>&1; then
+-            QMakeVar add QMAKE_CFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5"
+-            QMakeVar add QMAKE_CXXFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5"
+-            QMakeVar add QMAKE_LFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5"
+-            QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86_64 "-arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5"
++            QMakeVar add QMAKE_CFLAGS "-Xarch_x86_64 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@"
++            QMakeVar add QMAKE_CXXFLAGS "-Xarch_x86_64 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@"
++            QMakeVar add QMAKE_LFLAGS "-Xarch_x86_64 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@"
++            QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86_64 "-arch x86_64 -Xarch_x86_64 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@"
++            QMakeVar add QMAKE_OBJECTIVE_CXXFLAGS_X86_64 "-arch x86_64 -Xarch_x86_64 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@"
+         fi
+         if echo "$CFG_MAC_ARCHS" | grep '\<ppc64\>' > /dev/null 2>&1; then
+-            QMakeVar add QMAKE_CFLAGS "-Xarch_ppc64 -mmacosx-version-min=10.5"
+-            QMakeVar add QMAKE_CXXFLAGS "-Xarch_ppc64 -mmacosx-version-min=10.5"
+-            QMakeVar add QMAKE_LFLAGS "-Xarch_ppc64 -mmacosx-version-min=10.5"
+-            QMakeVar add QMAKE_OBJECTIVE_CFLAGS_PPC_64 "-arch ppc64 -Xarch_ppc64 -mmacosx-version-min=10.5"
++            QMakeVar add QMAKE_CFLAGS "-Xarch_ppc64 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@"
++            QMakeVar add QMAKE_CXXFLAGS "-Xarch_ppc64 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@"
++            QMakeVar add QMAKE_LFLAGS "-Xarch_ppc64 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@"
++            QMakeVar add QMAKE_OBJECTIVE_CFLAGS_PPC_64 "-arch ppc64 -Xarch_ppc64 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@"
++            QMakeVar add QMAKE_OBJECTIVE_CXXFLAGS_PPC_64 "-arch ppc64 -Xarch_ppc64 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@"
+         fi
+         ;;
+     esac
+@@ -8762,6 +8817,7 @@
  QMAKE_RCC        = \$\$QT_BUILD_TREE/bin/rcc
  QMAKE_QDBUSXML2CPP = \$\$QT_BUILD_TREE/bin/qdbusxml2cpp
  QMAKE_INCDIR_QT  = \$\$QT_BUILD_TREE/include
@@ -327,7 +331,7 @@
  QMAKE_LIBDIR_QT  = \$\$QT_BUILD_TREE/lib
  
  EOF
-@@ -8747,6 +8807,11 @@
+@@ -8800,6 +8856,11 @@
      echo "DEFINES *= QT_EDITION=QT_EDITION_DESKTOP" >> "$CACHEFILE.tmp"
  fi
  
@@ -339,7 +343,7 @@
  #dump in the OPENSSL_LIBS info
  if [ '!' -z "$OPENSSL_LIBS" ]; then
      echo "OPENSSL_LIBS = $OPENSSL_LIBS" >> "$CACHEFILE.tmp"
-@@ -8906,6 +8971,7 @@
+@@ -8959,6 +9020,7 @@
  else
     echo "Debug .................. $CFG_DEBUG"
  fi

Modified: trunk/dports/aqua/qt4-mac/files/patch-cxx11.diff
===================================================================
--- trunk/dports/aqua/qt4-mac/files/patch-cxx11.diff	2014-05-06 10:08:33 UTC (rev 119771)
+++ trunk/dports/aqua/qt4-mac/files/patch-cxx11.diff	2014-05-06 12:13:33 UTC (rev 119772)
@@ -20,7 +20,7 @@
      curs.cp.nscursor = [[NSCursor alloc] initWithImage:nsimage hotSpot: hotSpot];
 --- src/gui/kernel/qcocoaview_mac.mm.orig	2013-01-22 16:04:44.000000000 -0500
 +++ src/gui/kernel/qcocoaview_mac.mm	2013-01-22 16:05:57.000000000 -0500
-@@ -1346,7 +1346,7 @@
+@@ -1352,7 +1352,7 @@
      // Save supported actions:
      [theView setSupportedActions: qt_mac_mapDropActions(dragPrivate()->possible_actions)];
      QPoint pointInView = [theView qt_qwidget]->mapFromGlobal(dndParams->globalPoint);
@@ -234,7 +234,7 @@
  class QAInterface;
 --- src/gui/styles/qmacstyle_mac.mm.orig	2013-01-22 19:50:08.000000000 -0500
 +++ src/gui/styles/qmacstyle_mac.mm	2013-01-22 19:55:50.000000000 -0500
-@@ -3471,8 +3471,8 @@
+@@ -3468,8 +3468,8 @@
                      tti.version = qt_mac_hitheme_version;
                      tti.state = tds;
                      QColor textColor = btn->palette.buttonText().color();
@@ -245,7 +245,7 @@
                      CGContextSetFillColorSpace(cg, QCoreGraphicsPaintEngine::macGenericColorSpace());
                      CGContextSetFillColor(cg, colorComp);
                      tti.fontID = themeId;
-@@ -3714,8 +3714,8 @@
+@@ -3701,8 +3701,8 @@
                  tti.version = qt_mac_hitheme_version;
                  tti.state = tds;
                  QColor textColor = myTab.palette.windowText().color();
@@ -256,7 +256,7 @@
                  CGContextSetFillColorSpace(cg, QCoreGraphicsPaintEngine::macGenericColorSpace());
                  CGContextSetFillColor(cg, colorComp);
                  switch (d->aquaSizeConstrain(opt, w)) {
-@@ -3895,8 +3895,8 @@
+@@ -3882,8 +3882,8 @@
                  CGContextSetShouldAntialias(cg, true);
                  CGContextSetShouldSmoothFonts(cg, true);
                  QColor textColor = p->pen().color();
@@ -267,7 +267,7 @@
                  CGContextSetFillColorSpace(cg, QCoreGraphicsPaintEngine::macGenericColorSpace());
                  CGContextSetFillColor(cg, colorComp);
                  HIThemeTextInfo tti;
-@@ -5031,8 +5031,8 @@
+@@ -5018,8 +5018,8 @@
                  tti.version = qt_mac_hitheme_version;
                  tti.state = tds;
                  QColor textColor = groupBox->palette.windowText().color();
@@ -284,7 +284,7 @@
  // The VxWorks DIAB compiler crashes when initializing the anonymouse union with { a7 }
  #if !defined(Q_CC_DIAB)
  #  define QT_INIT_TEXTUNDOCOMMAND(c, a1, a2, a3, a4, a5, a6, a7, a8) \
--          QTextUndoCommand c = { a1, a2, 0, 0, quint8(a3), a4, a5, a6, { a7 }, a8 }
+-          QTextUndoCommand c = { a1, a2, 0, 0, quint8(a3), a4, quint32(a5), quint32(a6), { int(a7) }, quint32(a8) }
 +  QTextUndoCommand c; \
 +  c.command = a1; \
 +  c.block_part = a2; \
@@ -303,7 +303,7 @@
      return QDialogButtonBox::InvalidRole;
  }
  
--static const int layouts[2][5][14] =
+-static const uint layouts[2][5][14] =
 +static const UInt32 layouts[2][5][14] =
  {
      // Qt::Horizontal
@@ -312,7 +312,7 @@
              tmpPolicy = 4;  // Mac modeless
      }
  
--    const int *currentLayout = layouts[orientation == Qt::Vertical][tmpPolicy];
+-    const uint *currentLayout = layouts[orientation == Qt::Vertical][tmpPolicy];
 +    const UInt32 *currentLayout = layouts[orientation == Qt::Vertical][tmpPolicy];
  
      if (center)
@@ -341,17 +341,6 @@
  
      // make sure we transmit data in network order
      r = htons(r);
---- src/opengl/gl2paintengineex/qtriangulator.cpp.orig	2013-01-22 16:04:44.000000000 -0500
-+++ src/opengl/gl2paintengineex/qtriangulator.cpp	2013-01-22 16:05:57.000000000 -0500
-@@ -1710,7 +1710,7 @@
-         } else {
-             Q_ASSERT(i + 1 < m_parent->m_indices.size());
-             // {node, from, to, next, previous, winding, mayIntersect, pointingUp, originallyPointingUp}
--            Edge edge = {0, m_parent->m_indices.at(i), m_parent->m_indices.at(i + 1), -1, -1, 0, true, false, false};
-+            Edge edge = {0, int(m_parent->m_indices.at(i)), int(m_parent->m_indices.at(i + 1)), -1, -1, 0, true, false, false};
-             m_edges.add(edge);
-         }
-     }
 --- src/openvg/qpaintengine_vg.cpp.orig	2013-01-22 16:04:44.000000000 -0500
 +++ src/openvg/qpaintengine_vg.cpp	2013-01-22 16:05:57.000000000 -0500
 @@ -971,23 +971,23 @@
@@ -466,9 +455,20 @@
      pair<HashSet<UString::Rep*>::iterator, bool> addResult = globalData->identifierTable->add<UCharBuffer, UCharBufferTranslator>(buf);
  
      // If the string is newly-translated, then we need to adopt it.
---- src/3rdparty/webkit/Source/JavaScriptCore/wtf/NullPtr.h.orig	2013-01-22 16:04:44.000000000 -0500
-+++ src/3rdparty/webkit/Source/JavaScriptCore/wtf/NullPtr.h	2013-01-22 16:05:57.000000000 -0500
-@@ -31,16 +31,21 @@
+--- src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSONObject.cpp.orig	2014-05-01 10:03:45.000000000 -0400
++++ src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSONObject.cpp	2014-05-01 10:06:59.000000000 -0400
+@@ -320,7 +320,7 @@
+             default:
+                 static const char hexDigits[] = "0123456789abcdef";
+                 UChar ch = data[i];
+-                UChar hex[] = { '\\', 'u', hexDigits[(ch >> 12) & 0xF], hexDigits[(ch >> 8) & 0xF], hexDigits[(ch >> 4) & 0xF], hexDigits[ch & 0xF] };
++                UChar hex[] = { '\\', 'u', (UChar) hexDigits[(ch >> 12) & 0xF], (UChar) hexDigits[(ch >> 8) & 0xF], (UChar) hexDigits[(ch >> 4) & 0xF], (UChar) hexDigits[ch & 0xF] };
+                 builder.append(hex, sizeof(hex) / sizeof(UChar));
+                 break;
+         }
+--- src/3rdparty/webkit/Source/JavaScriptCore/wtf/NullPtr.h.orig	2014-04-10 14:37:11.000000000 -0400
++++ src/3rdparty/webkit/Source/JavaScriptCore/wtf/NullPtr.h	2014-05-01 10:22:02.000000000 -0400
+@@ -31,16 +31,22 @@
  // nullptr_t type and nullptr object. They are defined in the same namespaces they
  // would be in compiler and library that had the support.
  
@@ -479,7 +479,7 @@
 +
 +#include <cstddef>
  
--#if __has_feature(cxx_nullptr) || (GCC_VERSION_AT_LEAST(4, 6, 0) && defined(__GXX_EXPERIMENTAL_CXX0X__)) || (defined(_MSC_VER) && _MSC_VER >= 1600 && !COMPILER(INTEL))
+-#if __has_feature(cxx_nullptr) || (GCC_VERSION_AT_LEAST(4, 6, 0) && defined(__GXX_EXPERIMENTAL_CXX0X__)) || (defined(_MSC_VER) && _MSC_VER >= 1600 && !COMPILER(INTEL)) || defined(_LIBCPP_VERSION)
 +// libstdc++ supports nullptr_t starting with gcc 4.6.
 +#if defined(__GLIBCXX__) && __GLIBCXX__ < 20110325
 +namespace std {
@@ -490,7 +490,7 @@
  #define HAVE_NULLPTR 1
  
  #else
--
+ 
 +#warning "reverting to non NULLPTR"
  namespace std {
      class nullptr_t { };
@@ -548,6 +548,17 @@
      return JSValue::encode(jsString(exec, source.substringSharingImpl(0, matchPos), substituteBackreferences(replacementString, source, ovector, 0), source.substringSharingImpl(matchEnd)));
  }
  
+--- src/3rdparty/webkit/Source/JavaScriptCore/runtime/JSONObject.cpp.orig	2014-05-01 10:33:20.000000000 -0400
++++ src/3rdparty/webkit/Source/JavaScriptCore/runtime/JSONObject.cpp	2014-05-01 10:34:03.000000000 -0400
+@@ -335,7 +335,7 @@
+             default:
+                 static const char hexDigits[] = "0123456789abcdef";
+                 UChar ch = data[i];
+-                UChar hex[] = { '\\', 'u', hexDigits[(ch >> 12) & 0xF], hexDigits[(ch >> 8) & 0xF], hexDigits[(ch >> 4) & 0xF], hexDigits[ch & 0xF] };
++                UChar hex[] = { '\\', 'u', (UChar) hexDigits[(ch >> 12) & 0xF], (UChar) hexDigits[(ch >> 8) & 0xF], (UChar) hexDigits[(ch >> 4) & 0xF], (UChar) hexDigits[ch & 0xF] };
+                 builder.append(hex, WTF_ARRAY_LENGTH(hex));
+                 break;
+         }
 --- src/3rdparty/webkit/Source/WebCore/dom/DocumentMarkerController.cpp.orig	2013-01-22 16:04:44.000000000 -0500
 +++ src/3rdparty/webkit/Source/WebCore/dom/DocumentMarkerController.cpp	2013-01-22 16:05:57.000000000 -0500
 @@ -59,7 +59,7 @@
@@ -559,3 +570,47 @@
          addMarker(textPiece->startContainer(exception), marker);
      }
  }
+--- src/3rdparty/webkit/Source/WebCore/dom/Element.cpp.orig	2014-05-01 10:46:05.000000000 -0400
++++ src/3rdparty/webkit/Source/WebCore/dom/Element.cpp	2014-05-01 10:52:18.000000000 -0400
+@@ -1080,7 +1080,7 @@
+ {
+     // Ref currentStyle in case it would otherwise be deleted when setRenderStyle() is called.
+     RefPtr<RenderStyle> currentStyle(renderStyle());
+-    bool hasParentStyle = parentNodeForRenderingAndStyle() ? parentNodeForRenderingAndStyle()->renderStyle() : false;
++    bool hasParentStyle = parentNodeForRenderingAndStyle() ? (parentNodeForRenderingAndStyle()->renderStyle() != NULL) : false;
+     bool hasDirectAdjacentRules = currentStyle && currentStyle->childrenAffectedByDirectAdjacentRules();
+     bool hasIndirectAdjacentRules = currentStyle && currentStyle->childrenAffectedByForwardPositionalRules();
+ 
+--- src/plugins/accessible/widgets/itemviews.cpp.orig	2014-05-01 12:08:45.000000000 -0400
++++ src/plugins/accessible/widgets/itemviews.cpp	2014-05-01 12:28:22.000000000 -0400
+@@ -393,7 +393,7 @@
+     QModelIndex index = view()->model()->index(0, column, view()->rootIndex());
+     if (!index.isValid() || view()->selectionMode() & QAbstractItemView::NoSelection)
+         return false;
+-    view()->selectionModel()->select(index, QItemSelectionModel::Columns & QItemSelectionModel::Deselect);
++    view()->selectionModel()->select(index, QItemSelectionModel::SelectionFlags(QItemSelectionModel::Columns & QItemSelectionModel::Deselect));
+     return true;
+ }
+ 
+--- tools/designer/src/lib/shared/previewmanager.cpp.orig	2014-05-01 12:33:00.000000000 -0400
++++ tools/designer/src/lib/shared/previewmanager.cpp	2014-05-01 12:33:16.000000000 -0400
+@@ -817,7 +817,7 @@
+ {
+     typedef PreviewManagerPrivate::PreviewDataList PreviewDataList;
+     if (d->m_previews.empty())
+-        return false;
++        return 0;
+ 
+     // find matching window
+     const PreviewDataList::const_iterator cend =  d->m_previews.constEnd();
+--- src/scripttools/debugging/qscriptdebuggerconsole.cpp.orig	2014-05-01 13:47:57.000000000 -0400
++++ src/scripttools/debugging/qscriptdebuggerconsole.cpp	2014-05-01 13:48:11.000000000 -0400
+@@ -489,7 +489,7 @@
+     d->input += QLatin1Char('\n');
+     QScriptSyntaxCheckResult check = QScriptEngine::checkSyntax(d->input);
+     if (check.state() == QScriptSyntaxCheckResult::Intermediate)
+-        return false;
++        return 0;
+     d->input.chop(1); // remove the last \n
+     cmd = QString();
+     cmd.append(d->commandPrefix);

Deleted: trunk/dports/aqua/qt4-mac/files/patch-libc++.diff
===================================================================
--- trunk/dports/aqua/qt4-mac/files/patch-libc++.diff	2014-05-06 10:08:33 UTC (rev 119771)
+++ trunk/dports/aqua/qt4-mac/files/patch-libc++.diff	2014-05-06 12:13:33 UTC (rev 119772)
@@ -1,71 +0,0 @@
-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

Modified: trunk/dports/aqua/qt4-mac/files/patch-qmake_qmake.pri.diff
===================================================================
--- trunk/dports/aqua/qt4-mac/files/patch-qmake_qmake.pri.diff	2014-05-06 10:08:33 UTC (rev 119771)
+++ trunk/dports/aqua/qt4-mac/files/patch-qmake_qmake.pri.diff	2014-05-06 12:13:33 UTC (rev 119772)
@@ -1,8 +1,8 @@
---- qmake/qmake.pri.orig	2012-04-23 14:49:04.000000000 -0400
-+++ qmake/qmake.pri	2012-04-17 14:38:16.000000000 -0400
-@@ -136,7 +136,7 @@
+--- qmake/qmake.pri.orig	2014-04-10 14:37:13.000000000 -0400
++++ qmake/qmake.pri	2014-05-01 08:39:42.000000000 -0400
+@@ -135,7 +135,7 @@
+         SOURCES += qfilesystemengine_unix.cpp qfilesystemiterator_unix.cpp qfsfileengine_unix.cpp
          mac {
-           SOURCES += qfilesystemengine_mac.cpp
            SOURCES += qcore_mac.cpp qsettings_mac.cpp
 -          QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.4 #enables weak linking for 10.4 (exported)
 +          QMAKE_MACOSX_DEPLOYMENT_TARGET = @MACOSX_DEPLOYMENT_TARGET@

Deleted: trunk/dports/aqua/qt4-mac/files/patch-src_3rdparty_clucene_src_CLucene_search_FieldCacheImpl.cpp.diff
===================================================================
--- trunk/dports/aqua/qt4-mac/files/patch-src_3rdparty_clucene_src_CLucene_search_FieldCacheImpl.cpp.diff	2014-05-06 10:08:33 UTC (rev 119771)
+++ trunk/dports/aqua/qt4-mac/files/patch-src_3rdparty_clucene_src_CLucene_search_FieldCacheImpl.cpp.diff	2014-05-06 12:13:33 UTC (rev 119772)
@@ -1,12 +0,0 @@
---- src/3rdparty/clucene/src/CLucene/search/FieldCacheImpl.cpp.orig	2013-06-07 07:16:58.000000000 +0200
-+++ src/3rdparty/clucene/src/CLucene/search/FieldCacheImpl.cpp	2013-10-27 16:13:56.000000000 +0100
-@@ -11,6 +11,9 @@
- CL_NS_USE(index)
- CL_NS_DEF(search)
- 
-+
-+using ::wcschr;
-+
- FieldCacheImpl::FieldCacheImpl():
-     cache(false,true){
- }

Deleted: trunk/dports/aqua/qt4-mac/files/patch-src_3rdparty_webkit_Source_WebCore_WebCore.pro.diff
===================================================================
--- trunk/dports/aqua/qt4-mac/files/patch-src_3rdparty_webkit_Source_WebCore_WebCore.pro.diff	2014-05-06 10:08:33 UTC (rev 119771)
+++ trunk/dports/aqua/qt4-mac/files/patch-src_3rdparty_webkit_Source_WebCore_WebCore.pro.diff	2014-05-06 12:13:33 UTC (rev 119772)
@@ -1,11 +0,0 @@
---- src/3rdparty/webkit/Source/WebCore/WebCore.pro.orig	2012-08-08 16:27:24.000000000 -0400
-+++ src/3rdparty/webkit/Source/WebCore/WebCore.pro	2012-08-08 16:30:43.000000000 -0400
-@@ -2975,7 +2975,7 @@
-             platform/mac/WebWindowAnimation.mm
- 
-         DEFINES+=NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES
--        contains(CONFIG, "x86") {
-+        contains(CONFIG, "x86")|contains(CONFIG, "ppc") {
-             DEFINES+=NS_BUILD_32_LIKE_64
-         }
- 

Deleted: trunk/dports/aqua/qt4-mac/files/patch-src_3rdparty_webkit_Source_WebCore_platform_Timer.cpp.diff
===================================================================
--- trunk/dports/aqua/qt4-mac/files/patch-src_3rdparty_webkit_Source_WebCore_platform_Timer.cpp.diff	2014-05-06 10:08:33 UTC (rev 119771)
+++ trunk/dports/aqua/qt4-mac/files/patch-src_3rdparty_webkit_Source_WebCore_platform_Timer.cpp.diff	2014-05-06 12:13:33 UTC (rev 119772)
@@ -1,261 +0,0 @@
---- src/3rdparty/webkit/Source/WebCore/platform/Timer.cpp.orig	2013-06-07 07:16:56.000000000 +0200
-+++ src/3rdparty/webkit/Source/WebCore/platform/Timer.cpp	2013-10-29 21:44:54.000000000 +0100
-@@ -41,6 +41,8 @@
- 
- namespace WebCore {
- 
-+class TimerHeapReference;
-+
- // Timers are stored in a heap data structure, used to implement a priority queue.
- // This allows us to efficiently determine which timer needs to fire the soonest.
- // Then we set a single shared system timer to fire at that time.
-@@ -53,119 +55,147 @@
-     return threadGlobalData().threadTimers().timerHeap();
- }
- 
--// Class to represent elements in the heap when calling the standard library heap algorithms.
--// Maintains the m_heapIndex value in the timers themselves, which allows us to do efficient
--// modification of the heap.
--class TimerHeapElement {
--public:
--    explicit TimerHeapElement(int i)
--        : m_index(i)
--        , m_timer(timerHeap()[m_index])
--    { 
--        checkConsistency(); 
--    }
--
--    TimerHeapElement(const TimerHeapElement&);
--    TimerHeapElement& operator=(const TimerHeapElement&);
--
--    TimerBase* timer() const { return m_timer; }
--
--    void checkConsistency() const
--    {
--        ASSERT(m_index >= 0);
--        ASSERT(m_index < static_cast<int>(timerHeap().size()));
--    }
-+// ----------------
- 
-+class TimerHeapPointer {
-+public:
-+    TimerHeapPointer(TimerBase** pointer) : m_pointer(pointer) { }
-+    TimerHeapReference operator*() const;
-+    TimerBase* operator->() const { return *m_pointer; }
- private:
--    TimerHeapElement();
-+    TimerBase** m_pointer;
-+};
- 
--    int m_index;
--    TimerBase* m_timer;
-+class TimerHeapReference {
-+public:
-+    TimerHeapReference(TimerBase*& reference) : m_reference(reference) { }
-+    operator TimerBase*() const { return m_reference; }
-+    TimerHeapPointer operator&() const { return &m_reference; }
-+    TimerHeapReference& operator=(TimerBase*);
-+    TimerHeapReference& operator=(TimerHeapReference);
-+private:
-+    TimerBase*& m_reference;
- };
- 
--inline TimerHeapElement::TimerHeapElement(const TimerHeapElement& o)
--    : m_index(-1), m_timer(o.timer())
-+inline TimerHeapReference TimerHeapPointer::operator*() const
- {
-+    return *m_pointer;
- }
- 
--inline TimerHeapElement& TimerHeapElement::operator=(const TimerHeapElement& o)
-+inline TimerHeapReference& TimerHeapReference::operator=(TimerBase* timer)
- {
--    TimerBase* t = o.timer();
--    m_timer = t;
--    if (m_index != -1) {
--        checkConsistency();
--        timerHeap()[m_index] = t;
--        t->m_heapIndex = m_index;
--    }
-+    m_reference = timer;
-+    Vector<TimerBase*>& heap = timerHeap();
-+    if (&m_reference >= heap.data() && &m_reference < heap.data() + heap.size())
-+        timer->m_heapIndex = &m_reference - heap.data();
-     return *this;
- }
- 
--inline bool operator<(const TimerHeapElement& a, const TimerHeapElement& b)
-+inline TimerHeapReference& TimerHeapReference::operator=(TimerHeapReference b)
- {
--    // The comparisons below are "backwards" because the heap puts the largest 
--    // element first and we want the lowest time to be the first one in the heap.
--    double aFireTime = a.timer()->m_nextFireTime;
--    double bFireTime = b.timer()->m_nextFireTime;
--    if (bFireTime != aFireTime)
--        return bFireTime < aFireTime;
-+    TimerBase* timer = b;
-+    return *this = timer;
-+}
-+
-+inline void swap(TimerHeapReference a, TimerHeapReference b)
-+{
-+    TimerBase* timerA = a;
-+    TimerBase* timerB = b;
-     
--    // We need to look at the difference of the insertion orders instead of comparing the two 
--    // outright in case of overflow. 
--    unsigned difference = a.timer()->m_heapInsertionOrder - b.timer()->m_heapInsertionOrder;
--    return difference < UINT_MAX / 2;
-+    // Invoke the assignment operator, since that takes care of updating m_heapIndex.
-+    a = timerB;
-+    b = timerA;
- }
- 
- // ----------------
- 
- // Class to represent iterators in the heap when calling the standard library heap algorithms.
--// Returns TimerHeapElement for elements in the heap rather than the TimerBase pointers themselves.
--class TimerHeapIterator : public iterator<random_access_iterator_tag, TimerHeapElement, int> {
-+// Uses a custom pointer and reference type that update indices for pointers in the heap.
-+class TimerHeapIterator : public iterator<random_access_iterator_tag, TimerBase*, ptrdiff_t, TimerHeapPointer, TimerHeapReference> {
- public:
--    TimerHeapIterator() : m_index(-1) { }
--    TimerHeapIterator(int i) : m_index(i) { checkConsistency(); }
--
--    TimerHeapIterator& operator++() { checkConsistency(); ++m_index; checkConsistency(); return *this; }
--    TimerHeapIterator operator++(int) { checkConsistency(); checkConsistency(1); return m_index++; }
--
--    TimerHeapIterator& operator--() { checkConsistency(); --m_index; checkConsistency(); return *this; }
--    TimerHeapIterator operator--(int) { checkConsistency(); checkConsistency(-1); return m_index--; }
-+    explicit TimerHeapIterator(TimerBase** pointer) : m_pointer(pointer) { checkConsistency(); }
-+    
-+    TimerHeapIterator& operator++() { checkConsistency(); ++m_pointer; checkConsistency(); return *this; }
-+    TimerHeapIterator operator++(int) { checkConsistency(1); return TimerHeapIterator(m_pointer++); }
-+    
-+    TimerHeapIterator& operator--() { checkConsistency(); --m_pointer; checkConsistency(); return *this; }
-+    TimerHeapIterator operator--(int) { checkConsistency(-1); return TimerHeapIterator(m_pointer--); }
-+    
-+    TimerHeapIterator& operator+=(ptrdiff_t i) { checkConsistency(); m_pointer += i; checkConsistency(); return *this; }
-+    TimerHeapIterator& operator-=(ptrdiff_t i) { checkConsistency(); m_pointer -= i; checkConsistency(); return *this; }
-+    
-+    TimerHeapReference operator*() const { return TimerHeapReference(*m_pointer); }
-+    TimerHeapReference operator[](ptrdiff_t i) const { return TimerHeapReference(m_pointer[i]); }
-+    TimerBase* operator->() const { return *m_pointer; }
-+    
-+private:
-+    void checkConsistency(ptrdiff_t offset = 0) const
-+    {
-+        ASSERT(m_pointer >= timerHeap().data());
-+        ASSERT(m_pointer <= timerHeap().data() + timerHeap().size());
-+        ASSERT_UNUSED(offset, m_pointer + offset >= timerHeap().data());
-+        ASSERT_UNUSED(offset, m_pointer + offset <= timerHeap().data() + timerHeap().size());
-+    }
-+    
-+    friend bool operator==(TimerHeapIterator, TimerHeapIterator);
-+    friend bool operator!=(TimerHeapIterator, TimerHeapIterator);
-+    friend bool operator<(TimerHeapIterator, TimerHeapIterator);
-+    friend bool operator>(TimerHeapIterator, TimerHeapIterator);
-+    friend bool operator<=(TimerHeapIterator, TimerHeapIterator);
-+    friend bool operator>=(TimerHeapIterator, TimerHeapIterator);
-+    
-+    friend TimerHeapIterator operator+(TimerHeapIterator, size_t);
-+    friend TimerHeapIterator operator+(size_t, TimerHeapIterator);
-+    
-+    friend TimerHeapIterator operator-(TimerHeapIterator, size_t);
-+    friend ptrdiff_t operator-(TimerHeapIterator, TimerHeapIterator);
-+    
-+    TimerBase** m_pointer;
-+};
- 
--    TimerHeapIterator& operator+=(int i) { checkConsistency(); m_index += i; checkConsistency(); return *this; }
--    TimerHeapIterator& operator-=(int i) { checkConsistency(); m_index -= i; checkConsistency(); return *this; }
-+inline bool operator==(TimerHeapIterator a, TimerHeapIterator b) { return a.m_pointer == b.m_pointer; }
-+inline bool operator!=(TimerHeapIterator a, TimerHeapIterator b) { return a.m_pointer != b.m_pointer; }
-+inline bool operator<(TimerHeapIterator a, TimerHeapIterator b) { return a.m_pointer < b.m_pointer; }
-+inline bool operator>(TimerHeapIterator a, TimerHeapIterator b) { return a.m_pointer > b.m_pointer; }
-+inline bool operator<=(TimerHeapIterator a, TimerHeapIterator b) { return a.m_pointer <= b.m_pointer; }
-+inline bool operator>=(TimerHeapIterator a, TimerHeapIterator b) { return a.m_pointer >= b.m_pointer; }
- 
--    TimerHeapElement operator*() const { return TimerHeapElement(m_index); }
--    TimerHeapElement operator[](int i) const { return TimerHeapElement(m_index + i); }
-+inline TimerHeapIterator operator+(TimerHeapIterator a, size_t b) { return TimerHeapIterator(a.m_pointer + b); }
-+inline TimerHeapIterator operator+(size_t a, TimerHeapIterator b) { return TimerHeapIterator(a + b.m_pointer); }
- 
--    int index() const { return m_index; }
-+inline TimerHeapIterator operator-(TimerHeapIterator a, size_t b) { return TimerHeapIterator(a.m_pointer - b); }
-+inline ptrdiff_t operator-(TimerHeapIterator a, TimerHeapIterator b) { return a.m_pointer - b.m_pointer; }
- 
--    void checkConsistency(int offset = 0) const
--    {
--        ASSERT_UNUSED(offset, m_index + offset >= 0);
--        ASSERT_UNUSED(offset, m_index + offset <= static_cast<int>(timerHeap().size()));
--    }
-+// ----------------
- 
--private:
--    int m_index;
-+class TimerHeapLessThanFunction {
-+public:
-+    bool operator()(TimerBase*, TimerBase*) const;
- };
- 
--inline bool operator==(TimerHeapIterator a, TimerHeapIterator b) { return a.index() == b.index(); }
--inline bool operator!=(TimerHeapIterator a, TimerHeapIterator b) { return a.index() != b.index(); }
--inline bool operator<(TimerHeapIterator a, TimerHeapIterator b) { return a.index() < b.index(); }
--
--inline TimerHeapIterator operator+(TimerHeapIterator a, int b) { return a.index() + b; }
--inline TimerHeapIterator operator+(int a, TimerHeapIterator b) { return a + b.index(); }
--
--inline TimerHeapIterator operator-(TimerHeapIterator a, int b) { return a.index() - b; }
--inline int operator-(TimerHeapIterator a, TimerHeapIterator b) { return a.index() - b.index(); }
-+inline bool TimerHeapLessThanFunction::operator()(TimerBase* a, TimerBase* b) const
-+{
-+    // The comparisons below are "backwards" because the heap puts the largest
-+    // element first and we want the lowest time to be the first one in the heap.
-+    double aFireTime = a->m_nextFireTime;
-+    double bFireTime = b->m_nextFireTime;
-+    if (bFireTime != aFireTime)
-+        return bFireTime < aFireTime;
-+    
-+    // We need to look at the difference of the insertion orders instead of comparing the two
-+    // outright in case of overflow.
-+    unsigned difference = a->m_heapInsertionOrder - b->m_heapInsertionOrder;
-+    return difference < numeric_limits<unsigned>::max() / 2;
-+}
- 
- // ----------------
- 
- TimerBase::TimerBase()
--    : m_nextFireTime(0)
--    , m_repeatInterval(0)
--    , m_heapIndex(-1)
-+: m_nextFireTime(0)
-+, m_repeatInterval(0)
-+, m_heapIndex(-1)
- #ifndef NDEBUG
--    , m_thread(currentThread())
-+, m_thread(currentThread())
- #endif
- {
- }
-@@ -225,7 +255,8 @@
- {
-     ASSERT(m_nextFireTime != 0);
-     checkHeapIndex();
--    push_heap(TimerHeapIterator(0), TimerHeapIterator(m_heapIndex + 1));
-+    TimerBase** heapData = timerHeap().data();
-+    push_heap(TimerHeapIterator(heapData), TimerHeapIterator(heapData + m_heapIndex + 1), TimerHeapLessThanFunction());
-     checkHeapIndex();
- }
- 
-@@ -274,7 +305,9 @@
- {
-     ASSERT(this == timerHeap().first());
-     checkHeapIndex();
--    pop_heap(TimerHeapIterator(0), TimerHeapIterator(timerHeap().size()));
-+    Vector<TimerBase*>& heap = timerHeap();
-+    TimerBase** heapData = heap.data();
-+    pop_heap(TimerHeapIterator(heapData), TimerHeapIterator(heapData + heap.size()), TimerHeapLessThanFunction());
-     checkHeapIndex();
-     ASSERT(this == timerHeap().last());
- }

Deleted: trunk/dports/aqua/qt4-mac/files/patch-src_3rdparty_webkit_Source_WebCore_platform_Timer.h.diff
===================================================================
--- trunk/dports/aqua/qt4-mac/files/patch-src_3rdparty_webkit_Source_WebCore_platform_Timer.h.diff	2014-05-06 10:08:33 UTC (rev 119771)
+++ trunk/dports/aqua/qt4-mac/files/patch-src_3rdparty_webkit_Source_WebCore_platform_Timer.h.diff	2014-05-06 12:13:33 UTC (rev 119772)
@@ -1,14 +0,0 @@
---- src/3rdparty/webkit/Source/WebCore/platform/Timer.h.orig	2013-06-07 07:16:56.000000000 +0200
-+++ src/3rdparty/webkit/Source/WebCore/platform/Timer.h	2013-10-29 21:47:03.000000000 +0100
-@@ -84,9 +84,9 @@
-     ThreadIdentifier m_thread;
- #endif
- 
--    friend class TimerHeapElement;
-     friend class ThreadTimers;
--    friend bool operator<(const TimerHeapElement&, const TimerHeapElement&);
-+    friend class TimerHeapLessThanFunction;
-+    friend class TimerHeapReference;
- };
- 
- template <typename TimerFiredClass> class Timer : public TimerBase {

Deleted: trunk/dports/aqua/qt4-mac/files/patch-src_3rdparty_webkit_Source_WebCore_platform_network_qt_QNetworkReplyHandler.cpp.diff
===================================================================
--- trunk/dports/aqua/qt4-mac/files/patch-src_3rdparty_webkit_Source_WebCore_platform_network_qt_QNetworkReplyHandler.cpp.diff	2014-05-06 10:08:33 UTC (rev 119771)
+++ trunk/dports/aqua/qt4-mac/files/patch-src_3rdparty_webkit_Source_WebCore_platform_network_qt_QNetworkReplyHandler.cpp.diff	2014-05-06 12:13:33 UTC (rev 119772)
@@ -1,82 +0,0 @@
---- src/3rdparty/webkit/Source/WebCore/platform/network/qt/QNetworkReplyHandler.orig	2013-06-07 07:16:56.000000000 +0200
-+++ src/3rdparty/webkit/Source/WebCore/platform/network/qt/QNetworkReplyHandler.cpp	2013-10-28 17:59:45.000000000 +0100
-@@ -234,8 +234,8 @@
- 
-     resetConnections();
-     QNetworkReply* reply = m_reply;
--    m_reply = 0;
--    m_sniffer = 0;
-+    m_reply = nullptr;
-+    m_sniffer = nullptr;
- 
-     reply->setParent(0);
-     return reply;
-@@ -300,7 +300,7 @@
-     Q_ASSERT(m_sniffer);
- 
-     m_sniffedMIMEType = m_sniffer->mimeType();
--    m_sniffer = 0;
-+    m_sniffer = nullptr;
- 
-     emitMetaDataChanged();
- }
-@@ -392,7 +392,7 @@
-     else
-         m_method = QNetworkAccessManager::CustomOperation;
- 
--    QObject* originatingObject = 0;
-+    QObject* originatingObject = nullptr;
-     if (m_resourceHandle->getInternal()->m_context)
-         originatingObject = m_resourceHandle->getInternal()->m_context->originatingObject();
- 
-@@ -417,7 +417,7 @@
-         return 0;
- 
-     QNetworkReply* reply = m_replyWrapper->release();
--    m_replyWrapper = 0;
-+    m_replyWrapper = nullptr;
-     return reply;
- }
- 
-@@ -440,12 +440,12 @@
- 
-     ResourceHandleClient* client = m_resourceHandle->client();
-     if (!client) {
--        m_replyWrapper = 0;
-+        m_replyWrapper = nullptr;
-         return;
-     }
- 
-     if (m_replyWrapper->wasRedirected()) {
--        m_replyWrapper = 0;
-+        m_replyWrapper = nullptr;
-         m_queue.push(&QNetworkReplyHandler::start);
-         return;
-     }
-@@ -465,7 +465,7 @@
-         }
-     }
- 
--    m_replyWrapper = 0;
-+    m_replyWrapper = nullptr;
- }
- 
- void QNetworkReplyHandler::sendResponseIfNeeded()
-@@ -539,7 +539,7 @@
-                             newUrl.toString(),
-                             QCoreApplication::translate("QWebPage", "Redirection limit reached"));
-         client->didFail(m_resourceHandle, error);
--        m_replyWrapper = 0;
-+        m_replyWrapper = nullptr;
-         return;
-     }
- 
-@@ -562,7 +562,7 @@
-     if (wasAborted()) // Network error cancelled the request.
-         return;
- 
--    QObject* originatingObject = 0;
-+    QObject* originatingObject = nullptr;
-     if (m_resourceHandle->getInternal()->m_context)
-         originatingObject = m_resourceHandle->getInternal()->m_context->originatingObject();
- 

Deleted: trunk/dports/aqua/qt4-mac/files/patch-src_3rdparty_webkit_Source_WebKit_qt_Api_qgraphicswebview.cpp.diff
===================================================================
--- trunk/dports/aqua/qt4-mac/files/patch-src_3rdparty_webkit_Source_WebKit_qt_Api_qgraphicswebview.cpp.diff	2014-05-06 10:08:33 UTC (rev 119771)
+++ trunk/dports/aqua/qt4-mac/files/patch-src_3rdparty_webkit_Source_WebKit_qt_Api_qgraphicswebview.cpp.diff	2014-05-06 12:13:33 UTC (rev 119772)
@@ -1,11 +0,0 @@
---- src/3rdparty/webkit/Source/WebKit/qt/Api/qgraphicswebview.cpp.orig	2013-06-07 07:16:58.000000000 +0200
-+++ src/3rdparty/webkit/Source/WebKit/qt/Api/qgraphicswebview.cpp	2013-10-28 18:54:43.000000000 +0100
-@@ -471,7 +471,7 @@
-         return;
- 
-     page->d->view.clear();
--    page->d->client = 0;
-+    page->d->client = nullptr;
- 
-     // if the page was created by us, we own it and need to
-     // destroy it as well.

Deleted: trunk/dports/aqua/qt4-mac/files/patch-src_3rdparty_webkit_Source_WebKit_qt_QtWebKit.pro.diff
===================================================================
--- trunk/dports/aqua/qt4-mac/files/patch-src_3rdparty_webkit_Source_WebKit_qt_QtWebKit.pro.diff	2014-05-06 10:08:33 UTC (rev 119771)
+++ trunk/dports/aqua/qt4-mac/files/patch-src_3rdparty_webkit_Source_WebKit_qt_QtWebKit.pro.diff	2014-05-06 12:13:33 UTC (rev 119772)
@@ -1,38 +0,0 @@
---- src/3rdparty/webkit/Source/WebKit/qt/QtWebKit.pro.orig	2013-06-07 07:16:58.000000000 +0200
-+++ src/3rdparty/webkit/Source/WebKit/qt/QtWebKit.pro	2013-10-30 10:10:17.000000000 +0100
-@@ -233,7 +233,7 @@
-                        $$SOURCE_DIR/../WebKitLibraries/
- 
-         DEFINES+=NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES
--        contains(CONFIG, "x86") {
-+        contains(CONFIG, "x86")|contains(CONFIG, "ppc") {
-             DEFINES+=NS_BUILD_32_LIKE_64
-         }
- 
-@@ -255,6 +255,8 @@
-             LIBS += $$SOURCE_DIR/../WebKitLibraries/libWebKitSystemInterfaceLion.a
-         } else: equals(DARWIN_MAJOR_VERSION, "12") | contains(QMAKE_MAC_SDK, ".*MacOSX10.8.sdk") {
-             LIBS += $$SOURCE_DIR/../WebKitLibraries/libWebKitSystemInterfaceMountainLion.a
-+        } else: equals(DARWIN_MAJOR_VERSION, "13") | contains(QMAKE_MAC_SDK, ".*MacOSX10.9.sdk") {
-+            LIBS += $$SOURCE_DIR/../WebKitLibraries/libWebKitSystemInterfaceMavericks.a
-         }
-     }
- }
-@@ -297,7 +299,7 @@
- 
- !symbian-abld:!symbian-sbsv2 {
-     modfile.files = $$moduleFile
--    modfile.path = $$[QMAKE_MKSPECS]/modules
-+    modfile.path = $$[QT_INSTALL_DATA]/mkspecs/modules
- 
-     INSTALLS += modfile
- } else {
-@@ -305,7 +307,7 @@
- 
-     inst_modfile.commands = $$QMAKE_COPY ${QMAKE_FILE_NAME} ${QMAKE_FILE_OUT}
-     inst_modfile.input = moduleFile
--    inst_modfile.output = $$[QMAKE_MKSPECS]/modules
-+    inst_modfile.output = $$[QT_INSTALL_DATA]/mkspecs/modules
-     inst_modfile.CONFIG = no_clean
- 
-     QMAKE_EXTRA_COMPILERS += inst_modfile

Deleted: trunk/dports/aqua/qt4-mac/files/patch-src_3rdparty_webkit_Source_WebKit_qt_WebCoreSupport_NotificationPresenterClientQt.cpp.diff
===================================================================
--- trunk/dports/aqua/qt4-mac/files/patch-src_3rdparty_webkit_Source_WebKit_qt_WebCoreSupport_NotificationPresenterClientQt.cpp.diff	2014-05-06 10:08:33 UTC (rev 119771)
+++ trunk/dports/aqua/qt4-mac/files/patch-src_3rdparty_webkit_Source_WebKit_qt_WebCoreSupport_NotificationPresenterClientQt.cpp.diff	2014-05-06 12:13:33 UTC (rev 119772)
@@ -1,89 +0,0 @@
---- src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp.orig	2013-06-07 07:16:58.000000000 +0200
-+++ src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp	2013-10-28 19:04:41.000000000 +0100
-@@ -54,7 +54,7 @@
- 
- bool NotificationPresenterClientQt::dumpNotification = false;
- 
--NotificationPresenterClientQt* s_notificationPresenter = 0;
-+NotificationPresenterClientQt* s_notificationPresenter = nullptr;
- 
- NotificationPresenterClientQt* NotificationPresenterClientQt::notificationPresenter()
- {
-@@ -73,9 +73,9 @@
- #if ENABLE(NOTIFICATIONS)
- 
- #ifndef QT_NO_SYSTEMTRAYICON
--    m_notificationIcon = 0;
-+    m_notificationIcon = nullptr;
- #endif
--    m_presenter = 0;
-+    m_presenter = nullptr;
- #endif
- }
- 
-@@ -164,7 +164,7 @@
- {
-     m_clientCount--;
-     if (!m_clientCount) {
--        s_notificationPresenter = 0;
-+        s_notificationPresenter = nullptr;
-         delete this;
-     }
- }
-@@ -276,7 +276,7 @@
-         return;
-     NotificationsQueue::ConstIterator end = m_notifications.end();
-     NotificationsQueue::ConstIterator iter = m_notifications.begin();
--    Notification* notification = 0;
-+    Notification* notification = nullptr;
-     while (iter != end) {
-         notification = iter.key();
-         QString notificationTitle;
-@@ -300,7 +300,7 @@
-         iter++;
-     if (iter != end)
-         return iter.key();
--    return 0;
-+    return nullptr;
- }
- 
- void NotificationPresenterClientQt::notificationObjectDestroyed(Notification* notification)
-@@ -388,7 +388,7 @@
- 
- void NotificationPresenterClientQt::removeReplacedNotificationFromQueue(Notification* notification)
- {
--    Notification* oldNotification = 0;
-+    Notification* oldNotification = nullptr;
-     NotificationsQueue::Iterator end = m_notifications.end();
-     NotificationsQueue::Iterator iter = m_notifications.begin();
- 
-@@ -437,13 +437,13 @@
- QWebPage* NotificationPresenterClientQt::toPage(ScriptExecutionContext* context)
- {
-     if (!context || context->isWorkerContext())
--        return 0;
-+        return nullptr;
- 
-     Document* document = static_cast<Document*>(context);
- 
-     Page* page = document->page();
-     if (!page || !page->mainFrame())
--        return 0;
-+        return nullptr;
- 
-     return QWebFramePrivate::kit(page->mainFrame())->page();
- }
-@@ -451,11 +451,11 @@
- QWebFrame* NotificationPresenterClientQt::toFrame(ScriptExecutionContext* context)
- {
-     if (!context || context->isWorkerContext())
--        return 0;
-+        return nullptr;
- 
-     Document* document = static_cast<Document*>(context);
-     if (!document || !document->frame())
--        return 0;
-+        return nullptr;
- 
-     return QWebFramePrivate::kit(document->frame());
- }

Deleted: trunk/dports/aqua/qt4-mac/files/patch-src_corelib_global_qglobal.h.diff
===================================================================
--- trunk/dports/aqua/qt4-mac/files/patch-src_corelib_global_qglobal.h.diff	2014-05-06 10:08:33 UTC (rev 119771)
+++ trunk/dports/aqua/qt4-mac/files/patch-src_corelib_global_qglobal.h.diff	2014-05-06 12:13:33 UTC (rev 119772)
@@ -1,14 +0,0 @@
---- src/corelib/global/qglobal.h.orig	2013-06-07 07:16:52.000000000 +0200
-+++ src/corelib/global/qglobal.h	2013-10-27 14:05:22.000000000 +0100
-@@ -327,7 +327,10 @@
- #  if !defined(MAC_OS_X_VERSION_10_8)
- #       define MAC_OS_X_VERSION_10_8 MAC_OS_X_VERSION_10_7 + 1
- #  endif
--#  if (MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_8)
-+#  if !defined(MAC_OS_X_VERSION_10_9)
-+#       define MAC_OS_X_VERSION_10_9 MAC_OS_X_VERSION_10_8 + 1
-+#  endif
-+#  if (MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_9)
- #    warning "This version of Mac OS X is unsupported"
- #  endif
- #endif

Deleted: trunk/dports/aqua/qt4-mac/files/patch-src_plugins_bearer_corewlan_qcorewlanengine.mm.diff
===================================================================
--- trunk/dports/aqua/qt4-mac/files/patch-src_plugins_bearer_corewlan_qcorewlanengine.mm.diff	2014-05-06 10:08:33 UTC (rev 119771)
+++ trunk/dports/aqua/qt4-mac/files/patch-src_plugins_bearer_corewlan_qcorewlanengine.mm.diff	2014-05-06 12:13:33 UTC (rev 119772)
@@ -1,1382 +0,0 @@
---- src/plugins/bearer/corewlan/qcorewlanengine.mm
-+++ src/plugins/bearer/corewlan/qcorewlanengine.mm
-@@ -52,29 +52,17 @@
- #include <QtCore/qdebug.h>
- 
- #include <QDir>
--#include <CoreWLAN/CoreWLAN.h>
--#include <CoreWLAN/CWInterface.h>
--#include <CoreWLAN/CWNetwork.h>
--#include <CoreWLAN/CWNetwork.h>
--#include <CoreWLAN/CW8021XProfile.h>
--
--#include <Foundation/NSEnumerator.h>
--#include <Foundation/NSKeyValueObserving.h>
--#include <Foundation/NSAutoreleasePool.h>
--#include <Foundation/NSLock.h>
--
--#include <SystemConfiguration/SCNetworkConfiguration.h>
-+
-+extern "C" { // Otherwise it won't find CWKeychain* symbols at link time
-+#import <CoreWLAN/CoreWLAN.h>
-+}
-+
- #include "private/qcore_mac_p.h"
- 
- #include <net/if.h>
- #include <ifaddrs.h>
- 
--inline QString qt_NSStringToQString(const NSString *nsstr)
--{ return QCFString::toQString(reinterpret_cast<const CFStringRef>(nsstr)); }
--
--inline NSString *qt_QStringToNSString(const QString &qstr)
--{ return [const_cast<NSString *>(reinterpret_cast<const NSString *>(QCFString::toCFStringRef(qstr))) autorelease]; }
--
-+#if __MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7
- 
- @interface QT_MANGLE_NAMESPACE(QNSListener) : NSObject
- {
-@@ -86,6 +74,7 @@ inline NSString *qt_QStringToNSString(const QString &qstr)
- - (void)notificationHandler;//:(NSNotification *)notification;
- - (void)remove;
- - (void)setEngine:(QCoreWlanEngine *)coreEngine;
-+- (QCoreWlanEngine *)engine;
- - (void)dealloc;
- 
- @property (assign) QCoreWlanEngine* engine;
-@@ -93,7 +82,6 @@ inline NSString *qt_QStringToNSString(const QString &qstr)
- @end
- 
- @implementation QT_MANGLE_NAMESPACE(QNSListener)
-- at synthesize engine;
- 
- - (id) init
- {
-@@ -101,7 +89,7 @@ inline NSString *qt_QStringToNSString(const QString &qstr)
-     NSAutoreleasePool *autoreleasepool = [[NSAutoreleasePool alloc] init];
-     notificationCenter = [NSNotificationCenter defaultCenter];
-     currentInterface = [CWInterface interfaceWithName:nil];
--    [notificationCenter addObserver:self selector:@selector(notificationHandler:) name:kCWPowerDidChangeNotification object:nil];
-+    [notificationCenter addObserver:self selector:@selector(notificationHandler:) name:CWPowerDidChangeNotification object:nil];
-     [locker unlock];
-     [autoreleasepool release];
-     return self;
-@@ -120,6 +108,11 @@ inline NSString *qt_QStringToNSString(const QString &qstr)
-     [locker unlock];
- }
- 
-+-(QCoreWlanEngine *)engine
-+{
-+    return engine;
-+}
-+
- -(void)remove
- {
-     [locker lock];
-@@ -133,7 +126,7 @@ inline NSString *qt_QStringToNSString(const QString &qstr)
- }
- @end
- 
--QT_MANGLE_NAMESPACE(QNSListener) *listener = 0;
-+static QT_MANGLE_NAMESPACE(QNSListener) *listener = 0;
- 
- QT_BEGIN_NAMESPACE
- 
-@@ -170,36 +163,28 @@ void QScanThread::run()
-     NSAutoreleasePool *autoreleasepool = [[NSAutoreleasePool alloc] init];
-     QStringList found;
-     mutex.lock();
--    CWInterface *currentInterface = [CWInterface interfaceWithName:qt_QStringToNSString(interfaceName)];
-+    CWInterface *currentInterface = [CWInterface interfaceWithName: (NSString *)QCFString::toCFStringRef(interfaceName)];
-     mutex.unlock();
- 
--    if([currentInterface power]) {
-+    if (currentInterface.powerOn) {
-         NSError *err = nil;
--        NSDictionary *parametersDict =  [NSDictionary dictionaryWithObjectsAndKeys:
--                                   [NSNumber numberWithBool:YES], kCWScanKeyMerge,
--                                   [NSNumber numberWithInt:kCWScanTypeFast], kCWScanKeyScanType,
--                                   [NSNumber numberWithInteger:100], kCWScanKeyRestTime, nil];
- 
--        NSArray* apArray = [currentInterface scanForNetworksWithParameters:parametersDict error:&err];
--        CWNetwork *apNetwork;
-+        NSSet* apSet = [currentInterface scanForNetworksWithName:nil error:&err];
- 
-         if (!err) {
--
--            for(uint row=0; row < [apArray count]; row++ ) {
--                apNetwork = [apArray objectAtIndex:row];
--
--                const QString networkSsid = qt_NSStringToQString([apNetwork ssid]);
-+            for (CWNetwork *apNetwork in apSet) {
-+                const QString networkSsid = QCFString::toQString(CFStringRef([apNetwork ssid]));
-                 const QString id = QString::number(qHash(QLatin1String("corewlan:") + networkSsid));
-                 found.append(id);
- 
-                 QNetworkConfiguration::StateFlags state = QNetworkConfiguration::Undefined;
-                 bool known = isKnownSsid(networkSsid);
--                if( [currentInterface.interfaceState intValue] == kCWInterfaceStateRunning) {
--                    if( networkSsid == qt_NSStringToQString( [currentInterface ssid])) {
-+                if (currentInterface.serviceActive) {
-+                    if( networkSsid == QCFString::toQString(CFStringRef([currentInterface ssid]))) {
-                         state = QNetworkConfiguration::Active;
-                     }
-                 }
--                if(state == QNetworkConfiguration::Undefined) {
-+                if (state == QNetworkConfiguration::Undefined) {
-                     if(known) {
-                         state = QNetworkConfiguration::Discovered;
-                     } else {
-@@ -207,7 +192,7 @@ void QScanThread::run()
-                     }
-                 }
-                 QNetworkConfiguration::Purpose purpose = QNetworkConfiguration::UnknownPurpose;
--                if([[apNetwork securityMode] intValue] == kCWSecurityModeOpen) {
-+                if ([apNetwork supportsSecurity:kCWSecurityNone]) {
-                     purpose = QNetworkConfiguration::PublicPurpose;
-                 } else {
-                     purpose = QNetworkConfiguration::PrivatePurpose;
-@@ -237,8 +222,8 @@ void QScanThread::run()
-                 interfaceName = ij.value();
-             }
- 
--            if( [currentInterface.interfaceState intValue] == kCWInterfaceStateRunning) {
--                if( networkSsid == qt_NSStringToQString([currentInterface ssid])) {
-+            if (currentInterface.serviceActive) {
-+                if( networkSsid == QCFString::toQString(CFStringRef([currentInterface ssid]))) {
-                     state = QNetworkConfiguration::Active;
-                 }
-             }
-@@ -300,14 +285,14 @@ void QScanThread::getUserConfigurations()
-     NSAutoreleasePool *autoreleasepool = [[NSAutoreleasePool alloc] init];
-     userProfiles.clear();
- 
--    NSArray *wifiInterfaces = [CWInterface supportedInterfaces];
--    for(uint row=0; row < [wifiInterfaces count]; row++ ) {
-+    NSSet *wifiInterfaces = [CWInterface interfaceNames];
-+    for (NSString *ifName in wifiInterfaces) {
- 
--        CWInterface *wifiInterface = [CWInterface interfaceWithName: [wifiInterfaces objectAtIndex:row]];
--        if ( ![wifiInterface power] )
-+        CWInterface *wifiInterface = [CWInterface interfaceWithName: ifName];
-+        if (!wifiInterface.powerOn)
-             continue;
- 
--        NSString *nsInterfaceName = [wifiInterface name];
-+        NSString *nsInterfaceName = wifiInterface.ssid;
- // add user configured system networks
-         SCDynamicStoreRef dynRef = SCDynamicStoreCreate(kCFAllocatorSystemDefault, (CFStringRef)@"Qt corewlan", nil, nil);
-         NSDictionary * airportPlist = (NSDictionary *)SCDynamicStoreCopyValue(dynRef, (CFStringRef)[NSString stringWithFormat:@"Setup:/Network/Interface/%@/AirPort", nsInterfaceName]);
-@@ -316,11 +301,11 @@ void QScanThread::getUserConfigurations()
-             NSDictionary *prefNetDict = [airportPlist objectForKey:@"PreferredNetworks"];
- 
-             NSArray *thisSsidarray = [prefNetDict valueForKey:@"SSID_STR"];
--            for(NSString *ssidkey in thisSsidarray) {
--                QString thisSsid = qt_NSStringToQString(ssidkey);
-+            for (NSString *ssidkey in thisSsidarray) {
-+                QString thisSsid = QCFString::toQString(CFStringRef(ssidkey));
-                 if(!userProfiles.contains(thisSsid)) {
-                     QMap <QString,QString> map;
--                    map.insert(thisSsid, qt_NSStringToQString(nsInterfaceName));
-+                    map.insert(thisSsid, QCFString::toQString(CFStringRef(nsInterfaceName)));
-                     userProfiles.insert(thisSsid, map);
-                 }
-             }
-@@ -329,7 +314,7 @@ void QScanThread::getUserConfigurations()
- 
-         // 802.1X user profiles
-         QString userProfilePath = QDir::homePath() + "/Library/Preferences/com.apple.eap.profiles.plist";
--        NSDictionary* eapDict = [[[NSDictionary alloc] initWithContentsOfFile:qt_QStringToNSString(userProfilePath)] autorelease];
-+        NSDictionary* eapDict = [[[NSDictionary alloc] initWithContentsOfFile: (NSString *)QCFString::toCFStringRef(userProfilePath)] autorelease];
-         if(eapDict != nil) {
-             NSString *profileStr= @"Profiles";
-             NSString *nameStr = @"UserDefinedName";
-@@ -348,15 +333,15 @@ void QScanThread::getUserConfigurations()
-                         QString ssid;
-                         for(int i = 0; i < dictSize; i++) {
-                             if([nameStr isEqualToString:keys[i]]) {
--                                networkName = qt_NSStringToQString(objects[i]);
-+                                networkName = QCFString::toQString(CFStringRef(objects[i]));
-                             }
-                             if([networkSsidStr isEqualToString:keys[i]]) {
--                                ssid = qt_NSStringToQString(objects[i]);
-+                                ssid = QCFString::toQString(CFStringRef(objects[i]));
-                             }
-                             if(!userProfiles.contains(networkName)
-                                 && !ssid.isEmpty()) {
-                                 QMap<QString,QString> map;
--                                map.insert(ssid, qt_NSStringToQString(nsInterfaceName));
-+                                map.insert(ssid, QCFString::toQString(CFStringRef(nsInterfaceName)));
-                                 userProfiles.insert(networkName, map);
-                             }
-                         }
-@@ -444,7 +429,7 @@ void QCoreWlanEngine::initialize()
-     QMutexLocker locker(&mutex);
-     NSAutoreleasePool *autoreleasepool = [[NSAutoreleasePool alloc] init];
- 
--    if([[CWInterface supportedInterfaces] count] > 0 && !listener) {
-+    if ([[CWInterface interfaceNames] count] > 0 && !listener) {
-         listener = [[QT_MANGLE_NAMESPACE(QNSListener) alloc] init];
-         listener.engine = this;
-         hasWifi = true;
-@@ -479,141 +464,68 @@ void QCoreWlanEngine::connectToId(const QString &id)
-     QString interfaceString = getInterfaceFromId(id);
- 
-     CWInterface *wifiInterface =
--        [CWInterface interfaceWithName: qt_QStringToNSString(interfaceString)];
-+        [CWInterface interfaceWithName: (NSString *)QCFString::toCFStringRef(interfaceString)];
- 
--    if ([wifiInterface power]) {
-+    if (wifiInterface.powerOn) {
-         NSError *err = nil;
--        NSMutableDictionary *params = [NSMutableDictionary dictionaryWithCapacity:0];
--
-         QString wantedSsid;
--
-         QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(id);
- 
-         const QString idHash = QString::number(qHash(QLatin1String("corewlan:") + ptr->name));
-         const QString idHash2 = QString::number(qHash(QLatin1String("corewlan:") + scanThread->getNetworkNameFromSsid(ptr->name)));
- 
--        bool using8021X = false;
--        if (idHash2 != id) {
--            NSArray *array = [CW8021XProfile allUser8021XProfiles];
--
--            for (NSUInteger i = 0; i < [array count]; ++i) {
--                const QString networkNameHashCheck = QString::number(qHash(QLatin1String("corewlan:") + qt_NSStringToQString([[array objectAtIndex:i] userDefinedName])));
--
--                const QString ssidHash = QString::number(qHash(QLatin1String("corewlan:") + qt_NSStringToQString([[array objectAtIndex:i] ssid])));
--
--                if (id == networkNameHashCheck || id == ssidHash) {
--                    const QString thisName = scanThread->getSsidFromNetworkName(id);
--                    if (thisName.isEmpty())
--                        wantedSsid = id;
--                    else
--                        wantedSsid = thisName;
--
--                    [params setValue: [array objectAtIndex:i] forKey:kCWAssocKey8021XProfile];
--                    using8021X = true;
--                    break;
--                }
-+        QString wantedNetwork;
-+        QMapIterator<QString, QMap<QString, QString> > i(scanThread->userProfiles);
-+        while (i.hasNext()) {
-+            i.next();
-+            wantedNetwork = i.key();
-+            const QString networkNameHash = QString::number(qHash(QLatin1String("corewlan:") + wantedNetwork));
-+            if (id == networkNameHash) {
-+                wantedSsid = scanThread->getSsidFromNetworkName(wantedNetwork);
-+                break;
-             }
-         }
- 
--        if (!using8021X) {
--            QString wantedNetwork;
--            QMapIterator<QString, QMap<QString,QString> > i(scanThread->userProfiles);
--            while (i.hasNext()) {
--                i.next();
--                wantedNetwork = i.key();
--                const QString networkNameHash = QString::number(qHash(QLatin1String("corewlan:") + wantedNetwork));
--                if (id == networkNameHash) {
--                    wantedSsid =  scanThread->getSsidFromNetworkName(wantedNetwork);
--                    break;
--                }
--            }
--        }
--        NSDictionary *scanParameters = [NSDictionary dictionaryWithObjectsAndKeys:
--                                        [NSNumber numberWithBool:YES], kCWScanKeyMerge,
--                                        [NSNumber numberWithInt:kCWScanTypeFast], kCWScanKeyScanType,
--                                        [NSNumber numberWithInteger:100], kCWScanKeyRestTime,
--                                        qt_QStringToNSString(wantedSsid), kCWScanKeySSID,
--                                        nil];
--
--        NSArray *scanArray = [wifiInterface scanForNetworksWithParameters:scanParameters error:&err];
-+        NSSet *scanSet = [wifiInterface scanForNetworksWithName:(NSString *)QCFString::toCFStringRef(wantedSsid) error:&err];
- 
-         if(!err) {
--            for(uint row=0; row < [scanArray count]; row++ ) {
--                CWNetwork *apNetwork = [scanArray objectAtIndex:row];
--
--                if(wantedSsid == qt_NSStringToQString([apNetwork ssid])) {
--
--                    if(!using8021X) {
--                        SecKeychainAttribute attributes[3];
--
--                        NSString *account = [apNetwork ssid];
--                        NSString *keyKind = @"AirPort network password";
--                        NSString *keyName = account;
--
--                        attributes[0].tag = kSecAccountItemAttr;
--                        attributes[0].data = (void *)[account UTF8String];
--                        attributes[0].length = [account length];
--
--                        attributes[1].tag = kSecDescriptionItemAttr;
--                        attributes[1].data = (void *)[keyKind UTF8String];
--                        attributes[1].length = [keyKind length];
--
--                        attributes[2].tag = kSecLabelItemAttr;
--                        attributes[2].data = (void *)[keyName UTF8String];
--                        attributes[2].length = [keyName length];
--
--                        SecKeychainAttributeList attributeList = {3,attributes};
--
--                        SecKeychainSearchRef searchRef;
--                        SecKeychainSearchCreateFromAttributes(NULL, kSecGenericPasswordItemClass, &attributeList, &searchRef);
--
--                        NSString *password = @"";
--                        SecKeychainItemRef searchItem;
--
--                        if (SecKeychainSearchCopyNext(searchRef, &searchItem) == noErr) {
--                            UInt32 realPasswordLength;
--                            SecKeychainAttribute attributesW[8];
--                            attributesW[0].tag = kSecAccountItemAttr;
--                            SecKeychainAttributeList listW = {1,attributesW};
--                            char *realPassword;
--                            OSStatus status = SecKeychainItemCopyContent(searchItem, NULL, &listW, &realPasswordLength,(void **)&realPassword);
--
--                            if (status == noErr) {
--                                if (realPassword != NULL) {
--
--                                    QByteArray pBuf;
--                                    pBuf.resize(realPasswordLength);
--                                    pBuf.prepend(realPassword);
--                                    pBuf.insert(realPasswordLength,'\0');
--
--                                    password = [NSString stringWithUTF8String:pBuf];
--                                }
--                                SecKeychainItemFreeContent(&listW, realPassword);
--                            }
--
--                            CFRelease(searchItem);
--                        } else {
--                            qDebug() << "SecKeychainSearchCopyNext error";
--                        }
--                        [params setValue: password forKey: kCWAssocKeyPassphrase];
--                    } // end using8021X
--
--
--                    bool result = [wifiInterface associateToNetwork: apNetwork parameters:[NSDictionary dictionaryWithDictionary:params] error:&err];
-+            for (CWNetwork *apNetwork in scanSet) {
-+                CFDataRef ssidData = (CFDataRef)[apNetwork ssidData];
-+                bool result = false;
-+
-+                SecIdentityRef identity = 0;
-+                // Check first whether we require IEEE 802.1X authentication for the wanted SSID
-+                if (CWKeychainCopyEAPIdentity(ssidData, &identity) == errSecSuccess) {
-+                    CFStringRef username = 0;
-+                    CFStringRef password = 0;
-+                    if (CWKeychainCopyEAPUsernameAndPassword(ssidData, &username, &password) == errSecSuccess) {
-+                        result = [wifiInterface associateToEnterpriseNetwork:apNetwork
-+                                    identity:identity username:(NSString *)username password:(NSString *)password
-+                                    error:&err];
-+                        CFRelease(username);
-+                        CFRelease(password);
-+                    }
-+                    CFRelease(identity);
-+                } else {
-+                    CFStringRef password = 0;
-+                    if (CWKeychainCopyPassword(ssidData, &password) == errSecSuccess) {
-+                        result = [wifiInterface associateToNetwork:apNetwork password:(NSString *)password error:&err];
-+                        CFRelease(password);
-+                    }
-+                }
- 
--                    if(!err) {
--                        if(!result) {
--                            emit connectionError(id, ConnectError);
--                        } else {
--                            return;
--                        }
-+                if (!err) {
-+                    if (!result) {
-+                        emit connectionError(id, ConnectError);
-                     } else {
--                        qDebug() <<"associate ERROR"<<  qt_NSStringToQString([err localizedDescription ]);
-+                        return;
-                     }
-+                } else {
-+                    qDebug() <<"associate ERROR"<<  QCFString::toQString(CFStringRef([err localizedDescription ]));
-                 }
-             } //end scan network
-         } else {
--            qDebug() <<"scan ERROR"<<  qt_NSStringToQString([err localizedDescription ]);
-+            qDebug() <<"scan ERROR"<<  QCFString::toQString(CFStringRef([err localizedDescription ]));
-         }
-         emit connectionError(id, InterfaceLookupError);
-     }
-@@ -631,10 +543,10 @@ void QCoreWlanEngine::disconnectFromId(const QString &id)
-     NSAutoreleasePool *autoreleasepool = [[NSAutoreleasePool alloc] init];
- 
-     CWInterface *wifiInterface =
--        [CWInterface interfaceWithName: qt_QStringToNSString(interfaceString)];
-+        [CWInterface interfaceWithName: (NSString *)QCFString::toCFStringRef(interfaceString)];
- 
-     [wifiInterface disassociate];
--    if ([[wifiInterface interfaceState]intValue] != kCWInterfaceStateInactive) {
-+    if (wifiInterface.serviceActive) {
-         locker.unlock();
-         emit connectionError(id, DisconnectionError);
-         locker.relock();
-@@ -654,9 +566,9 @@ void QCoreWlanEngine::doRequestUpdate()
- 
-     NSAutoreleasePool *autoreleasepool = [[NSAutoreleasePool alloc] init];
- 
--    NSArray *wifiInterfaces = [CWInterface supportedInterfaces];
--    for (uint row = 0; row < [wifiInterfaces count]; ++row) {
--            scanThread->interfaceName = qt_NSStringToQString([wifiInterfaces objectAtIndex:row]);
-+    NSSet *wifiInterfaces = [CWInterface interfaceNames];
-+    for (NSString *ifName in wifiInterfaces) {
-+            scanThread->interfaceName = QCFString::toQString(CFStringRef(ifName));
-             scanThread->start();
-     }
-     locker.unlock();
-@@ -669,8 +581,8 @@ bool QCoreWlanEngine::isWifiReady(const QString &wifiDeviceName)
-     bool haswifi = false;
-     if(hasWifi) {
-         NSAutoreleasePool *autoreleasepool = [[NSAutoreleasePool alloc] init];
--        CWInterface *defaultInterface = [CWInterface interfaceWithName: qt_QStringToNSString(wifiDeviceName)];
--        if([defaultInterface power]) {
-+        CWInterface *defaultInterface = [CWInterface interfaceWithName: (NSString *)QCFString::toCFStringRef(wifiDeviceName)];
-+        if (defaultInterface.powerOn) {
-             haswifi = true;
-         }
-         [autoreleasepool release];
-@@ -898,7 +810,7 @@ quint64 QCoreWlanEngine::startTime(const QString &identifier)
-                 bool ok = false;
-                 for(int i = 0; i < dictSize; i++) {
-                     if([ssidStr isEqualToString:keys[i]]) {
--                        const QString ident = QString::number(qHash(QLatin1String("corewlan:") + qt_NSStringToQString(objects[i])));
-+                        const QString ident = QString::number(qHash(QLatin1String("corewlan:") + QCFString::toQString(CFStringRef(objects[i]))));
-                         if(ident == identifier) {
-                             ok = true;
-                         }
-@@ -944,3 +856,7 @@ quint64 QCoreWlanEngine::getBytes(const QString &interfaceName, bool b)
- }
- 
- QT_END_NAMESPACE
-+
-+#else // QT_MAC_PLATFORM_SDK_EQUAL_OR_ABOVE
-+#include "qcorewlanengine_10_6.mm"
-+#endif
-diff --git a/src/plugins/bearer/corewlan/qcorewlanengine_10_6.mm b/src/plugins/bearer/corewlan/qcorewlanengine_10_6.mm
-new file mode 100644
-index 0000000..a3bf615
---- /dev/null
-+++ src/plugins/bearer/corewlan/qcorewlanengine_10_6.mm
-@@ -0,0 +1,916 @@
-+/****************************************************************************
-+**
-+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-+** Contact: http://www.qt-project.org/legal
-+**
-+** This file is part of the plugins of the Qt Toolkit.
-+**
-+** $QT_BEGIN_LICENSE:LGPL$
-+** Commercial License Usage
-+** Licensees holding valid commercial Qt licenses may use this file in
-+** accordance with the commercial license agreement provided with the
-+** Software or, alternatively, in accordance with the terms contained in
-+** a written agreement between you and Digia.  For licensing terms and
-+** conditions see http://qt.digia.com/licensing.  For further information
-+** use the contact form at http://qt.digia.com/contact-us.
-+**
-+** GNU Lesser General Public License Usage
-+** Alternatively, this file may be used under the terms of the GNU Lesser
-+** General Public License version 2.1 as published by the Free Software
-+** Foundation and appearing in the file LICENSE.LGPL included in the
-+** packaging of this file.  Please review the following information to
-+** ensure the GNU Lesser General Public License version 2.1 requirements
-+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-+**
-+** In addition, as a special exception, Digia gives you certain additional
-+** rights.  These rights are described in the Digia Qt LGPL Exception
-+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-+**
-+** GNU General Public License Usage
-+** Alternatively, this file may be used under the terms of the GNU
-+** General Public License version 3.0 as published by the Free Software
-+** Foundation and appearing in the file LICENSE.GPL included in the
-+** packaging of this file.  Please review the following information to
-+** ensure the GNU General Public License version 3.0 requirements will be
-+** met: http://www.gnu.org/copyleft/gpl.html.
-+**
-+**
-+** $QT_END_LICENSE$
-+**
-+****************************************************************************/
-+
-+#include <SystemConfiguration/SCNetworkConfiguration.h>
-+
-+ at interface QT_MANGLE_NAMESPACE(QNSListener) : NSObject
-+{
-+    NSNotificationCenter *notificationCenter;
-+    CWInterface *currentInterface;
-+    QCoreWlanEngine *engine;
-+    NSLock *locker;
-+}
-+- (void)notificationHandler;//:(NSNotification *)notification;
-+- (void)remove;
-+- (void)setEngine:(QCoreWlanEngine *)coreEngine;
-+- (QCoreWlanEngine *)engine;
-+- (void)dealloc;
-+
-+ at property (assign) QCoreWlanEngine* engine;
-+
-+ at end
-+
-+ at implementation QT_MANGLE_NAMESPACE(QNSListener)
-+
-+- (id) init
-+{
-+    [locker lock];
-+    NSAutoreleasePool *autoreleasepool = [[NSAutoreleasePool alloc] init];
-+    notificationCenter = [NSNotificationCenter defaultCenter];
-+    currentInterface = [CWInterface interfaceWithName:nil];
-+    [notificationCenter addObserver:self selector:@selector(notificationHandler:) name:kCWPowerDidChangeNotification object:nil];
-+    [locker unlock];
-+    [autoreleasepool release];
-+    return self;
-+}
-+
-+-(void)dealloc
-+{
-+    [super dealloc];
-+}
-+
-+-(void)setEngine:(QCoreWlanEngine *)coreEngine
-+{
-+    [locker lock];
-+    if(!engine)
-+        engine = coreEngine;
-+    [locker unlock];
-+}
-+
-+-(QCoreWlanEngine *)engine
-+{
-+    return engine;
-+}
-+
-+-(void)remove
-+{
-+    [locker lock];
-+    [notificationCenter removeObserver:self];
-+    [locker unlock];
-+}
-+
-+- (void)notificationHandler//:(NSNotification *)notification
-+{
-+    engine->requestUpdate();
-+}
-+ at end
-+
-+static QT_MANGLE_NAMESPACE(QNSListener) *listener = 0;
-+
-+QT_BEGIN_NAMESPACE
-+
-+void networkChangeCallback(SCDynamicStoreRef/* store*/, CFArrayRef changedKeys, void *info)
-+{
-+    for ( long i = 0; i < CFArrayGetCount(changedKeys); i++) {
-+
-+        QString changed =  QCFString::toQString(CFStringRef((CFStringRef)CFArrayGetValueAtIndex(changedKeys, i)));
-+        if( changed.contains("/Network/Global/IPv4")) {
-+            QCoreWlanEngine* wlanEngine = static_cast<QCoreWlanEngine*>(info);
-+            wlanEngine->requestUpdate();
-+        }
-+    }
-+    return;
-+}
-+
-+
-+QScanThread::QScanThread(QObject *parent)
-+    :QThread(parent)
-+{
-+}
-+
-+QScanThread::~QScanThread()
-+{
-+}
-+
-+void QScanThread::quit()
-+{
-+    wait();
-+}
-+
-+void QScanThread::run()
-+{
-+    NSAutoreleasePool *autoreleasepool = [[NSAutoreleasePool alloc] init];
-+    QStringList found;
-+    mutex.lock();
-+    CWInterface *currentInterface = [CWInterface interfaceWithName: (NSString *)QCFString::toCFStringRef(interfaceName)];
-+    mutex.unlock();
-+
-+    if([currentInterface power]) {
-+        NSError *err = nil;
-+        NSDictionary *parametersDict =  [NSDictionary dictionaryWithObjectsAndKeys:
-+                                   [NSNumber numberWithBool:YES], kCWScanKeyMerge,
-+                                   [NSNumber numberWithInt:kCWScanTypeFast], kCWScanKeyScanType,
-+                                   [NSNumber numberWithInteger:100], kCWScanKeyRestTime, nil];
-+
-+        NSArray* apArray = [currentInterface scanForNetworksWithParameters:parametersDict error:&err];
-+        CWNetwork *apNetwork;
-+
-+        if (!err) {
-+
-+            for(uint row=0; row < [apArray count]; row++ ) {
-+                apNetwork = [apArray objectAtIndex:row];
-+
-+                const QString networkSsid = QCFString::toQString(CFStringRef([apNetwork ssid]));
-+                const QString id = QString::number(qHash(QLatin1String("corewlan:") + networkSsid));
-+                found.append(id);
-+
-+                QNetworkConfiguration::StateFlags state = QNetworkConfiguration::Undefined;
-+                bool known = isKnownSsid(networkSsid);
-+                if( [currentInterface.interfaceState intValue] == kCWInterfaceStateRunning) {
-+                    if( networkSsid == QCFString::toQString(CFStringRef([currentInterface ssid]))) {
-+                        state = QNetworkConfiguration::Active;
-+                    }
-+                }
-+                if(state == QNetworkConfiguration::Undefined) {
-+                    if(known) {
-+                        state = QNetworkConfiguration::Discovered;
-+                    } else {
-+                        state = QNetworkConfiguration::Undefined;
-+                    }
-+                }
-+                QNetworkConfiguration::Purpose purpose = QNetworkConfiguration::UnknownPurpose;
-+                if([[apNetwork securityMode] intValue] == kCWSecurityModeOpen) {
-+                    purpose = QNetworkConfiguration::PublicPurpose;
-+                } else {
-+                    purpose = QNetworkConfiguration::PrivatePurpose;
-+                }
-+
-+                found.append(foundNetwork(id, networkSsid, state, interfaceName, purpose));
-+
-+            }
-+        }
-+    }
-+    // add known configurations that are not around.
-+    QMapIterator<QString, QMap<QString,QString> > i(userProfiles);
-+    while (i.hasNext()) {
-+        i.next();
-+
-+        QString networkName = i.key();
-+        const QString id = QString::number(qHash(QLatin1String("corewlan:") + networkName));
-+
-+        if(!found.contains(id)) {
-+            QString networkSsid = getSsidFromNetworkName(networkName);
-+            const QString ssidId = QString::number(qHash(QLatin1String("corewlan:") + networkSsid));
-+            QNetworkConfiguration::StateFlags state = QNetworkConfiguration::Undefined;
-+            QString interfaceName;
-+            QMapIterator<QString, QString> ij(i.value());
-+            while (ij.hasNext()) {
-+                ij.next();
-+                interfaceName = ij.value();
-+            }
-+
-+            if( [currentInterface.interfaceState intValue] == kCWInterfaceStateRunning) {
-+                if( networkSsid == QCFString::toQString(CFStringRef([currentInterface ssid]))) {
-+                    state = QNetworkConfiguration::Active;
-+                }
-+            }
-+            if(state == QNetworkConfiguration::Undefined) {
-+                if( userProfiles.contains(networkName)
-+                    && found.contains(ssidId)) {
-+                    state = QNetworkConfiguration::Discovered;
-+                }
-+            }
-+
-+            if(state == QNetworkConfiguration::Undefined) {
-+                state = QNetworkConfiguration::Defined;
-+            }
-+
-+            found.append(foundNetwork(id, networkName, state, interfaceName, QNetworkConfiguration::UnknownPurpose));
-+        }
-+    }
-+    emit networksChanged();
-+    [autoreleasepool release];
-+}
-+
-+QStringList QScanThread::foundNetwork(const QString &id, const QString &name, const QNetworkConfiguration::StateFlags state, const QString &interfaceName, const QNetworkConfiguration::Purpose purpose)
-+{
-+    QStringList found;
-+    QMutexLocker locker(&mutex);
-+        QNetworkConfigurationPrivate *ptr = new QNetworkConfigurationPrivate;
-+
-+        ptr->name = name;
-+        ptr->isValid = true;
-+        ptr->id = id;
-+        ptr->state = state;
-+        ptr->type = QNetworkConfiguration::InternetAccessPoint;
-+        ptr->bearerType = QNetworkConfiguration::BearerWLAN;
-+        ptr->purpose = purpose;
-+
-+        fetchedConfigurations.append( ptr);
-+        configurationInterface.insert(ptr->id, interfaceName);
-+
-+        locker.unlock();
-+        locker.relock();
-+       found.append(id);
-+    return found;
-+}
-+
-+QList<QNetworkConfigurationPrivate *> QScanThread::getConfigurations()
-+{
-+    QMutexLocker locker(&mutex);
-+
-+    QList<QNetworkConfigurationPrivate *> foundConfigurations = fetchedConfigurations;
-+    fetchedConfigurations.clear();
-+
-+    return foundConfigurations;
-+}
-+
-+void QScanThread::getUserConfigurations()
-+{
-+    QMutexLocker locker(&mutex);
-+
-+    NSAutoreleasePool *autoreleasepool = [[NSAutoreleasePool alloc] init];
-+    userProfiles.clear();
-+
-+    NSArray *wifiInterfaces = [CWInterface supportedInterfaces];
-+    for(uint row=0; row < [wifiInterfaces count]; row++ ) {
-+
-+        CWInterface *wifiInterface = [CWInterface interfaceWithName: [wifiInterfaces objectAtIndex:row]];
-+        if ( ![wifiInterface power] )
-+            continue;
-+
-+        NSString *nsInterfaceName = [wifiInterface name];
-+// add user configured system networks
-+        SCDynamicStoreRef dynRef = SCDynamicStoreCreate(kCFAllocatorSystemDefault, (CFStringRef)@"Qt corewlan", nil, nil);
-+        NSDictionary * airportPlist = (NSDictionary *)SCDynamicStoreCopyValue(dynRef, (CFStringRef)[NSString stringWithFormat:@"Setup:/Network/Interface/%@/AirPort", nsInterfaceName]);
-+        CFRelease(dynRef);
-+        if(airportPlist != nil) {
-+            NSDictionary *prefNetDict = [airportPlist objectForKey:@"PreferredNetworks"];
-+
-+            NSArray *thisSsidarray = [prefNetDict valueForKey:@"SSID_STR"];
-+            for(NSString *ssidkey in thisSsidarray) {
-+                QString thisSsid = QCFString::toQString(CFStringRef(ssidkey));
-+                if(!userProfiles.contains(thisSsid)) {
-+                    QMap <QString,QString> map;
-+                    map.insert(thisSsid, QCFString::toQString(CFStringRef(nsInterfaceName)));
-+                    userProfiles.insert(thisSsid, map);
-+                }
-+            }
-+            CFRelease(airportPlist);
-+        }
-+
-+        // 802.1X user profiles
-+        QString userProfilePath = QDir::homePath() + "/Library/Preferences/com.apple.eap.profiles.plist";
-+        NSDictionary* eapDict = [[[NSDictionary alloc] initWithContentsOfFile: (NSString *)QCFString::toCFStringRef(userProfilePath)] autorelease];
-+        if(eapDict != nil) {
-+            NSString *profileStr= @"Profiles";
-+            NSString *nameStr = @"UserDefinedName";
-+            NSString *networkSsidStr = @"Wireless Network";
-+            for (id profileKey in eapDict) {
-+                if ([profileStr isEqualToString:profileKey]) {
-+                    NSDictionary *itemDict = [eapDict objectForKey:profileKey];
-+                    for (id itemKey in itemDict) {
-+
-+                        NSInteger dictSize = [itemKey count];
-+                        id objects[dictSize];
-+                        id keys[dictSize];
-+
-+                        [itemKey getObjects:objects andKeys:keys];
-+                        QString networkName;
-+                        QString ssid;
-+                        for(int i = 0; i < dictSize; i++) {
-+                            if([nameStr isEqualToString:keys[i]]) {
-+                                networkName = QCFString::toQString(CFStringRef(objects[i]));
-+                            }
-+                            if([networkSsidStr isEqualToString:keys[i]]) {
-+                                ssid = QCFString::toQString(CFStringRef(objects[i]));
-+                            }
-+                            if(!userProfiles.contains(networkName)
-+                                && !ssid.isEmpty()) {
-+                                QMap<QString,QString> map;
-+                                map.insert(ssid, QCFString::toQString(CFStringRef(nsInterfaceName)));
-+                                userProfiles.insert(networkName, map);
-+                            }
-+                        }
-+                    }
-+                }
-+            }
-+        }
-+    }
-+    [autoreleasepool release];
-+}
-+
-+QString QScanThread::getSsidFromNetworkName(const QString &name)
-+{
-+    QMutexLocker locker(&mutex);
-+
-+    QMapIterator<QString, QMap<QString,QString> > i(userProfiles);
-+    while (i.hasNext()) {
-+        i.next();
-+        QMap<QString,QString> map = i.value();
-+        QMapIterator<QString, QString> ij(i.value());
-+         while (ij.hasNext()) {
-+             ij.next();
-+             const QString networkNameHash = QString::number(qHash(QLatin1String("corewlan:") +i.key()));
-+             if(name == i.key() || name == networkNameHash) {
-+                 return ij.key();
-+             }
-+        }
-+    }
-+    return QString();
-+}
-+
-+QString QScanThread::getNetworkNameFromSsid(const QString &ssid)
-+{
-+    QMutexLocker locker(&mutex);
-+
-+    QMapIterator<QString, QMap<QString,QString> > i(userProfiles);
-+    while (i.hasNext()) {
-+        i.next();
-+        QMap<QString,QString> map = i.value();
-+        QMapIterator<QString, QString> ij(i.value());
-+         while (ij.hasNext()) {
-+             ij.next();
-+             if(ij.key() == ssid) {
-+                 return i.key();
-+             }
-+         }
-+    }
-+    return QString();
-+}
-+
-+bool QScanThread::isKnownSsid(const QString &ssid)
-+{
-+    QMutexLocker locker(&mutex);
-+
-+    QMapIterator<QString, QMap<QString,QString> > i(userProfiles);
-+    while (i.hasNext()) {
-+        i.next();
-+        QMap<QString,QString> map = i.value();
-+        if(map.keys().contains(ssid)) {
-+            return true;
-+        }
-+    }
-+    return false;
-+}
-+
-+
-+QCoreWlanEngine::QCoreWlanEngine(QObject *parent)
-+:   QBearerEngineImpl(parent), scanThread(0)
-+{
-+    scanThread = new QScanThread(this);
-+    connect(scanThread, SIGNAL(networksChanged()),
-+            this, SLOT(networksChanged()));
-+}
-+
-+QCoreWlanEngine::~QCoreWlanEngine()
-+{
-+    while (!foundConfigurations.isEmpty())
-+        delete foundConfigurations.takeFirst();
-+    [listener remove];
-+    [listener release];
-+}
-+
-+void QCoreWlanEngine::initialize()
-+{
-+    QMutexLocker locker(&mutex);
-+    NSAutoreleasePool *autoreleasepool = [[NSAutoreleasePool alloc] init];
-+
-+    if([[CWInterface supportedInterfaces] count] > 0 && !listener) {
-+        listener = [[QT_MANGLE_NAMESPACE(QNSListener) alloc] init];
-+        listener.engine = this;
-+        hasWifi = true;
-+    } else {
-+        hasWifi = false;
-+    }
-+    storeSession = NULL;
-+
-+    startNetworkChangeLoop();
-+    [autoreleasepool release];
-+}
-+
-+
-+QString QCoreWlanEngine::getInterfaceFromId(const QString &id)
-+{
-+    QMutexLocker locker(&mutex);
-+
-+    return scanThread->configurationInterface.value(id);
-+}
-+
-+bool QCoreWlanEngine::hasIdentifier(const QString &id)
-+{
-+    QMutexLocker locker(&mutex);
-+
-+    return scanThread->configurationInterface.contains(id);
-+}
-+
-+void QCoreWlanEngine::connectToId(const QString &id)
-+{
-+    QMutexLocker locker(&mutex);
-+    NSAutoreleasePool *autoreleasepool = [[NSAutoreleasePool alloc] init];
-+    QString interfaceString = getInterfaceFromId(id);
-+
-+    CWInterface *wifiInterface =
-+        [CWInterface interfaceWithName: (NSString *)QCFString::toCFStringRef(interfaceString)];
-+
-+    if ([wifiInterface power]) {
-+        NSError *err = nil;
-+        NSMutableDictionary *params = [NSMutableDictionary dictionaryWithCapacity:0];
-+
-+        QString wantedSsid;
-+
-+        QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(id);
-+
-+        const QString idHash = QString::number(qHash(QLatin1String("corewlan:") + ptr->name));
-+        const QString idHash2 = QString::number(qHash(QLatin1String("corewlan:") + scanThread->getNetworkNameFromSsid(ptr->name)));
-+
-+        bool using8021X = false;
-+        if (idHash2 != id) {
-+            NSArray *array = [CW8021XProfile allUser8021XProfiles];
-+
-+            for (NSUInteger i = 0; i < [array count]; ++i) {
-+                const QString networkNameHashCheck = QString::number(qHash(QLatin1String("corewlan:") + QCFString::toQString(CFStringRef([[array objectAtIndex:i] userDefinedName]))));
-+
-+                const QString ssidHash = QString::number(qHash(QLatin1String("corewlan:") + QCFString::toQString(CFStringRef([[array objectAtIndex:i] ssid]))));
-+
-+                if (id == networkNameHashCheck || id == ssidHash) {
-+                    const QString thisName = scanThread->getSsidFromNetworkName(id);
-+                    if (thisName.isEmpty())
-+                        wantedSsid = id;
-+                    else
-+                        wantedSsid = thisName;
-+
-+                    [params setValue: [array objectAtIndex:i] forKey:kCWAssocKey8021XProfile];
-+                    using8021X = true;
-+                    break;
-+                }
-+            }
-+        }
-+
-+        if (!using8021X) {
-+            QString wantedNetwork;
-+            QMapIterator<QString, QMap<QString,QString> > i(scanThread->userProfiles);
-+            while (i.hasNext()) {
-+                i.next();
-+                wantedNetwork = i.key();
-+                const QString networkNameHash = QString::number(qHash(QLatin1String("corewlan:") + wantedNetwork));
-+                if (id == networkNameHash) {
-+                    wantedSsid =  scanThread->getSsidFromNetworkName(wantedNetwork);
-+                    break;
-+                }
-+            }
-+        }
-+        NSDictionary *scanParameters = [NSDictionary dictionaryWithObjectsAndKeys:
-+                                        [NSNumber numberWithBool:YES], kCWScanKeyMerge,
-+                                        [NSNumber numberWithInt:kCWScanTypeFast], kCWScanKeyScanType,
-+                                        [NSNumber numberWithInteger:100], kCWScanKeyRestTime,
-+                                        (NSString *)QCFString::toCFStringRef(wantedSsid), kCWScanKeySSID,
-+                                        nil];
-+
-+        NSArray *scanArray = [wifiInterface scanForNetworksWithParameters:scanParameters error:&err];
-+
-+        if(!err) {
-+            for(uint row=0; row < [scanArray count]; row++ ) {
-+                CWNetwork *apNetwork = [scanArray objectAtIndex:row];
-+
-+                if(wantedSsid == QCFString::toQString(CFStringRef([apNetwork ssid]))) {
-+
-+                    if(!using8021X) {
-+                        SecKeychainAttribute attributes[3];
-+
-+                        NSString *account = [apNetwork ssid];
-+                        NSString *keyKind = @"AirPort network password";
-+                        NSString *keyName = account;
-+
-+                        attributes[0].tag = kSecAccountItemAttr;
-+                        attributes[0].data = (void *)[account UTF8String];
-+                        attributes[0].length = [account length];
-+
-+                        attributes[1].tag = kSecDescriptionItemAttr;
-+                        attributes[1].data = (void *)[keyKind UTF8String];
-+                        attributes[1].length = [keyKind length];
-+
-+                        attributes[2].tag = kSecLabelItemAttr;
-+                        attributes[2].data = (void *)[keyName UTF8String];
-+                        attributes[2].length = [keyName length];
-+
-+                        SecKeychainAttributeList attributeList = {3,attributes};
-+
-+                        SecKeychainSearchRef searchRef;
-+                        SecKeychainSearchCreateFromAttributes(NULL, kSecGenericPasswordItemClass, &attributeList, &searchRef);
-+
-+                        NSString *password = @"";
-+                        SecKeychainItemRef searchItem;
-+
-+                        if (SecKeychainSearchCopyNext(searchRef, &searchItem) == noErr) {
-+                            UInt32 realPasswordLength;
-+                            SecKeychainAttribute attributesW[8];
-+                            attributesW[0].tag = kSecAccountItemAttr;
-+                            SecKeychainAttributeList listW = {1,attributesW};
-+                            char *realPassword;
-+                            OSStatus status = SecKeychainItemCopyContent(searchItem, NULL, &listW, &realPasswordLength,(void **)&realPassword);
-+
-+                            if (status == noErr) {
-+                                if (realPassword != NULL) {
-+
-+                                    QByteArray pBuf;
-+                                    pBuf.resize(realPasswordLength);
-+                                    pBuf.prepend(realPassword);
-+                                    pBuf.insert(realPasswordLength,'\0');
-+
-+                                    password = [NSString stringWithUTF8String:pBuf];
-+                                }
-+                                SecKeychainItemFreeContent(&listW, realPassword);
-+                            }
-+
-+                            CFRelease(searchItem);
-+                        } else {
-+                            qDebug() << "SecKeychainSearchCopyNext error";
-+                        }
-+                        [params setValue: password forKey: kCWAssocKeyPassphrase];
-+                    } // end using8021X
-+
-+
-+                    bool result = [wifiInterface associateToNetwork: apNetwork parameters:[NSDictionary dictionaryWithDictionary:params] error:&err];
-+
-+                    if(!err) {
-+                        if(!result) {
-+                            emit connectionError(id, ConnectError);
-+                        } else {
-+                            return;
-+                        }
-+                    } else {
-+                        qDebug() <<"associate ERROR"<<  QCFString::toQString(CFStringRef([err localizedDescription ]));
-+                    }
-+                }
-+            } //end scan network
-+        } else {
-+            qDebug() <<"scan ERROR"<<  QCFString::toQString(CFStringRef([err localizedDescription ]));
-+        }
-+        emit connectionError(id, InterfaceLookupError);
-+    }
-+
-+    locker.unlock();
-+    emit connectionError(id, InterfaceLookupError);
-+    [autoreleasepool release];
-+}
-+
-+void QCoreWlanEngine::disconnectFromId(const QString &id)
-+{
-+    QMutexLocker locker(&mutex);
-+
-+    QString interfaceString = getInterfaceFromId(id);
-+    NSAutoreleasePool *autoreleasepool = [[NSAutoreleasePool alloc] init];
-+
-+    CWInterface *wifiInterface =
-+        [CWInterface interfaceWithName: (NSString *)QCFString::toCFStringRef(interfaceString)];
-+
-+    [wifiInterface disassociate];
-+    if ([[wifiInterface interfaceState]intValue] != kCWInterfaceStateInactive) {
-+        locker.unlock();
-+        emit connectionError(id, DisconnectionError);
-+        locker.relock();
-+    }
-+    [autoreleasepool release];
-+}
-+
-+void QCoreWlanEngine::requestUpdate()
-+{
-+    scanThread->getUserConfigurations();
-+    doRequestUpdate();
-+}
-+
-+void QCoreWlanEngine::doRequestUpdate()
-+{
-+    QMutexLocker locker(&mutex);
-+
-+    NSAutoreleasePool *autoreleasepool = [[NSAutoreleasePool alloc] init];
-+
-+    NSArray *wifiInterfaces = [CWInterface supportedInterfaces];
-+    for (uint row = 0; row < [wifiInterfaces count]; ++row) {
-+            scanThread->interfaceName = QCFString::toQString(CFStringRef([wifiInterfaces objectAtIndex:row]));
-+            scanThread->start();
-+    }
-+    locker.unlock();
-+    [autoreleasepool release];
-+}
-+
-+bool QCoreWlanEngine::isWifiReady(const QString &wifiDeviceName)
-+{
-+    QMutexLocker locker(&mutex);
-+    bool haswifi = false;
-+    if(hasWifi) {
-+        NSAutoreleasePool *autoreleasepool = [[NSAutoreleasePool alloc] init];
-+        CWInterface *defaultInterface = [CWInterface interfaceWithName: (NSString *)QCFString::toCFStringRef(wifiDeviceName)];
-+        if([defaultInterface power]) {
-+            haswifi = true;
-+        }
-+        [autoreleasepool release];
-+    }
-+    return haswifi;
-+}
-+
-+
-+QNetworkSession::State QCoreWlanEngine::sessionStateForId(const QString &id)
-+{
-+    QMutexLocker locker(&mutex);
-+    QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(id);
-+
-+    if (!ptr)
-+        return QNetworkSession::Invalid;
-+
-+    if (!ptr->isValid) {
-+        return QNetworkSession::Invalid;
-+    } else if ((ptr->state & QNetworkConfiguration::Active) == QNetworkConfiguration::Active) {
-+        return QNetworkSession::Connected;
-+    } else if ((ptr->state & QNetworkConfiguration::Discovered) ==
-+                QNetworkConfiguration::Discovered) {
-+        return QNetworkSession::Disconnected;
-+    } else if ((ptr->state & QNetworkConfiguration::Defined) == QNetworkConfiguration::Defined) {
-+        return QNetworkSession::NotAvailable;
-+    } else if ((ptr->state & QNetworkConfiguration::Undefined) ==
-+                QNetworkConfiguration::Undefined) {
-+        return QNetworkSession::NotAvailable;
-+    }
-+
-+    return QNetworkSession::Invalid;
-+}
-+
-+QNetworkConfigurationManager::Capabilities QCoreWlanEngine::capabilities() const
-+{
-+    return QNetworkConfigurationManager::ForcedRoaming;
-+}
-+
-+void QCoreWlanEngine::startNetworkChangeLoop()
-+{
-+
-+    SCDynamicStoreContext dynStoreContext = { 0, this/*(void *)storeSession*/, NULL, NULL, NULL };
-+    storeSession = SCDynamicStoreCreate(NULL,
-+                                 CFSTR("networkChangeCallback"),
-+                                 networkChangeCallback,
-+                                 &dynStoreContext);
-+    if (!storeSession ) {
-+        qWarning() << "could not open dynamic store: error:" << SCErrorString(SCError());
-+        return;
-+    }
-+
-+    CFMutableArrayRef notificationKeys;
-+    notificationKeys = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks);
-+    CFMutableArrayRef patternsArray;
-+    patternsArray = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks);
-+
-+    CFStringRef storeKey;
-+    storeKey = SCDynamicStoreKeyCreateNetworkGlobalEntity(NULL,
-+                                                     kSCDynamicStoreDomainState,
-+                                                     kSCEntNetIPv4);
-+    CFArrayAppendValue(notificationKeys, storeKey);
-+    CFRelease(storeKey);
-+
-+    storeKey = SCDynamicStoreKeyCreateNetworkServiceEntity(NULL,
-+                                                      kSCDynamicStoreDomainState,
-+                                                      kSCCompAnyRegex,
-+                                                      kSCEntNetIPv4);
-+    CFArrayAppendValue(patternsArray, storeKey);
-+    CFRelease(storeKey);
-+
-+    if (!SCDynamicStoreSetNotificationKeys(storeSession , notificationKeys, patternsArray)) {
-+        qWarning() << "register notification error:"<< SCErrorString(SCError());
-+        CFRelease(storeSession );
-+        CFRelease(notificationKeys);
-+        CFRelease(patternsArray);
-+        return;
-+    }
-+    CFRelease(notificationKeys);
-+    CFRelease(patternsArray);
-+
-+    runloopSource = SCDynamicStoreCreateRunLoopSource(NULL, storeSession , 0);
-+    if (!runloopSource) {
-+        qWarning() << "runloop source error:"<< SCErrorString(SCError());
-+        CFRelease(storeSession );
-+        return;
-+    }
-+
-+    CFRunLoopAddSource(CFRunLoopGetCurrent(), runloopSource, kCFRunLoopDefaultMode);
-+    return;
-+}
-+
-+QNetworkSessionPrivate *QCoreWlanEngine::createSessionBackend()
-+{
-+    return new QNetworkSessionPrivateImpl;
-+}
-+
-+QNetworkConfigurationPrivatePointer QCoreWlanEngine::defaultConfiguration()
-+{
-+    return QNetworkConfigurationPrivatePointer();
-+}
-+
-+bool QCoreWlanEngine::requiresPolling() const
-+{
-+    return true;
-+}
-+
-+void QCoreWlanEngine::networksChanged()
-+{
-+    QMutexLocker locker(&mutex);
-+
-+    QStringList previous = accessPointConfigurations.keys();
-+
-+    QList<QNetworkConfigurationPrivate *> foundConfigurations = scanThread->getConfigurations();
-+    while (!foundConfigurations.isEmpty()) {
-+        QNetworkConfigurationPrivate *cpPriv = foundConfigurations.takeFirst();
-+
-+        previous.removeAll(cpPriv->id);
-+
-+        if (accessPointConfigurations.contains(cpPriv->id)) {
-+            QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(cpPriv->id);
-+
-+            bool changed = false;
-+
-+            ptr->mutex.lock();
-+
-+            if (ptr->isValid != cpPriv->isValid) {
-+                ptr->isValid = cpPriv->isValid;
-+                changed = true;
-+            }
-+
-+            if (ptr->name != cpPriv->name) {
-+                ptr->name = cpPriv->name;
-+                changed = true;
-+            }
-+
-+            if (ptr->bearerType != cpPriv->bearerType) {
-+                ptr->bearerType = cpPriv->bearerType;
-+                changed = true;
-+            }
-+
-+            if (ptr->state != cpPriv->state) {
-+                ptr->state = cpPriv->state;
-+                changed = true;
-+            }
-+
-+            ptr->mutex.unlock();
-+
-+            if (changed) {
-+                locker.unlock();
-+                emit configurationChanged(ptr);
-+                locker.relock();
-+            }
-+
-+            delete cpPriv;
-+        } else {
-+            QNetworkConfigurationPrivatePointer ptr(cpPriv);
-+
-+            accessPointConfigurations.insert(ptr->id, ptr);
-+
-+            locker.unlock();
-+            emit configurationAdded(ptr);
-+            locker.relock();
-+        }
-+    }
-+
-+    while (!previous.isEmpty()) {
-+        QNetworkConfigurationPrivatePointer ptr =
-+            accessPointConfigurations.take(previous.takeFirst());
-+
-+        locker.unlock();
-+        emit configurationRemoved(ptr);
-+        locker.relock();
-+    }
-+
-+    locker.unlock();
-+    emit updateCompleted();
-+
-+}
-+
-+quint64 QCoreWlanEngine::bytesWritten(const QString &id)
-+{
-+    QMutexLocker locker(&mutex);
-+    const QString interfaceStr = getInterfaceFromId(id);
-+    return getBytes(interfaceStr,false);
-+}
-+
-+quint64 QCoreWlanEngine::bytesReceived(const QString &id)
-+{
-+    QMutexLocker locker(&mutex);
-+    const QString interfaceStr = getInterfaceFromId(id);
-+    return getBytes(interfaceStr,true);
-+}
-+
-+quint64 QCoreWlanEngine::startTime(const QString &identifier)
-+{
-+    QMutexLocker locker(&mutex);
-+    NSAutoreleasePool *autoreleasepool = [[NSAutoreleasePool alloc] init];
-+    quint64 timestamp = 0;
-+
-+    NSString *filePath = @"/Library/Preferences/SystemConfiguration/com.apple.airport.preferences.plist";
-+    NSDictionary* plistDict = [[[NSDictionary alloc] initWithContentsOfFile:filePath] autorelease];
-+    if(plistDict == nil)
-+        return timestamp;
-+    NSString *input = @"KnownNetworks";
-+    NSString *timeStampStr = @"_timeStamp";
-+
-+    NSString *ssidStr = @"SSID_STR";
-+
-+    for (id key in plistDict) {
-+        if ([input isEqualToString:key]) {
-+
-+            NSDictionary *knownNetworksDict = [plistDict objectForKey:key];
-+            if(knownNetworksDict == nil)
-+                return timestamp;
-+            for (id networkKey in knownNetworksDict) {
-+                bool isFound = false;
-+                NSDictionary *itemDict = [knownNetworksDict objectForKey:networkKey];
-+                if(itemDict == nil)
-+                    return timestamp;
-+                NSInteger dictSize = [itemDict count];
-+                id objects[dictSize];
-+                id keys[dictSize];
-+
-+                [itemDict getObjects:objects andKeys:keys];
-+                bool ok = false;
-+                for(int i = 0; i < dictSize; i++) {
-+                    if([ssidStr isEqualToString:keys[i]]) {
-+                        const QString ident = QString::number(qHash(QLatin1String("corewlan:") + QCFString::toQString(CFStringRef(objects[i]))));
-+                        if(ident == identifier) {
-+                            ok = true;
-+                        }
-+                    }
-+                    if(ok && [timeStampStr isEqualToString:keys[i]]) {
-+                        timestamp = (quint64)[objects[i] timeIntervalSince1970];
-+                        isFound = true;
-+                        break;
-+                    }
-+                }
-+                if(isFound)
-+                    break;
-+            }
-+        }
-+    }
-+    [autoreleasepool release];
-+    return timestamp;
-+}
-+
-+quint64 QCoreWlanEngine::getBytes(const QString &interfaceName, bool b)
-+{
-+    struct ifaddrs *ifAddressList, *ifAddress;
-+    struct if_data *if_data;
-+
-+    quint64 bytes = 0;
-+    ifAddressList = nil;
-+    if(getifaddrs(&ifAddressList) == 0) {
-+        for(ifAddress = ifAddressList; ifAddress; ifAddress = ifAddress->ifa_next) {
-+            if(interfaceName == ifAddress->ifa_name) {
-+                if_data = (struct if_data*)ifAddress->ifa_data;
-+                if(b) {
-+                    bytes = if_data->ifi_ibytes;
-+                    break;
-+                } else {
-+                    bytes = if_data->ifi_obytes;
-+                    break;
-+                }
-+            }
-+        }
-+        freeifaddrs(ifAddressList);
-+    }
-+    return bytes;
-+}
-+
-+QT_END_NAMESPACE

Modified: trunk/dports/aqua/qt4-mac/files/patch-src_tools_bootstrap_bootstrap.pro.diff
===================================================================
--- trunk/dports/aqua/qt4-mac/files/patch-src_tools_bootstrap_bootstrap.pro.diff	2014-05-06 10:08:33 UTC (rev 119771)
+++ trunk/dports/aqua/qt4-mac/files/patch-src_tools_bootstrap_bootstrap.pro.diff	2014-05-06 12:13:33 UTC (rev 119772)
@@ -6,6 +6,6 @@
  macx: {
 -   QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.4 #enables weak linking for 10.4 (exported)
 +   QMAKE_MACOSX_DEPLOYMENT_TARGET = @MACOSX_DEPLOYMENT_TARGET@
-    SOURCES += ../../corelib/io/qfilesystemengine_mac.cpp
     SOURCES += ../../corelib/kernel/qcore_mac.cpp
     LIBS += -framework CoreServices
+ }

Modified: trunk/dports/aqua/qt4-mac/files/patch-tools_macdeployqt_shared_shared.cpp.diff
===================================================================
--- trunk/dports/aqua/qt4-mac/files/patch-tools_macdeployqt_shared_shared.cpp.diff	2014-05-06 10:08:33 UTC (rev 119771)
+++ trunk/dports/aqua/qt4-mac/files/patch-tools_macdeployqt_shared_shared.cpp.diff	2014-05-06 12:13:33 UTC (rev 119772)
@@ -1,6 +1,6 @@
 --- tools/macdeployqt/shared/shared.cpp.orig	2012-08-12 19:01:35.000000000 -0400
 +++ tools/macdeployqt/shared/shared.cpp	2012-08-12 19:01:55.000000000 -0400
-@@ -139,7 +139,7 @@
+@@ -141,7 +141,7 @@
                  state = DylibName;
                  continue;
              } else if (part < parts.count() && parts.at(part).endsWith(".framework")) {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140506/eb1df52f/attachment-0001.html>


More information about the macports-changes mailing list