[143113] trunk/dports/aqua/qt5

mcalhoun at macports.org mcalhoun at macports.org
Sat Dec 12 08:36:46 PST 2015


Revision: 143113
          https://trac.macports.org/changeset/143113
Author:   mcalhoun at macports.org
Date:     2015-12-04 04:14:27 -0800 (Fri, 04 Dec 2015)
Log Message:
-----------
qt5: apply upstream patches
* install shared libraries without rpath (#49837,#40782,#49797)
* fix openssl support in qtwebkit
* fix QStandardPaths::standardLocations()
* better resolve SDK version of C linkers
* fix comments
* further workaround for ambiguities of python version for qtdeclarative and qtwebkit (r142959)

Revision Links:
--------------
    https://trac.macports.org/changeset/142959

Modified Paths:
--------------
    trunk/dports/aqua/qt5/Portfile
    trunk/dports/aqua/qt5/files/patch-add_sdk.diff

Added Paths:
-----------
    trunk/dports/aqua/qt5/files/patch-rpath.diff
    trunk/dports/aqua/qt5/files/patch-ssl.diff
    trunk/dports/aqua/qt5/files/patch-stdloc.diff

Modified: trunk/dports/aqua/qt5/Portfile
===================================================================
--- trunk/dports/aqua/qt5/Portfile	2015-12-04 09:05:42 UTC (rev 143112)
+++ trunk/dports/aqua/qt5/Portfile	2015-12-04 12:14:27 UTC (rev 143113)
@@ -5,6 +5,7 @@
 
 name                qt5
 version             5.5.1
+revision            1
 
 # get Qt's version numbers
 set branch          [join [lrange [split ${version} .] 0 1] .]
@@ -110,7 +111,6 @@
 #
 # TODO: possible to trim dependencies of qtbase?
 # TODO: force qttools to not depend on (deprecated) qtwebkit?
-# TODO: do not use rpath?
 # TODO: support older versions of OS X via different versions of Qt 5
 #
 ###############################################################################
@@ -616,6 +616,11 @@
         # This feature does not work without "CONFIG += link_pkgconfig"
         patchfiles-append patch-icu.pro.diff
 
+        #https://codereview.qt-project.org/#/c/139967/
+        #https://codereview.qt-project.org/#/c/139968/
+        #https://codereview.qt-project.org/#/c/139970/
+        patchfiles-append patch-ssl.diff
+
         # qtwebkit uses
         #    glx
         #    libXcomposite
@@ -647,7 +652,10 @@
         # UsingTheRightCompiler (https://trac.macports.org/wiki/UsingTheRightCompiler)
         build.env-append      CXX=${configure.cxx}
         configure.args-append QMAKE_LINK=${configure.cxx}
+    }
 
+    # special case
+    if { ${subport} eq "${name}-qtwebengine" || ${subport} eq "${name}-qtdeclarative" || ${subport} eq "${name}-qtwebkit" } {
         # version 5.5.1 (at least) of qtwebengine must find a python version in the interval [2.7, 3)
         #    (see tools/qmake/mkspecs/features/functions.prf)
         #
@@ -655,6 +663,9 @@
         # how to accomplish such a thing is not entirely clear
         #
         # see #49838
+        #
+        # versions 5.5.1 of qtdeclarative and qtwebkit also use python with no way of specifying which one
+        #
         configure.env-append PATH="/bin:/sbin:/usr/bin:/usr/sbin:${prefix}/bin:${prefix}/sbin"
         build.env-append     PATH="/bin:/sbin:/usr/bin:/usr/sbin:${prefix}/bin:${prefix}/sbin"
     }
