From e4467470242c4d3a3df1b574ea4ef2b765dc729b Mon Sep 17 00:00:00 2001 From: rakuco Date: Thu, 24 Jul 2014 08:37:55 +0000 Subject: Backport my patch to make Qt correctly detect clang's support for C++11 features. So far, Qt4 was basing its check for compiler support for C++11 features (auto types, lambdas, rvalue references and others) on the values of __GNUC__ and __GNUC_MINOR__. This works for GCC, but not for clang, whose __GNUC_MINOR__ is stuck at 2. In practice, this meant Qt programs built using clang were never able to use C++11 features which are conditionally available in classes such as QList. This patch makes the detection more in line with what Qt5 does (checks for GCC and clang are in separate sections and are done differently). I couldn't find cases of this negatively affecting any port so far, but it is useful to have -- Akonadi's unit tests require C++11 support in Qt, for example. Only qt4-corelibs's PORTREVISION was bumped to make the new qglobal.h be installed. Checks for these C++11 features are only present in headers of other Qt4 ports, so there's no need to rebuild them. --- Mk/bsd.qt.mk | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Mk') diff --git a/Mk/bsd.qt.mk b/Mk/bsd.qt.mk index a60ac53b71f5..07ba5f402356 100644 --- a/Mk/bsd.qt.mk +++ b/Mk/bsd.qt.mk @@ -171,6 +171,8 @@ EXTRA_PATCHES?= ${.CURDIR:H:H}/devel/${_QT_RELNAME}/files/extrapatch-configure \ ${.CURDIR:H:H}/devel/${_QT_RELNAME}/files/extrapatch-libtool . if ${_QT_VERSION:M5*} EXTRA_PATCHES+= ${.CURDIR:H:H}/devel/qt5-core/files/extrapatch-src__corelib__tools__qdatetime.cpp +. elif ${_QT_VERSION:M4*} +EXTRA_PATCHES+= ${.CURDIR:H:H}/devel/${_QT_RELNAME}/files/extrapatch-src-corelib-global-qglobal.h . endif . endif -- cgit