Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 3 Jan 2016 21:26:24 +0000 (UTC)
From:      Raphael Kubo da Costa <rakuco@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-branches@freebsd.org
Subject:   svn commit: r405188 - in branches/2016Q1: Mk devel/qt5-core devel/qt5/files
Message-ID:  <201601032126.u03LQO3x050666@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rakuco
Date: Sun Jan  3 21:26:24 2016
New Revision: 405188
URL: https://svnweb.freebsd.org/changeset/ports/405188

Log:
  MFH: r405187
  
  Qt5: Add a patch to allow using clang, -std=c++11 and base libstdc++.
  
  This is similar to what we did for Qt4 in r362770. Some C++11 features actually
  depend on the C++ standard library, such as <initializer_list> or std::move().
  
  So far, ports with USES=compiler:c++0x and similar failed to build with Qt5 on
  FreeBSD 9.x, as base libstdc++ is very old and does not support those C++11
  features.
  
  Piggyback on a check that is already present upstream for OS X, which has the
  same ancient libstdc++ version. Apple's version has a custom patch with version
  macros that we can't use, so we make a broader check and disable the features
  that depend on a modern standard library if libc++ is not used.
  
  Approved by:	portmgr blanket

Added:
  branches/2016Q1/devel/qt5/files/extrapatch-src_corelib_global_qcompilerdetection.h
     - copied unchanged from r405187, head/devel/qt5/files/extrapatch-src_corelib_global_qcompilerdetection.h
Modified:
  branches/2016Q1/Mk/bsd.qt.mk
  branches/2016Q1/devel/qt5-core/Makefile
Directory Properties:
  branches/2016Q1/   (props changed)

Modified: branches/2016Q1/Mk/bsd.qt.mk
==============================================================================
--- branches/2016Q1/Mk/bsd.qt.mk	Sun Jan  3 21:25:23 2016	(r405187)
+++ branches/2016Q1/Mk/bsd.qt.mk	Sun Jan  3 21:26:24 2016	(r405188)
@@ -173,11 +173,13 @@ CONFIGURE_ARGS+=-verbose
 . if ${QT_DIST} == "base" || ${_QT_VERSION:M4*}
 .  if ${_QT_VERSION:M4*}
 _EXTRA_PATCHES_QT4=	${.CURDIR:H:H}/devel/${_QT_RELNAME}/files/extrapatch-src-corelib-global-qglobal.h
+.  else
+_EXTRA_PATCHES_QT5=	${.CURDIR:H:H}/devel/${_QT_RELNAME}/files/extrapatch-src_corelib_global_qcompilerdetection.h
 .  endif
 EXTRA_PATCHES?=	${.CURDIR:H:H}/devel/${_QT_RELNAME}/files/extrapatch-configure \
 		${.CURDIR:H:H}/devel/${_QT_RELNAME}/files/extrapatch-config.tests-unix-compile.test \
 		${.CURDIR:H:H}/devel/${_QT_RELNAME}/files/extrapatch-libtool \
-		${_EXTRA_PATCHES_QT4}
+		${_EXTRA_PATCHES_QT4} ${_EXTRA_PATCHES_QT5}
 . endif
 
 # Override settings installed in qconfig.h and *.pri files. The flags will be

Modified: branches/2016Q1/devel/qt5-core/Makefile
==============================================================================
--- branches/2016Q1/devel/qt5-core/Makefile	Sun Jan  3 21:25:23 2016	(r405187)
+++ branches/2016Q1/devel/qt5-core/Makefile	Sun Jan  3 21:26:24 2016	(r405188)
@@ -2,7 +2,7 @@
 
 PORTNAME=	core
 DISTVERSION=	${QT5_VERSION}
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	devel
 PKGNAMEPREFIX=	qt5-
 

Copied: branches/2016Q1/devel/qt5/files/extrapatch-src_corelib_global_qcompilerdetection.h (from r405187, head/devel/qt5/files/extrapatch-src_corelib_global_qcompilerdetection.h)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/2016Q1/devel/qt5/files/extrapatch-src_corelib_global_qcompilerdetection.h	Sun Jan  3 21:26:24 2016	(r405188, copy of r405187, head/devel/qt5/files/extrapatch-src_corelib_global_qcompilerdetection.h)
@@ -0,0 +1,15 @@
+--- src/corelib/global/qcompilerdetection.h.orig	2016-01-03 18:13:55 UTC
++++ src/corelib/global/qcompilerdetection.h
+@@ -900,10 +900,10 @@
+ #    undef Q_COMPILER_REF_QUALIFIERS
+ #  endif
+ # endif // Q_OS_QNX
+-# if (defined(Q_CC_CLANG) || defined(Q_CC_INTEL)) && defined(Q_OS_MAC) && defined(__GNUC_LIBSTD__) \
+-    && ((__GNUC_LIBSTD__-0) * 100 + __GNUC_LIBSTD_MINOR__-0 <= 402)
++# if (defined(Q_CC_CLANG) || defined(Q_CC_INTEL)) && !defined(_LIBCPP_VERSION)
+ // Mac OS X: Apple has not updated libstdc++ since 2007, which means it does not have
+ // <initializer_list> or std::move. Let's disable these features
++// The same applies to FreeBSD's base libstdc++ version used in FreeBSD 9.x.
+ #  undef Q_COMPILER_INITIALIZER_LISTS
+ #  undef Q_COMPILER_RVALUE_REFS
+ #  undef Q_COMPILER_REF_QUALIFIERS



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201601032126.u03LQO3x050666>