@@ -808,19 +819,24 @@
 
     # special case
     if { ${subport} ne "${name}-docs" } {
-        # qmake automatically makes certain commands (QMAKE_CC, etc.) absolute paths
-        # add one more for consistency (QMAKE_LINK_C)
+        # https://codereview.qt-project.org/#/c/141654/
         patchfiles-append patch-add_sdk.diff
 
-        # the build system automatically use OpenGL frameworks (-framework OpenGL -framework AGL)
+        # the build system automatically uses OpenGL frameworks (-framework OpenGL -framework AGL)
         # the build system also uses pkgconfig to look for an OpenGL installation (gl.pc)
         # if mesa is installed, the build system will try to use both OpenGL systems
         # later, this will cause problems
         #    Undefined symbols: "_CGLGetCurrentContext"
         patchfiles-append patch-configure.diff
 
-        # see https://codereview.qt-project.org/#/c/122729/
+        # see https://codereview.qt-project.org/#/c/126584/
         patchfiles-append patch-pcfiles.diff
+
+        #https://codereview.qt-project.org/#/c/140876/
+        patchfiles-append patch-stdloc.diff
+
+        #https://codereview.qt-project.org/#/c/138349
+        patchfiles-append patch-rpath.diff
     }
 
     if { [variant_isset tests] } {
@@ -929,7 +945,7 @@
         {-nomake tests}         \
         -gui                    \
         -widgets                \
-        -rpath                  \
+        -no-rpath               \
         -verbose                \
         -optimized-qmake        \
         -nis                    \

Modified: trunk/dports/aqua/qt5/files/patch-add_sdk.diff
===================================================================
--- trunk/dports/aqua/qt5/files/patch-add_sdk.diff	2015-12-04 09:05:42 UTC (rev 143112)
+++ trunk/dports/aqua/qt5/files/patch-add_sdk.diff	2015-12-04 12:14:27 UTC (rev 143113)
@@ -1,11 +1,33 @@
---- mkspecs/features/mac/sdk.prf.orig	2015-06-29 13:05:10.000000000 -0700
-+++ mkspecs/features/mac/sdk.prf	2015-10-06 21:59:22.000000000 -0700
-@@ -43,7 +43,7 @@
+From dd5bed5198bda65930d4ea406e29006f0deb6018 Mon Sep 17 00:00:00 2001
+From: Marcus Calhoun-Lopez <marcuscalhounlopez at gmail.com>
+Date: Sun, 22 Nov 2015 10:24:04 -0700
+Subject: [PATCH] OS X: resolve SDK version of QMAKE_LINK_C and
+ QMAKE_LINK_C_SHLIB
+
+On OS X, both compilers and linkers are given an absolute path.
+For consistency, the same should be done with the C linkers.
+The change is also a convenience to the MacPorts project,
+which actively discourages ambiguous compiler names.
+(https://trac.macports.org/wiki/UsingTheRightCompiler).
+
+Change-Id: Ic1885aed825340696e9fde766788eebf51de3ff6
+---
+ mkspecs/features/mac/sdk.prf | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/mkspecs/features/mac/sdk.prf b/mkspecs/features/mac/sdk.prf
+index e238f8e..624366a 100644
+--- mkspecs/features/mac/sdk.prf
++++ mkspecs/features/mac/sdk.prf
+@@ -43,7 +43,7 @@ QMAKE_INCDIR_OPENGL = $$sysrootified
  QMAKESPEC_NAME = $$basename(QMAKESPEC)
-
+ 
  # Resolve SDK version of various tools
 -for(tool, $$list(QMAKE_CC QMAKE_CXX QMAKE_FIX_RPATH QMAKE_AR QMAKE_RANLIB QMAKE_LINK QMAKE_LINK_SHLIB)) {
-+for(tool, $$list(QMAKE_CC QMAKE_CXX QMAKE_FIX_RPATH QMAKE_AR QMAKE_RANLIB QMAKE_LINK QMAKE_LINK_SHLIB QMAKE_LINK_C)) {
++for(tool, $$list(QMAKE_CC QMAKE_CXX QMAKE_FIX_RPATH QMAKE_AR QMAKE_RANLIB QMAKE_LINK QMAKE_LINK_SHLIB QMAKE_LINK_C QMAKE_LINK_C_SHLIB)) {
      tool_variable = QMAKE_MAC_SDK.$${QMAKESPEC_NAME}.$${QMAKE_MAC_SDK}.$${tool}
      !isEmpty($$tool_variable) {
          $$tool = $$eval($$tool_variable)
+-- 
+2.6.2.2.g1b5ffa3
+

Added: trunk/dports/aqua/qt5/files/patch-rpath.diff
===================================================================
--- trunk/dports/aqua/qt5/files/patch-rpath.diff	                        (rev 0)
+++ trunk/dports/aqua/qt5/files/patch-rpath.diff	2015-12-04 12:14:27 UTC (rev 143113)
@@ -0,0 +1,64 @@
+From 6c222297ab19e1bc6b74c4290446c1cb61f6fda8 Mon Sep 17 00:00:00 2001
+From: Martin Afanasjew <martin at afanasjew.de>
+Date: Mon, 19 Oct 2015 23:52:10 +0200
+Subject: [PATCH] Make -no-rpath build more useful on Apple platforms
+
+[ChangeLog][Platform Specific Changes][OS X] Configure with -no-rpath
+will now yield Qt dynamic libraries and frameworks with an absolute
+install name (based in -libdir).
+
+OS X package managers like Homebrew install Qt in a fixed location. This
+change simplifies deployment for such package managers and is consistent
+with the default expectation on Apple platforms for libraries with a
+fixed location to also have absolute install names.
+
+While a relocatable installation (the default) also works in this
+scenario, it requires all software that depends on Qt to be aware of
+this and to embed a suitable RPATH into application binaries (which is
+not automatic for non-qmake builds). This might not be true for some
+select fallback search locations, but as package managers on OS X tend
+not to use those, embedding an RPATH becomes practically mandatory. In a
+default Homebrew installation, Qt is configured such that the frameworks
+end up in /usr/local/Cellar/qt5/<version>/lib and that will be later
+symlinked to /usr/local/opt/qt5/lib, both of which are not searched by
+the dynamic linker by default.
+
+Task-number: QTBUG-48958
+Change-Id: I4395df98771e06a2ce8a293d11dc755bdc50757f
+Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen at theqtcompany.com>
+---
+ configure                      | 4 +++-
+ mkspecs/features/qt_module.prf | 2 ++
+ 2 files changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/configure b/configure
+index cea62fb..c29c113 100755
+--- configure
++++ configure
+@@ -2557,7 +2557,9 @@ Additional options:
+     -l <string> ........ Add an explicit library.
+ 
+     -no-rpath .......... Do not use the library install path as a runtime
+-                         library path.
++                         library path. On Apple platforms, this implies using
++                         absolute install names (based in -libdir) for dynamic
++                         libraries and frameworks.
+  +  -rpath ............. Link Qt libraries and executables using the library
+                          install path as a runtime library path. Equivalent
+                          to -R install_libpath
+diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf
+index c89b6d2..f187b85 100644
+--- mkspecs/features/qt_module.prf
++++ mkspecs/features/qt_module.prf
+@@ -135,6 +135,8 @@ mac {
+ 
+    contains(QT_CONFIG, rpath): \
+        QMAKE_SONAME_PREFIX = @rpath
++   else: \
++       CONFIG += absolute_library_soname
+ }
+ 
+ DEFINES += QT_BUILDING_QT
+-- 
+2.6.2.2.g1b5ffa3
+

Added: trunk/dports/aqua/qt5/files/patch-ssl.diff
===================================================================
--- trunk/dports/aqua/qt5/files/patch-ssl.diff	                        (rev 0)
+++ trunk/dports/aqua/qt5/files/patch-ssl.diff	2015-12-04 12:14:27 UTC (rev 143113)
@@ -0,0 +1,139 @@
+From 06b0ebd66fb1a7c536c96572ad8a3b55b713b177 Mon Sep 17 00:00:00 2001
+From: Florian Bruhin <git at the-compiler.org>
+Date: Wed, 4 Nov 2015 21:35:31 +0100
+Subject: [PATCH] Check QT_NO_SSL in SocketStreamHandleQt.
+
+Since Qt 5.5, Secure Transport is used instead of OpenSSL on OS X. This means
+secure websockets (wss://) were disabled on OS X despite QSslSocket being
+available.
+
+Change-Id: Ic584a6ed81b625c84a85e54dba84c8fc920b861a
+Task-number: QTBUG-49027
+Reviewed-by: Richard J. Moore <rich at kde.org>
+Reviewed-by: Timur Pocheptsov <timur.pocheptsov at theqtcompany.com>
+---
+ Source/WebCore/platform/network/qt/SocketStreamHandlePrivate.h | 2 +-
+ Source/WebCore/platform/network/qt/SocketStreamHandleQt.cpp    | 8 ++++----
+ 2 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/Source/WebCore/platform/network/qt/SocketStreamHandlePrivate.h b/Source/WebCore/platform/network/qt/SocketStreamHandlePrivate.h
+index f447cc2..647c4ef 100644
+--- Source/WebCore/platform/network/qt/SocketStreamHandlePrivate.h
++++ Source/WebCore/platform/network/qt/SocketStreamHandlePrivate.h
+@@ -60,7 +60,7 @@ public Q_SLOTS:
+     void socketError(QAbstractSocket::SocketError);
+     void socketClosedCallback();
+     void socketErrorCallback(int);
+-#ifndef QT_NO_OPENSSL
++#ifndef QT_NO_SSL
+     void socketSslErrors(const QList<QSslError>&);
+ #endif
+ public:
+diff --git a/Source/WebCore/platform/network/qt/SocketStreamHandleQt.cpp b/Source/WebCore/platform/network/qt/SocketStreamHandleQt.cpp
+index d4cbdc7..cd71190 100644
+--- Source/WebCore/platform/network/qt/SocketStreamHandleQt.cpp
++++ Source/WebCore/platform/network/qt/SocketStreamHandleQt.cpp
+@@ -48,7 +48,7 @@ SocketStreamHandlePrivate::SocketStreamHandlePrivate(SocketStreamHandle* streamH
+     bool isSecure = url.protocolIs("wss");
+ 
+     if (isSecure) {
+-#ifndef QT_NO_OPENSSL
++#ifndef QT_NO_SSL
+         m_socket = new QSslSocket(this);
+ #endif
+     } else
+@@ -63,7 +63,7 @@ SocketStreamHandlePrivate::SocketStreamHandlePrivate(SocketStreamHandle* streamH
+ 
+     QString host = url.host();
+     if (isSecure) {
+-#ifndef QT_NO_OPENSSL
++#ifndef QT_NO_SSL
+         static_cast<QSslSocket*>(m_socket)->connectToHostEncrypted(host, port);
+ #endif
+     } else
+@@ -88,7 +88,7 @@ void SocketStreamHandlePrivate::initConnections()
+     connect(m_socket, SIGNAL(readyRead()), this, SLOT(socketReadyRead()));
+     connect(m_socket, SIGNAL(disconnected()), this, SLOT(socketClosed()));
+     connect(m_socket, SIGNAL(error(QAbstractSocket::SocketError)), this, SLOT(socketError(QAbstractSocket::SocketError)));
+-#ifndef QT_NO_OPENSSL
++#ifndef QT_NO_SSL
+     if (qobject_cast<QSslSocket*>(m_socket))
+         connect(m_socket, SIGNAL(sslErrors(const QList<QSslError>&)), this, SLOT(socketSslErrors(const QList<QSslError>&)));
+ #endif
+@@ -176,7 +176,7 @@ void SocketStreamHandlePrivate::socketErrorCallback(int error)
+     }
+ }
+ 
+-#ifndef QT_NO_OPENSSL
++#ifndef QT_NO_SSL
+ void SocketStreamHandlePrivate::socketSslErrors(const QList<QSslError>& error)
+ {
+     QMetaObject::invokeMethod(this, "socketErrorCallback", Qt::QueuedConnection, Q_ARG(int, error[0].error()));
+-- 
+2.6.2.2.g1b5ffa3
+
+From 11ce03bd807504559961dc69bdf6ccc382b61812 Mon Sep 17 00:00:00 2001
+From: Florian Bruhin <git at the-compiler.org>
+Date: Wed, 4 Nov 2015 21:49:48 +0100
+Subject: [PATCH] Check QT_NO_SSL for QtWebKit user agent.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=utf8
+Content-Transfer-Encoding: 8bit
+
+When QT_NO_OPENSSL is checked, the user agent says "no SSL support" even when
+there *is* SSL support via Secure Transport on OS X.
+
+Change-Id: Idb8bf3ee95689f60adab332b3cbac7b6bdf6a738
+Reviewed-by: Timur Pocheptsov <timur.pocheptsov at theqtcompany.com>
+Reviewed-by: Michael Brüning <michael.bruning at theqtcompany.com>
+---
+ Source/WebCore/platform/qt/UserAgentQt.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Source/WebCore/platform/qt/UserAgentQt.cpp b/Source/WebCore/platform/qt/UserAgentQt.cpp
+index 6f1da23..80996a2 100644
+--- Source/WebCore/platform/qt/UserAgentQt.cpp
++++ Source/WebCore/platform/qt/UserAgentQt.cpp
+@@ -74,7 +74,7 @@ String UserAgentQt::standardUserAgent(const String &applicationNameForUserAgent,
+ 
+         // Security strength.
+         QString securityStrength;
+-#if defined(QT_NO_OPENSSL)
++#if defined(QT_NO_SSL)
+         securityStrength = QLatin1String("N; ");
+ #endif
+         ua = ua.arg(securityStrength);
+-- 
+2.6.2.2.g1b5ffa3
+
+From 2caa61dc485dc7d38c847ed6c6cff774fcf80061 Mon Sep 17 00:00:00 2001
+From: Florian Bruhin <git at the-compiler.org>
+Date: Wed, 4 Nov 2015 21:32:42 +0100
+Subject: [PATCH 1/1] Check m_socket in SocketStreamHandlePrivate::close.
+
+m_socket can be set to 0 in the constructor, e.g. when Qt is compiled without
+SSL support.
+
+Change-Id: Ic3bb18f6c801d463e2277b4c19ef2c790216bf69
+Task-number: QTBUG-49027
+Reviewed-by: Richard J. Moore <rich at kde.org>
+---
+ Source/WebCore/platform/network/qt/SocketStreamHandleQt.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Source/WebCore/platform/network/qt/SocketStreamHandleQt.cpp b/Source/WebCore/platform/network/qt/SocketStreamHandleQt.cpp
+index ca7b60c..d4cbdc7 100644
+--- Source/WebCore/platform/network/qt/SocketStreamHandleQt.cpp
++++ Source/WebCore/platform/network/qt/SocketStreamHandleQt.cpp
+@@ -127,7 +127,7 @@ int SocketStreamHandlePrivate::send(const char* data, int len)
+ 
+ void SocketStreamHandlePrivate::close()
+ {
+-    if (m_streamHandle && m_streamHandle->m_state == SocketStreamHandleBase::Connecting) {
++    if (m_socket && m_streamHandle && m_streamHandle->m_state == SocketStreamHandleBase::Connecting) {
+         m_socket->abort();
+         m_streamHandle->client()->didCloseSocketStream(m_streamHandle);
+         return;
+-- 
+2.6.2.2.g1b5ffa3
+

Added: trunk/dports/aqua/qt5/files/patch-stdloc.diff
===================================================================
--- trunk/dports/aqua/qt5/files/patch-stdloc.diff	                        (rev 0)
+++ trunk/dports/aqua/qt5/files/patch-stdloc.diff	2015-12-04 12:14:27 UTC (rev 143113)
@@ -0,0 +1,29 @@
+From bc7d0da741d1bc2ab2d36227d40d255c692a6fa5 Mon Sep 17 00:00:00 2001
+From: Andrew McCann <amccann at gmail.com>
+Date: Sun, 15 Nov 2015 16:29:47 -0800
+Subject: [PATCH] OS X: Fix QStandardPaths::standardLocations()
+
+Task-number: QTBUG-49443
+Change-Id: I0699dfd3cb4c710ab96c324219444c6294c9d732
+Reviewed-by: Jake Petroules <jake.petroules at theqtcompany.com>
+Reviewed-by: Milian Wolff <milian.wolff at kdab.com>
+---
+ src/corelib/io/qstandardpaths_mac.mm | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/corelib/io/qstandardpaths_mac.mm b/src/corelib/io/qstandardpaths_mac.mm
+index d6126ce..7b97a03 100644
+--- src/corelib/io/qstandardpaths_mac.mm
++++ src/corelib/io/qstandardpaths_mac.mm
+@@ -204,7 +204,7 @@ QStringList QStandardPaths::standardLocations(StandardLocation type)
+             CFRelease(bundleUrl);
+ 
+             CFURLRef resourcesUrl = CFBundleCopyResourcesDirectoryURL(mainBundle);
+-            CFStringRef cfResourcesPath = CFURLCopyPath(bundleUrl);
++            CFStringRef cfResourcesPath = CFURLCopyPath(resourcesUrl);
+             QString resourcesPath = QCFString::toQString(cfResourcesPath);
+             CFRelease(cfResourcesPath);
+             CFRelease(resourcesUrl);
+-- 
+2.6.2.2.g1b5ffa3
+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20151212/8b45c52a/attachment-0001.html>


More information about the macports-changes mailing list