Index: head/devel/qt4/files/extrapatch-src-corelib-global-qglobal.h =================================================================== --- head/devel/qt4/files/extrapatch-src-corelib-global-qglobal.h (revision 402612) +++ head/devel/qt4/files/extrapatch-src-corelib-global-qglobal.h (revision 402613) @@ -1,34 +1,36 @@ clang: Only enable Q_COMPILER_INITIALIZER_LISTS with libc++. This is a workaround for the FreeBSD 9.x series: in Qt 4.8.7, C++11 features are detected by checking if the compiler supports them. However, initializer lists support also depends on the C++ standard library. 9.x's libstdc++ from base (GCC 4.2) does not, so ports with e.g. USES=compiler:c++0x or compiler:c++11-lang would break: they build with clang and base's libstdc++, so Qt considers the support is there (including the C++ header) while this is not the case. Work around the problem by only enabling Q_COMPILER_INITIALIZER_LISTS if libc++ is being used. Detecting libstdc++'s version is too cumbersome (we would at least need to include a non-lightweight header such as cstdio to have access to __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) -# define Q_COMPILER_INITIALIZER_LISTS +/* + * Workaround for FreeBSD 9.x, where we can end up building a port with clang + * and base's libstdc++ from GCC 4.2 (which does not support initializer + * lists). Since detecting libstdc++'s version is not trivial, only enable the + * macro with libc++. + */ -+# include -+# if defined(_LIBCPP_VER) -+# define Q_COMPILER_INITIALIZER_LISTS ++# if defined(__cplusplus) /* Only C++ has ciso646. */ ++# include ++# if defined(_LIBCPP_VER) ++# define Q_COMPILER_INITIALIZER_LISTS ++# endif +# endif # endif # if __has_feature(cxx_lambdas) # define Q_COMPILER_LAMBDA Index: head/devel/qt4-corelib/Makefile =================================================================== --- head/devel/qt4-corelib/Makefile (revision 402612) +++ head/devel/qt4-corelib/Makefile (revision 402613) @@ -1,82 +1,83 @@ # Created by: lofi@FreeBSD.org # $FreeBSD$ PORTNAME= corelib DISTVERSION= ${QT4_VERSION} +PORTREVISION= 1 CATEGORIES= devel PKGNAMEPREFIX= qt4- MAINTAINER= kde@FreeBSD.org COMMENT= Qt core non-graphical module LIB_DEPENDS= libicui18n.so:${PORTSDIR}/devel/icu USE_GNOME= glib20 USE_QT4= qmake_build moc_build QT_DIST= yes USES= iconv pkgconfig HAS_CONFIGURE= yes USE_LDCONFIG= ${PREFIX}/${QT_LIBDIR_REL} ALL_TARGET= first CONFIGURE_ENV?= QTDIR=${WRKSRC} PATH=${WRKSRC}/bin:$$PATH MAKE_ENV?= QTDIR=${WRKSRC} LD_LIBRARY_PATH=${WRKSRC}/lib:$$LD_LIBRARY_PATH \ PATH=${WRKSRC}/bin:$$PATH DO_NOT_EXTRACT= demos doc examples mkspecs qmake tools translations \ src/activeqt src/dbus src/gui src/multimedia src/network \ src/opengl src/openvg src/phonon src/qt3support \ src/s60installs src/s60main src/script src/scripttools src/sql \ src/svg src/testlib src/tools src/winmain src/xml \ src/xmlpatterns src/3rdparty/clucene src/3rdparty/freetype \ src/3rdparty/libjpeg src/3rdparty/libmng src/3rdparty/libpng \ src/3rdparty/libtiff src/3rdparty/phonon src/3rdparty/webkit .for dne in ${DO_NOT_EXTRACT} EXTRACT_AFTER_ARGS+= --exclude '${DISTNAME}/${dne}' .endfor BUILD_WRKSRC= ${WRKSRC}/src/${PORTNAME} INSTALL_WRKSRC= ${BUILD_WRKSRC} .include "${.CURDIR}/../../devel/qt4/files/Makefile.options" .if empty(QT4_OPTIONS:MCUPS) CONFIGURE_ARGS+= -no-cups .endif .if empty(QT4_OPTIONS:MNAS) CONFIGURE_ARGS+= -no-nas-sound .endif .if empty(QT4_OPTIONS:MQGTKSTYLE) CONFIGURE_ARGS+= -no-gtkstyle .endif pre-everything:: @${CAT} ${PKGMESSAGE} post-patch: ${REINPLACE_CMD} -e '${QT4_OPTIONS_REPLACE}' ${WRKSRC}/configure pre-configure: ${MKDIR} ${WRKSRC}/mkspecs ${LN} -sf ${QMAKE} ${WRKSRC}/bin/qmake ${LN} -sf ${MOC} ${WRKSRC}/bin/moc post-configure: ${REINPLACE_CMD} -e 's|${PREFIX}/${QT_LIBDIR_REL}/pkgconfig|${PREFIX}/libdata/pkgconfig|g' \ -e 's|.*$$(QMAKE).*||g' \ ${BUILD_WRKSRC}/Makefile ${REINPLACE_CMD} -E -e 's|-L.[^[:space:]]*qt-x11-opensource.[^[:space:]]*lib||g' \ -E -e 's|(.*location=).*moc|\1${PREFIX}/${QT_BINDIR_REL}/${MOC:T}|g' \ -E -e 's|(.*location=).*uic|\1${PREFIX}/${QT_BINDIR_REL}/${UIC:T}|g' \ ${WRKSRC}/lib/pkgconfig/QtCore.pc post-install: ${MKDIR} ${STAGEDIR}${PREFIX}/${QT_PLUGINDIR_REL} ${TOUCH} ${STAGEDIR}${PREFIX}/${QT_PLUGINDIR_REL}/.keep_me ${MKDIR} ${STAGEDIR}${PREFIX}/${QT_MKSPECDIR_REL} ${INSTALL_DATA} ${WRKSRC}/mkspecs/qconfig.pri ${STAGEDIR}${PREFIX}/${QT_MKSPECDIR_REL}/ .include Index: head/x11/kdelibs4/Makefile =================================================================== --- head/x11/kdelibs4/Makefile (revision 402612) +++ head/x11/kdelibs4/Makefile (revision 402613) @@ -1,106 +1,106 @@ # Created by: arved@FreeBSD.org # $FreeBSD$ PORTNAME= kdelibs PORTVERSION= ${KDE4_VERSION} -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= x11 kde MASTER_SITES= KDE/${KDE4_BRANCH}/${PORTVERSION}/src DIST_SUBDIR= KDE/${PORTVERSION} MAINTAINER= kde@FreeBSD.org COMMENT= Base set of libraries needed by KDE programs LIB_DEPENDS= libIlmImf.so:${PORTSDIR}/graphics/OpenEXR \ libjasper.so:${PORTSDIR}/graphics/jasper \ libpcre.so:${PORTSDIR}/devel/pcre \ libavahi-core.so:${PORTSDIR}/net/avahi-app \ libenchant.so:${PORTSDIR}/textproc/enchant \ libgif.so:${PORTSDIR}/graphics/giflib \ libpng.so:${PORTSDIR}/graphics/png \ libhal.so:${PORTSDIR}/sysutils/hal \ libqca.so:${PORTSDIR}/devel/qca \ libHUpnp.so:${PORTSDIR}/net/hupnp \ libpolkit-qt-core-1.so:${PORTSDIR}/sysutils/polkit-qt \ libdbusmenu-qt.so:${PORTSDIR}/devel/libdbusmenu-qt \ libgrantlee_gui.so:${PORTSDIR}/devel/grantlee BUILD_DEPENDS= docbook-xml>0:${PORTSDIR}/textproc/docbook-xml \ ${LOCALBASE}/share/xsl/docbook/html/docbook.xsl:${PORTSDIR}/textproc/docbook-xsl RUN_DEPENDS= ${LOCALBASE}/share/icons/hicolor/index.theme:${PORTSDIR}/misc/hicolor-icon-theme \ xauth:${PORTSDIR}/x11/xauth \ docbook-xml>0:${PORTSDIR}/textproc/docbook-xml \ ${LOCALBASE}/share/xsl/docbook/html/docbook.xsl:${PORTSDIR}/textproc/docbook-xsl USE_GNOME= libxml2 libxslt USE_KDE4= kdeprefix oxygen \ attica automoc4 ontologies soprano strigi USES= cmake:outsource fam gettext jpeg perl5 shared-mime-info shebangfix tar:xz USE_OPENSSL= yes USE_QT4= corelib dbus declarative designer_build gui \ network opengl phonon qt3support \ qtestlib script sql svg webkit xml \ moc_build qmake_build rcc_build uic_build \ imageformats_run qdbusviewer_run USE_XORG= sm x11 xcursor xext xfixes xft xpm xrender xtst USE_LDCONFIG= yes MAKE_ENV= XDG_CONFIG_HOME=/dev/null CMAKE_ARGS+= -DWITH_ACL:BOOL=Off \ -DWITH_FAM:BOOL=On \ -DWITH_ASPELL:BOOL=Off \ -DWITH_HSPELL:BOOL=Off \ -DWITH_UDev:BOOL=Off \ -DHUPNP_ENABLED:BOOL=On \ -DKDE_DISTRIBUTION_TEXT:STRING="${OPSYS}" \ -DKDE_DEFAULT_HOME:STRING=".kde4" SHEBANG_FILES= kdecore/kconfig_compiler/checkkcfg.pl \ kdeui/preparetips \ khtml/bindings/scripts/generate-bindings.pl \ kio/misc/fileshareset \ kio/useragent.pl \ kio/proxytype.pl \ kioslave/http/kcookiejar/kcookiescfg.pl post-patch: ${REINPLACE_CMD} -e 's,/usr/local,${LOCALBASE},g' \ ${PATCH_WRKSRC}/kde3support/kdeui/k3sconfig.cpp \ ${PATCH_WRKSRC}/kdecore/network/k3socks.cpp \ ${PATCH_WRKSRC}/kdecore/kernel/kstandarddirs.cpp \ ${PATCH_WRKSRC}/kdeui/dialogs/kcupsoptionswidget_p.cpp \ ${PATCH_WRKSRC}/kdeui/kernel/start-session-bus.sh \ ${PATCH_WRKSRC}/kio/kssl/kopenssl.cpp \ ${PATCH_WRKSRC}/kio/kio/ksambashare.cpp \ ${PATCH_WRKSRC}/kjsembed/qtonly/FindQJSInternal.cmake # Fix rgb named colors database path. ${REINPLACE_CMD} -e 's|/usr/X11R6|${LOCALBASE}|g' \ ${PATCH_WRKSRC}/kdeui/colors/kcolordialog.cpp pre-configure: ${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g' \ -e 's|/usr/X11R6|${LOCALBASE}|g' \ ${PATCH_WRKSRC}/cmake/modules/*.cmake \ ${PATCH_WRKSRC}/ConfigureChecks.cmake \ ${PATCH_WRKSRC}/doc/api/doxygen.sh ${REINPLACE_CMD} -e 's|/usr/include|${LOCALBASE}/include|g' \ ${PATCH_WRKSRC}/cmake/modules/FindDNSSD.cmake ${REINPLACE_CMD} -e 's|soprano/cmake|cmake/Modules|g' \ ${PATCH_WRKSRC}/cmake/modules/FindSoprano.cmake # FindBerkeleyDB.cmake should be rewritten to support multiple version # provided by ports, instead of hardcoding one of them # ${REINPLACE_CMD} -e 's|/usr/local/include/db4|${BDB_INCLUDE_DIR}|' \ # -e 's|NAMES db|NAMES ${BDB_LIB_NAME} ${LOCALBASE}/lib|' \ # ${PATCH_WRKSRC}/cmake/modules/FindBerkeleyDB.cmake # When XSync (xext) is found, xscreensaver is just used as a fallback, # then we can disable it. ${REINPLACE_CMD} -e '/macro_bool_to_01/ s|^.*X11_Xscreensaver.*$$|set(HAVE_XSCREENSAVER 0)|' \ ${PATCH_WRKSRC}/CMakeLists.txt post-install: # workaround for non-standard mime files and directories ${MKDIR} ${STAGEDIR}/${PREFIX}/share/mime/all \ ${STAGEDIR}/${PREFIX}/share/mime/uri .include Index: head/x11/kdelibs4/files/patch-cmake_modules_FindQt4.cmake =================================================================== --- head/x11/kdelibs4/files/patch-cmake_modules_FindQt4.cmake (revision 402612) +++ head/x11/kdelibs4/files/patch-cmake_modules_FindQt4.cmake (revision 402613) @@ -1,74 +1,32 @@ -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 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) _qt4_query_qmake(QT_INSTALL_IMPORTS qt_imports_dir) - if(qt_imports_dir) - SET(QT_IMPORTS_DIR NOTFOUND) - foreach(qt_cross_path ${CMAKE_FIND_ROOT_PATH}) - set(qt_cross_paths ${qt_cross_paths} "${qt_cross_path}/imports") - endforeach(qt_cross_path) - FIND_PATH(QT_IMPORTS_DIR NAMES Qt - HINTS ${qt_cross_paths} ${qt_imports_dir} - DOC "The location of the Qt imports" - NO_CMAKE_PATH NO_CMAKE_ENVIRONMENT_PATH NO_SYSTEM_ENVIRONMENT_PATH - NO_CMAKE_SYSTEM_PATH) - mark_as_advanced(QT_IMPORTS_DIR) - endif(qt_imports_dir) + SET(QT_IMPORTS_DIR ${qt_imports_dir} CACHE PATH "The location of the Qt imports" FORCE) ENDIF (QT_LIBRARY_DIR AND NOT QT_IMPORTS_DIR OR QT_QMAKE_CHANGED) # Make variables changeble to the advanced user MARK_AS_ADVANCED( QT_LIBRARY_DIR QT_DOC_DIR QT_MKSPECS_DIR - QT_PLUGINS_DIR QT_TRANSLATIONS_DIR) + QT_PLUGINS_DIR QT_TRANSLATIONS_DIR QT_IMPORTS_DIR) ############################################# -@@ -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)