diff options
author | rakuco <rakuco@FreeBSD.org> | 2014-07-24 16:37:55 +0800 |
---|---|---|
committer | rakuco <rakuco@FreeBSD.org> | 2014-07-24 16:37:55 +0800 |
commit | e4467470242c4d3a3df1b574ea4ef2b765dc729b (patch) | |
tree | fab9fda695253d984d642f95861475a79e84a9e8 /Mk | |
parent | 639bb043ea250345dd159f8bea6e01e6673e0e08 (diff) | |
download | freebsd-ports-gnome-e4467470242c4d3a3df1b574ea4ef2b765dc729b.tar.gz freebsd-ports-gnome-e4467470242c4d3a3df1b574ea4ef2b765dc729b.tar.zst freebsd-ports-gnome-e4467470242c4d3a3df1b574ea4ef2b765dc729b.zip |
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.
Diffstat (limited to 'Mk')
-rw-r--r-- | Mk/bsd.qt.mk | 2 |
1 files changed, 2 insertions, 0 deletions
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 |