Date: Sun, 29 Nov 2015 18:08:04 +0000 (UTC) From: Raphael Kubo da Costa <rakuco@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r402613 - in head: devel/qt4-corelib devel/qt4/files x11/kdelibs4 x11/kdelibs4/files Message-ID: <201511291808.tATI842K076984@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: rakuco Date: Sun Nov 29 18:08:04 2015 New Revision: 402613 URL: https://svnweb.freebsd.org/changeset/ports/402613 Log: Make devel/qt4's clang+base libstdc++ patch work without changes to x11/kdelibs4. Unconditionally including ciso646 in qglobal.h to check for libc++ makes including qglobal.h from C programs fail. qglobal.h is not supposed to be used in C programs, but kdelibs4's FindQt.cmake ends up calling CHECK_SYMBOL_EXISTS() instead of CHECK_CXX_SYMBOL_EXISTS() to check if some macros are defined. Since kdelibs4 is in maintenance mode, our changes to it can be avoided if we just check for __cplusplus before including ciso646 (<initializer_list> is not available in C anyway). Modified: head/devel/qt4-corelib/Makefile head/devel/qt4/files/extrapatch-src-corelib-global-qglobal.h head/x11/kdelibs4/Makefile head/x11/kdelibs4/files/patch-cmake_modules_FindQt4.cmake Modified: head/devel/qt4-corelib/Makefile ============================================================================== --- head/devel/qt4-corelib/Makefile Sun Nov 29 17:51:03 2015 (r402612) +++ head/devel/qt4-corelib/Makefile Sun Nov 29 18:08:04 2015 (r402613) @@ -3,6 +3,7 @@ PORTNAME= corelib DISTVERSION= ${QT4_VERSION} +PORTREVISION= 1 CATEGORIES= devel PKGNAMEPREFIX= qt4- Modified: head/devel/qt4/files/extrapatch-src-corelib-global-qglobal.h ============================================================================== --- head/devel/qt4/files/extrapatch-src-corelib-global-qglobal.h Sun Nov 29 17:51:03 2015 (r402612) +++ head/devel/qt4/files/extrapatch-src-corelib-global-qglobal.h Sun Nov 29 18:08:04 2015 (r402613) @@ -14,7 +14,7 @@ least need to include a non-lightweight __GLIBCXX__) and not worth the effort. --- src/corelib/global/qglobal.h +++ src/corelib/global/qglobal.h -@@ -854,7 +855,16 @@ namespace QT_NAMESPACE {} +@@ -854,7 +855,18 @@ namespace QT_NAMESPACE {} # define Q_COMPILER_DEFAULT_DELETE_MEMBERS # endif # if __has_feature(cxx_generalized_initializers) @@ -25,9 +25,11 @@ __GLIBCXX__) and not worth the effort. + * lists). Since detecting libstdc++'s version is not trivial, only enable the + * macro with libc++. + */ -+# include <ciso646> -+# if defined(_LIBCPP_VER) -+# define Q_COMPILER_INITIALIZER_LISTS ++# if defined(__cplusplus) /* Only C++ has ciso646. */ ++# include <ciso646> ++# if defined(_LIBCPP_VER) ++# define Q_COMPILER_INITIALIZER_LISTS ++# endif +# endif # endif # if __has_feature(cxx_lambdas) Modified: head/x11/kdelibs4/Makefile ============================================================================== --- head/x11/kdelibs4/Makefile Sun Nov 29 17:51:03 2015 (r402612) +++ head/x11/kdelibs4/Makefile Sun Nov 29 18:08:04 2015 (r402613) @@ -3,7 +3,7 @@ PORTNAME= kdelibs PORTVERSION= ${KDE4_VERSION} -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= x11 kde MASTER_SITES= KDE/${KDE4_BRANCH}/${PORTVERSION}/src DIST_SUBDIR= KDE/${PORTVERSION} Modified: head/x11/kdelibs4/files/patch-cmake_modules_FindQt4.cmake ============================================================================== --- head/x11/kdelibs4/files/patch-cmake_modules_FindQt4.cmake Sun Nov 29 17:51:03 2015 (r402612) +++ head/x11/kdelibs4/files/patch-cmake_modules_FindQt4.cmake Sun Nov 29 18:08:04 2015 (r402613) @@ -1,25 +1,9 @@ -Hunks 1 and 3: - Backport upstream CMake change de30173d ("Remove C compiler requirement from - FindQt4.cmake") so that it uses a C++ compiler to look for Q_WS_X11, - otherwise the build fails because <ciso646> from qglobal.h is not present - when using a C compiler. - -Hunk 2: - Do the same thing we do in devel/cmake's FindQt4.cmake patch. The idea behind - the change is that the directories FindQt4.cmake looks for might not be - present at the time CMake looks for them since the ports that actually create - them may not be required by the port calling CMake. +Do the same thing we do in devel/cmake's FindQt4.cmake patch. The idea behind +the change is that the directories FindQt4.cmake looks for might not be +present at the time CMake looks for them since the ports that actually create +them may not be required by the port calling CMake. --- cmake/modules/FindQt4.cmake.orig 2014-11-06 22:33:50 UTC +++ cmake/modules/FindQt4.cmake -@@ -405,7 +405,7 @@ QT_CHECK_FLAG_EXISTS(-DQT_NO_DEBUG CMAKE - QT_CHECK_FLAG_EXISTS(-DQT_NO_DEBUG CMAKE_CXX_FLAGS_MINSIZEREL "release minsize") - - INCLUDE(MacroPushRequiredVars) --INCLUDE(CheckSymbolExists) -+INCLUDE(CheckCXXSymbolExists) - INCLUDE(MacroAddFileDependencies) - - SET(QT_USE_FILE ${CMAKE_ROOT}/Modules/UseQt4.cmake) @@ -638,23 +638,12 @@ IF (QT4_QMAKE_FOUND) # ask qmake for the imports directory IF (QT_LIBRARY_DIR AND NOT QT_IMPORTS_DIR OR QT_QMAKE_CHANGED) @@ -46,29 +30,3 @@ Hunk 2: ############################################# -@@ -671,19 +660,19 @@ IF (QT4_QMAKE_FOUND) - SET(CMAKE_REQUIRED_FLAGS "-F${QT_LIBRARY_DIR} ") - ENDIF( QT_USE_FRAMEWORKS ) - # Check for Window system symbols (note: only one should end up being set) -- CHECK_SYMBOL_EXISTS(Q_WS_X11 "QtCore/qglobal.h" Q_WS_X11) -- CHECK_SYMBOL_EXISTS(Q_WS_WIN "QtCore/qglobal.h" Q_WS_WIN) -- CHECK_SYMBOL_EXISTS(Q_WS_QWS "QtCore/qglobal.h" Q_WS_QWS) -- CHECK_SYMBOL_EXISTS(Q_WS_MAC "QtCore/qglobal.h" Q_WS_MAC) -+ CHECK_CXX_SYMBOL_EXISTS(Q_WS_X11 "QtCore/qglobal.h" Q_WS_X11) -+ CHECK_CXX_SYMBOL_EXISTS(Q_WS_WIN "QtCore/qglobal.h" Q_WS_WIN) -+ CHECK_CXX_SYMBOL_EXISTS(Q_WS_QWS "QtCore/qglobal.h" Q_WS_QWS) -+ CHECK_CXX_SYMBOL_EXISTS(Q_WS_MAC "QtCore/qglobal.h" Q_WS_MAC) - IF(Q_WS_MAC) - IF(QT_QMAKE_CHANGED) - UNSET(QT_MAC_USE_COCOA CACHE) - ENDIF(QT_QMAKE_CHANGED) -- CHECK_SYMBOL_EXISTS(QT_MAC_USE_COCOA "QtCore/qconfig.h" QT_MAC_USE_COCOA) -+ CHECK_CXX_SYMBOL_EXISTS(QT_MAC_USE_COCOA "QtCore/qconfig.h" QT_MAC_USE_COCOA) - ENDIF(Q_WS_MAC) - - IF (QT_QTCOPY_REQUIRED) -- CHECK_SYMBOL_EXISTS(QT_IS_QTCOPY "QtCore/qglobal.h" QT_KDE_QT_COPY) -+ CHECK_CXX_SYMBOL_EXISTS(QT_IS_QTCOPY "QtCore/qglobal.h" QT_KDE_QT_COPY) - IF (NOT QT_IS_QTCOPY) - MESSAGE(FATAL_ERROR "qt-copy is required, but hasn't been found") - ENDIF (NOT QT_IS_QTCOPY)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201511291808.tATI842K076984>