[kde-freebsd] [SVN Commit] area51

Raphael Kubo da Costa rakuco at FreeBSD.org
Tue Sep 15 09:20:06 UTC 2015


SVN commit 11443 by rakuco:

QT: Only set Q_COMPILER_INITIALIZER_LISTS with libc++.

This works around the way compiler support for C++11 features is detected in
Qt 4.8.7: while it originally only uses the compiler to determine if
something is supported or not, the initializer lists feature also depends on
the C++ standard library being used. It's a problem in FreeBSD 9.x, where
USES=compiler:c++0x or USES=compiler:c++11-lang means we will use clang to
build a port but use libstdc++ from base (GCC 4.2). The latter obviously
does not support initializer lists, and the build fails because Qt tries to
include headers that do not exist (<initializer_list>).

Since detecting libstdc++'s version is not trivial (we need to include a
non-lightweight header like cstdio and then check for __GLIBCXX__), we just
enable Q_COMPILER_INITIALIZER_LISTS support only when libc++ is used (there
should be no reason for someone to be using clang with GCC 4.8's libstdc++,
for example).

Related changes:
- databases/akonadi: Revert r10988, the port does not need c++11-lib to
  build anymore.
- x11/kdelibs4: Add a patch to FindQt4.cmake backporting a change from the
  upstream FindQt4.cmake in CMake itself to use a C++ compiler to detect
  flags like Q_WS_X11, otherwise the inclusion of <ciso646> in qglobal.h
  makes the build fail.



 M  +49 -3     KDE/x11/kdelibs4/files/patch-cmake_modules_FindQt4.cmake  
 M  +1 -1      PORTS/databases/akonadi/Makefile  
 M  +5 -1      QT/Mk/bsd.qt.mk  
 AM            QT/devel/qt4/files/extrapatch-src-corelib-global-qglobal.h  




More information about the kde-freebsd mailing list