From owner-svn-ports-head@freebsd.org Sun Jan 3 21:25:24 2016 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 726C7A6074E; Sun, 3 Jan 2016 21:25:24 +0000 (UTC) (envelope-from rakuco@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4ADB41A09; Sun, 3 Jan 2016 21:25:24 +0000 (UTC) (envelope-from rakuco@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u03LPNB1050448; Sun, 3 Jan 2016 21:25:23 GMT (envelope-from rakuco@FreeBSD.org) Received: (from rakuco@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u03LPN58050445; Sun, 3 Jan 2016 21:25:23 GMT (envelope-from rakuco@FreeBSD.org) Message-Id: <201601032125.u03LPN58050445@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rakuco set sender to rakuco@FreeBSD.org using -f From: Raphael Kubo da Costa Date: Sun, 3 Jan 2016 21:25:23 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r405187 - in head: Mk devel/qt5-core devel/qt5/files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jan 2016 21:25:24 -0000 Author: rakuco Date: Sun Jan 3 21:25:23 2016 New Revision: 405187 URL: https://svnweb.freebsd.org/changeset/ports/405187 Log: 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 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. Added: head/devel/qt5/files/extrapatch-src_corelib_global_qcompilerdetection.h (contents, props changed) Modified: head/Mk/bsd.qt.mk head/devel/qt5-core/Makefile Modified: head/Mk/bsd.qt.mk ============================================================================== --- head/Mk/bsd.qt.mk Sun Jan 3 21:15:57 2016 (r405186) +++ head/Mk/bsd.qt.mk Sun Jan 3 21:25:23 2016 (r405187) @@ -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: head/devel/qt5-core/Makefile ============================================================================== --- head/devel/qt5-core/Makefile Sun Jan 3 21:15:57 2016 (r405186) +++ head/devel/qt5-core/Makefile Sun Jan 3 21:25:23 2016 (r405187) @@ -2,7 +2,7 @@ PORTNAME= core DISTVERSION= ${QT5_VERSION} -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= devel PKGNAMEPREFIX= qt5- Added: head/devel/qt5/files/extrapatch-src_corelib_global_qcompilerdetection.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/qt5/files/extrapatch-src_corelib_global_qcompilerdetection.h Sun Jan 3 21:25:23 2016 (r405187) @@ -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 + // 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