diff options
author | rakuco <rakuco@FreeBSD.org> | 2015-11-30 02:08:04 +0800 |
---|---|---|
committer | rakuco <rakuco@FreeBSD.org> | 2015-11-30 02:08:04 +0800 |
commit | 12061ce458410ef868a5857e2203efc15a574b0d (patch) | |
tree | f6af6a46d05714218f5e6ec52166e72d573ea1d1 /devel | |
parent | c357c8658d839b4d49994ebde13f38fe2abed676 (diff) | |
download | freebsd-ports-gnome-12061ce458410ef868a5857e2203efc15a574b0d.tar.gz freebsd-ports-gnome-12061ce458410ef868a5857e2203efc15a574b0d.tar.zst freebsd-ports-gnome-12061ce458410ef868a5857e2203efc15a574b0d.zip |
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).
Diffstat (limited to 'devel')
-rw-r--r-- | devel/qt4-corelib/Makefile | 1 | ||||
-rw-r--r-- | devel/qt4/files/extrapatch-src-corelib-global-qglobal.h | 10 |
2 files changed, 7 insertions, 4 deletions
diff --git a/devel/qt4-corelib/Makefile b/devel/qt4-corelib/Makefile index fd1dcade9161..5333f28a753d 100644 --- a/devel/qt4-corelib/Makefile +++ b/devel/qt4-corelib/Makefile @@ -3,6 +3,7 @@ PORTNAME= corelib DISTVERSION= ${QT4_VERSION} +PORTREVISION= 1 CATEGORIES= devel PKGNAMEPREFIX= qt4- diff --git a/devel/qt4/files/extrapatch-src-corelib-global-qglobal.h b/devel/qt4/files/extrapatch-src-corelib-global-qglobal.h index 492a0993b2fd..715d52ac9b21 100644 --- a/devel/qt4/files/extrapatch-src-corelib-global-qglobal.h +++ b/devel/qt4/files/extrapatch-src-corelib-global-qglobal.h @@ -14,7 +14,7 @@ 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) @@ -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) |