View | Details | Raw Unified | Return to bug 202808 | Differences between
and this patch

Collapse All | Expand All

(-)/usr/home/rakuco/dev/freebsd/area51/trunk/area51/QT/Mk/Uses/qmake.mk (+1 lines)
Lines 71-76 Link Here
71
		QMAKE_CFLAGS="${CFLAGS}" \
71
		QMAKE_CFLAGS="${CFLAGS}" \
72
		QMAKE_CXXFLAGS="${CXXFLAGS}" \
72
		QMAKE_CXXFLAGS="${CXXFLAGS}" \
73
		QMAKE_LFLAGS="${LDFLAGS}" \
73
		QMAKE_LFLAGS="${LDFLAGS}" \
74
		QMAKE_LIBS="${LIBS}" \
74
		QMAKE_CFLAGS_DEBUG="" \
75
		QMAKE_CFLAGS_DEBUG="" \
75
		QMAKE_CFLAGS_RELEASE="" \
76
		QMAKE_CFLAGS_RELEASE="" \
76
		QMAKE_CXXFLAGS_DEBUG="" \
77
		QMAKE_CXXFLAGS_DEBUG="" \
(-)/usr/home/rakuco/dev/freebsd/area51/trunk/area51/QT/Mk/bsd.qt.mk (-6 / +6 lines)
Lines 26-32 Link Here
26
26
27
# Qt versions currently supported by the framework.
27
# Qt versions currently supported by the framework.
28
_QT_SUPPORTED?=	4 5
28
_QT_SUPPORTED?=	4 5
29
QT4_VERSION?=	4.8.6
29
QT4_VERSION?=	4.8.7
30
QT5_VERSION?=	5.4.1
30
QT5_VERSION?=	5.4.1
31
31
32
QT_PREFIX?=		${LOCALBASE}
32
QT_PREFIX?=		${LOCALBASE}
Lines 171-183 Link Here
171
. endif
171
. endif
172
172
173
. if ${QT_DIST} == "base" || ${_QT_VERSION:M4*}
173
. if ${QT_DIST} == "base" || ${_QT_VERSION:M4*}
174
EXTRA_PATCHES?=	${.CURDIR:H:H}/devel/${_QT_RELNAME}/files/extrapatch-configure \
175
		${.CURDIR:H:H}/devel/${_QT_RELNAME}/files/extrapatch-config.tests-unix-compile.test \
176
		${.CURDIR:H:H}/devel/${_QT_RELNAME}/files/extrapatch-libtool
177
.  if ${_QT_VERSION:M4*}
174
.  if ${_QT_VERSION:M4*}
178
EXTRA_PATCHES?=	${EXTRA_PATCHES} \
175
_EXTRA_PATCHES_QT4=	${.CURDIR:H:H}/devel/${_QT_RELNAME}/files/extrapatch-src-corelib-global-qglobal.h
179
				${.CURDIR:H:H}/devel/${_QT_RELNAME}/files/extrapatch-src-corelib-global-qglobal.h
180
.  endif
176
.  endif
177
EXTRA_PATCHES?=	${.CURDIR:H:H}/devel/${_QT_RELNAME}/files/extrapatch-configure \
178
		${.CURDIR:H:H}/devel/${_QT_RELNAME}/files/extrapatch-config.tests-unix-compile.test \
179
		${.CURDIR:H:H}/devel/${_QT_RELNAME}/files/extrapatch-libtool \
180
		${_EXTRA_PATCHES_QT4}
181
. endif
181
. endif
182
182
183
# Override settings installed in qconfig.h and *.pri files. The flags will be
183
# Override settings installed in qconfig.h and *.pri files. The flags will be
(-)/usr/home/rakuco/dev/freebsd/area51/trunk/area51/QT/databases/qt4-odbc-plugin/Makefile (-1 lines)
Lines 3-9 Link Here
3
3
4
PORTNAME=	qt4-${DB}-plugin
4
PORTNAME=	qt4-${DB}-plugin
5
DISTVERSION=	${QT4_VERSION}
5
DISTVERSION=	${QT4_VERSION}
6
PORTREVISION=	1
7
CATEGORIES=	databases
6
CATEGORIES=	databases
8
7
9
MAINTAINER=	kde@FreeBSD.org
8
MAINTAINER=	kde@FreeBSD.org
(-)/usr/home/rakuco/dev/freebsd/area51/trunk/area51/QT/databases/qt4-sql/Makefile (-1 lines)
Lines 3-9 Link Here
3
3
4
PORTNAME=	sql
4
PORTNAME=	sql
5
DISTVERSION=	${QT4_VERSION}
5
DISTVERSION=	${QT4_VERSION}
6
PORTREVISION=	1
7
CATEGORIES=	databases
6
CATEGORIES=	databases
8
PKGNAMEPREFIX=	qt4-
7
PKGNAMEPREFIX=	qt4-
9
8
(-)/usr/home/rakuco/dev/freebsd/area51/trunk/area51/QT/databases/qt4-sqlite-plugin/Makefile (-1 lines)
Lines 3-9 Link Here
3
3
4
PORTNAME=	qt4-${DB}-plugin
4
PORTNAME=	qt4-${DB}-plugin
5
DISTVERSION=	${QT4_VERSION}
5
DISTVERSION=	${QT4_VERSION}
6
PORTREVISION=	1
7
CATEGORIES=	databases
6
CATEGORIES=	databases
8
7
9
MAINTAINER=	kde@FreeBSD.org
8
MAINTAINER=	kde@FreeBSD.org
(-)/usr/home/rakuco/dev/freebsd/area51/trunk/area51/QT/databases/qt4-sqlite3-plugin/Makefile (-1 lines)
Lines 3-9 Link Here
3
3
4
PORTNAME=	qt4-${DB}-plugin
4
PORTNAME=	qt4-${DB}-plugin
5
DISTVERSION=	${QT4_VERSION}
5
DISTVERSION=	${QT4_VERSION}
6
PORTREVISION=	1
7
CATEGORIES=	databases
6
CATEGORIES=	databases
8
7
9
MAINTAINER=	kde@FreeBSD.org
8
MAINTAINER=	kde@FreeBSD.org
(-)/usr/home/rakuco/dev/freebsd/area51/trunk/area51/QT/devel/dbus-qt4/Makefile (-1 lines)
Lines 3-9 Link Here
3
3
4
PORTNAME=	dbus
4
PORTNAME=	dbus
5
DISTVERSION=	${QT4_VERSION}
5
DISTVERSION=	${QT4_VERSION}
6
PORTREVISION=	1
7
CATEGORIES=	devel
6
CATEGORIES=	devel
8
PKGNAMEPREFIX=	qt4-
7
PKGNAMEPREFIX=	qt4-
9
8
(-)/usr/home/rakuco/dev/freebsd/area51/trunk/area51/QT/devel/qmake4/pkg-plist (+2 lines)
Lines 487-492 Link Here
487
%%QT_MKSPECDIR%%/win32-msvc2012/qplatformdefs.h
487
%%QT_MKSPECDIR%%/win32-msvc2012/qplatformdefs.h
488
%%QT_MKSPECDIR%%/win32-msvc2013/qmake.conf
488
%%QT_MKSPECDIR%%/win32-msvc2013/qmake.conf
489
%%QT_MKSPECDIR%%/win32-msvc2013/qplatformdefs.h
489
%%QT_MKSPECDIR%%/win32-msvc2013/qplatformdefs.h
490
%%QT_MKSPECDIR%%/win32-msvc2015/qmake.conf
491
%%QT_MKSPECDIR%%/win32-msvc2015/qplatformdefs.h
490
%%QT_MKSPECDIR%%/wince50standard-armv4i-msvc2005/default_post.prf
492
%%QT_MKSPECDIR%%/wince50standard-armv4i-msvc2005/default_post.prf
491
%%QT_MKSPECDIR%%/wince50standard-armv4i-msvc2005/qmake.conf
493
%%QT_MKSPECDIR%%/wince50standard-armv4i-msvc2005/qmake.conf
492
%%QT_MKSPECDIR%%/wince50standard-armv4i-msvc2005/qplatformdefs.h
494
%%QT_MKSPECDIR%%/wince50standard-armv4i-msvc2005/qplatformdefs.h
(-)/usr/home/rakuco/dev/freebsd/area51/trunk/area51/QT/devel/qt4/Makefile (-1 lines)
Lines 3-9 Link Here
3
3
4
PORTNAME=	qt4
4
PORTNAME=	qt4
5
DISTVERSION=	${QT4_VERSION}
5
DISTVERSION=	${QT4_VERSION}
6
PORTREVISION=	2
7
CATEGORIES=	devel
6
CATEGORIES=	devel
8
7
9
MAINTAINER=	kde@FreeBSD.org
8
MAINTAINER=	kde@FreeBSD.org
(-)/usr/home/rakuco/dev/freebsd/area51/trunk/area51/QT/devel/qt4/distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
SHA256 (KDE/qt-everywhere-opensource-src-4.8.6.tar.gz) = 8b14dd91b52862e09b8e6a963507b74bc2580787d171feda197badfa7034032c
1
SHA256 (KDE/qt-everywhere-opensource-src-4.8.7.tar.gz) = e2882295097e47fe089f8ac741a95fef47e0a73a3f3cdf21b56990638f626ea0
2
SIZE (KDE/qt-everywhere-opensource-src-4.8.6.tar.gz) = 241623667
2
SIZE (KDE/qt-everywhere-opensource-src-4.8.7.tar.gz) = 241075567
(-)/usr/home/rakuco/dev/freebsd/area51/trunk/area51/QT/devel/qt4/files/extrapatch-configure (-9 lines)
Lines 53-64 Link Here
53
 fi
53
 fi
54
 
54
 
55
 # X11/MINGW/SYMBIAN OpenGL
55
 # X11/MINGW/SYMBIAN OpenGL
56
@@ -7729,7 +7717,7 @@ case "$XPLATFORM" in
57
     *-g++*)
58
 	# Check gcc's version
59
 	case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
60
-	    4*|3.4*)
61
+	    5*|4*|3.4*)
62
 		;;
63
             3.3*)
64
                 canBuildWebKit="no"
(-)/usr/home/rakuco/dev/freebsd/area51/trunk/area51/QT/devel/qt4/files/extrapatch-src-corelib-global-qglobal.h (-231 / +26 lines)
Lines 1-239 Link Here
1
commit bc620055c82a8ccae49144ad99bf9226d659f852
1
clang: Only enable Q_COMPILER_INITIALIZER_LISTS with libc++.
2
Author: Raphael Kubo da Costa <rakuco@FreeBSD.org>
3
Date:   Sun Jul 13 23:15:00 2014 +0300
4
2
5
    Move the C++11 support macros to a central place.
3
This is a workaround for the FreeBSD 9.x series: in Qt 4.8.7, C++11 features
6
    
4
are detected by checking if the compiler supports them. However, initializer
7
    The main objective of this commit is to make C++11 support work with
5
lists support also depends on the C++ standard library. 9.x's libstdc++ from
8
    clang: so far, the Q_COMPILER_* definitions related to C++11 were
6
base (GCC 4.2) does not, so ports with e.g. USES=compiler:c++0x or
9
    enabled based on __GNUC__ and __GNUC_MINOR__; while clang does define
7
compiler:c++11-lang would break: they build with clang and base's libstdc++, so
10
    those two, __GNUC_MINOR__ is hardcoded at "2" and thus none of the
8
Qt considers the support is there (including the C++ header) while this is not
11
    macros end up being defined.
9
the case.
12
    
13
    We now make qglobal.h more similar to how qtbase's qcompilerdetection.h
14
    works by separating the detection of the C++11 features supported by a
15
    compiler from the detection of the compilers themselves.
16
    
17
    It is important to note the list of macros has not changed, the macros
18
    have only been moved.
19
    
20
    This commit either follows the spirit of or is a cherry-pick of the
21
    following qtbase ones:
22
    - 4131c323a36ee8680a3b4d66a2a03a00544751c2 (Update the C++11 support
23
      macros)
24
    - 8dd66f42e834320c4ba0a6f2e45855d591b3b6e7 (Avoid undefined macro
25
      warning for __GXX_EXPERIMENTAL_CXX0X__)
26
    - fe5d5fdaf1d9b7d108727d290e24a6b0f00139c6 (clang: Use __has_feature()
27
      to detect C++11 features)
28
    - 0ec953c93688ec0de74cda43b91f66f4cf879e5f (Remove extra Q_COMPILER_xxx
29
      defines from the MSVC section)
30
    - 163dcf2b71f34a12137f200e4af5640e42e5f5e2 (Fix build with older Clang
31
      versions without __has_extension)
32
    - 53262b9b5b9cb536916f6d6e086a944cb17bb8d8 (Only define the MSVC C++11
33
      feature macros in C++)
34
    
35
    Change-Id: I2ca35af1a23260a9373943f97a8a72db3fc670e4
36
    Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
37
10
38
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
11
Work around the problem by only enabling Q_COMPILER_INITIALIZER_LISTS if libc++
39
index 158ef78..4f1384b 100644
12
is being used. Detecting libstdc++'s version is too cumbersome (we would at
13
least need to include a non-lightweight header such as cstdio to have access to
14
__GLIBCXX__) and not worth the effort.
40
--- src/corelib/global/qglobal.h
15
--- src/corelib/global/qglobal.h
41
+++ src/corelib/global/qglobal.h
16
+++ src/corelib/global/qglobal.h
42
@@ -463,17 +463,6 @@ namespace QT_NAMESPACE {}
17
@@ -854,7 +855,16 @@ namespace QT_NAMESPACE {}
43
 #    undef QT_HAVE_3DNOW
18
 #      define Q_COMPILER_DEFAULT_DELETE_MEMBERS
44
 #  endif
45
 
46
-#if defined(Q_CC_MSVC) && _MSC_VER >= 1600
47
-#      define Q_COMPILER_RVALUE_REFS
48
-#      define Q_COMPILER_AUTO_FUNCTION
49
-#      define Q_COMPILER_AUTO_TYPE
50
-#      define Q_COMPILER_LAMBDA
51
-#      define Q_COMPILER_DECLTYPE
52
-//  MSCV has std::initilizer_list, but do not support the braces initialization
53
-//#      define Q_COMPILER_INITIALIZER_LISTS
54
-#  endif
55
-
56
-
57
 #elif defined(__BORLANDC__) || defined(__TURBOC__)
58
 #  define Q_CC_BOR
59
 #  define Q_INLINE_TEMPLATE
60
@@ -505,6 +494,7 @@ namespace QT_NAMESPACE {}
61
 /* work-around for missing compiler intrinsics */
62
 #  define __is_empty(X) false
63
 #  define __is_pod(X) false
64
+
65
 #elif defined(__GNUC__)
66
 #  define Q_CC_GNU
67
 #  define Q_C_CALLBACKS
68
@@ -518,6 +508,10 @@ namespace QT_NAMESPACE {}
69
 #  if defined(__clang__)
70
 /* Clang also masquerades as GCC 4.2.1 */
71
 #    define Q_CC_CLANG
72
+#    if !defined(__has_extension)
73
+       /* Compatibility with older Clang versions */
74
+#      define __has_extension __has_feature
75
+#    endif
76
 #  endif
77
 #  ifdef __APPLE__
78
 #    define Q_NO_DEPRECATED_CONSTRUCTORS
79
@@ -558,33 +552,6 @@ namespace QT_NAMESPACE {}
80
 #      define QT_NO_ARM_EABI
81
 #    endif
19
 #    endif
82
 #  endif
20
 #    if __has_feature(cxx_generalized_initializers)
83
-#  if defined(__GXX_EXPERIMENTAL_CXX0X__)
84
-#    if (__GNUC__ * 100 + __GNUC_MINOR__) >= 403
85
-       /* C++0x features supported in GCC 4.3: */
86
-#      define Q_COMPILER_RVALUE_REFS
87
-#      define Q_COMPILER_DECLTYPE
88
-#    endif
89
-#    if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404
90
-       /* C++0x features supported in GCC 4.4: */
91
-#      define Q_COMPILER_VARIADIC_TEMPLATES
92
-#      define Q_COMPILER_AUTO_FUNCTION
93
-#      define Q_COMPILER_AUTO_TYPE
94
-#      define Q_COMPILER_EXTERN_TEMPLATES
95
-#      define Q_COMPILER_DEFAULT_DELETE_MEMBERS
96
-#      define Q_COMPILER_CLASS_ENUM
97
-#      define Q_COMPILER_INITIALIZER_LISTS
21
-#      define Q_COMPILER_INITIALIZER_LISTS
98
-#    endif
99
-#    if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405
100
-       /* C++0x features supported in GCC 4.5: */
101
-#      define Q_COMPILER_LAMBDA
102
-#      define Q_COMPILER_UNICODE_STRINGS
103
-#    endif
104
-#    if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406
105
-       /* C++0x features supported in GCC 4.6: */
106
-#      define Q_COMPILER_CONSTEXPR
107
-#    endif
108
-
109
-#  endif
110
 
111
 /* IBM compiler versions are a bit messy. There are actually two products:
112
    the C product, and the C++ product. The C++ compiler is always packaged
113
@@ -829,12 +796,33 @@ namespace QT_NAMESPACE {}
114
 #  error "Qt has not been tested with this compiler - talk to qt-bugs@trolltech.com"
115
 #endif
116
 
117
+/*
22
+/*
118
+ * C++11 support
23
+ * Workaround for FreeBSD 9.x, where we can end up building a port with clang
119
+ *
24
+ * and base's libstdc++ from GCC 4.2 (which does not support initializer
120
+ *  Paper           Macro                               SD-6 macro
25
+ * lists). Since detecting libstdc++'s version is not trivial, only enable the
121
+ *  N2541           Q_COMPILER_AUTO_FUNCTION
26
+ * macro with libc++.
122
+ *  N1984 N2546     Q_COMPILER_AUTO_TYPE
123
+ *  N2437           Q_COMPILER_CLASS_ENUM
124
+ *  N2235           Q_COMPILER_CONSTEXPR                __cpp_constexpr = 200704
125
+ *  N2343 N3276     Q_COMPILER_DECLTYPE                 __cpp_decltype = 200707
126
+ *  N2346           Q_COMPILER_DEFAULT_DELETE_MEMBERS
127
+ *  N1987           Q_COMPILER_EXTERN_TEMPLATES
128
+ *  N2672           Q_COMPILER_INITIALIZER_LISTS
129
+ *  N2658 N2927     Q_COMPILER_LAMBDA                   __cpp_lambdas = 200907
130
+ *  N2118 N2844 N3053 Q_COMPILER_RVALUE_REFS            __cpp_rvalue_references = 200610
131
+ *  N2442           Q_COMPILER_UNICODE_STRINGS          __cpp_unicode_literals = 200710
132
+ *  N2242 N2555     Q_COMPILER_VARIADIC_TEMPLATES       __cpp_variadic_templates = 200704
133
+ *
134
+ * For any future version of the C++ standard, we use only the SD-6 macro.
135
+ * For full listing, see
136
+ *  http://isocpp.org/std/standing-documents/sd-6-sg10-feature-test-recommendations
137
+ */
27
+ */
138
 
28
+#      include <ciso646>
139
 #ifdef Q_CC_INTEL
29
+#      if defined(_LIBCPP_VER)
140
 #  if __INTEL_COMPILER < 1200
30
+#        define Q_COMPILER_INITIALIZER_LISTS
141
 #    define Q_NO_TEMPLATE_FRIENDS
31
+#      endif
142
 #  endif
32
 #    endif
143
-#  if defined(__GXX_EXPERIMENTAL_CXX0X__) || defined(__GXX_EXPERIMENTAL_CPP0X__)
33
 #    if __has_feature(cxx_lambdas)
144
+#  if __cplusplus >= 201103L
34
 #      define Q_COMPILER_LAMBDA
145
 #    if __INTEL_COMPILER >= 1100
146
 #      define Q_COMPILER_RVALUE_REFS
147
 #      define Q_COMPILER_EXTERN_TEMPLATES
148
@@ -849,6 +837,91 @@ namespace QT_NAMESPACE {}
149
 #  endif
150
 #endif
151
 
152
+#if defined(Q_CC_CLANG) && !defined(Q_CC_INTEL)
153
+#  if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__)
154
+    /* Detect C++ features using __has_feature(), see http://clang.llvm.org/docs/LanguageExtensions.html#cxx11 */
155
+#    if __has_feature(cxx_auto_type)
156
+#      define Q_COMPILER_AUTO_FUNCTION
157
+#      define Q_COMPILER_AUTO_TYPE
158
+#    endif
159
+#    if __has_feature(cxx_constexpr)
160
+#      define Q_COMPILER_CONSTEXPR
161
+#    endif
162
+#    if __has_feature(cxx_decltype) /* && __has_feature(cxx_decltype_incomplete_return_types) */
163
+#      define Q_COMPILER_DECLTYPE
164
+#    endif
165
+#    if __has_feature(cxx_defaulted_functions) && __has_feature(cxx_deleted_functions)
166
+#      define Q_COMPILER_DEFAULT_DELETE_MEMBERS
167
+#    endif
168
+#    if __has_feature(cxx_generalized_initializers)
169
+#      define Q_COMPILER_INITIALIZER_LISTS
170
+#    endif
171
+#    if __has_feature(cxx_lambdas)
172
+#      define Q_COMPILER_LAMBDA
173
+#    endif
174
+#    if __has_feature(cxx_rvalue_references)
175
+#      define Q_COMPILER_RVALUE_REFS
176
+#    endif
177
+#    if __has_feature(cxx_strong_enums)
178
+#      define Q_COMPILER_CLASS_ENUM
179
+#    endif
180
+#    if __has_feature(cxx_unicode_literals)
181
+#      define Q_COMPILER_UNICODE_STRINGS
182
+#    endif
183
+#    if __has_feature(cxx_variadic_templates)
184
+#      define Q_COMPILER_VARIADIC_TEMPLATES
185
+#    endif
186
+    /* Features that have no __has_feature() check */
187
+#    if ((__clang_major__ * 100) + __clang_minor__) >= 209 /* since clang 2.9 */
188
+#      define Q_COMPILER_EXTERN_TEMPLATES
189
+#    endif
190
+#  endif
191
+#endif
192
+
193
+#if defined(Q_CC_GNU) && !defined(Q_CC_INTEL) && !defined(Q_CC_CLANG)
194
+#  if defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L
195
+#    if (__GNUC__ * 100 + __GNUC_MINOR__) >= 403
196
+       /* C++0x features supported in GCC 4.3: */
197
+#      define Q_COMPILER_RVALUE_REFS
198
+#      define Q_COMPILER_DECLTYPE
199
+#    endif
200
+#    if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404
201
+       /* C++0x features supported in GCC 4.4: */
202
+#      define Q_COMPILER_VARIADIC_TEMPLATES
203
+#      define Q_COMPILER_AUTO_FUNCTION
204
+#      define Q_COMPILER_AUTO_TYPE
205
+#      define Q_COMPILER_EXTERN_TEMPLATES
206
+#      define Q_COMPILER_DEFAULT_DELETE_MEMBERS
207
+#      define Q_COMPILER_CLASS_ENUM
208
+#      define Q_COMPILER_INITIALIZER_LISTS
209
+#    endif
210
+#    if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405
211
+       /* C++0x features supported in GCC 4.5: */
212
+#      define Q_COMPILER_LAMBDA
213
+#      define Q_COMPILER_UNICODE_STRINGS
214
+#    endif
215
+#    if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406
216
+       /* C++0x features supported in GCC 4.6: */
217
+#      define Q_COMPILER_CONSTEXPR
218
+#    endif
219
+#  endif
220
+#endif
221
+
222
+#if defined(Q_CC_MSVC) && !defined(Q_CC_INTEL)
223
+#  if defined(__cplusplus)
224
+#    if _MSC_VER >= 1600
225
+       /* C++11 features supported in VC10 = VC2010: */
226
+#      define Q_COMPILER_AUTO_FUNCTION
227
+#      define Q_COMPILER_AUTO_TYPE
228
+#      define Q_COMPILER_DECLTYPE
229
+#      define Q_COMPILER_LAMBDA
230
+#      define Q_COMPILER_RVALUE_REFS
231
+//  MSVC's library has std::initializer_list, but the compiler does not support the braces initialization
232
+//#      define Q_COMPILER_INITIALIZER_LISTS
233
+#    endif
234
+#  endif
235
+#endif
236
+
237
 #ifndef Q_PACKED
238
 #  define Q_PACKED
239
 #  undef Q_NO_PACKED_REFERENCE
(-)/usr/home/rakuco/dev/freebsd/area51/trunk/area51/QT/devel/qt4-assistant/Makefile (-1 lines)
Lines 3-9 Link Here
3
3
4
PORTNAME=	assistant
4
PORTNAME=	assistant
5
DISTVERSION=	${QT4_VERSION}
5
DISTVERSION=	${QT4_VERSION}
6
PORTREVISION=	1
7
CATEGORIES=	devel
6
CATEGORIES=	devel
8
PKGNAMEPREFIX=	qt4-
7
PKGNAMEPREFIX=	qt4-
9
8
(-)/usr/home/rakuco/dev/freebsd/area51/trunk/area51/QT/devel/qt4-corelib/Makefile (-1 lines)
Lines 3-9 Link Here
3
3
4
PORTNAME=	corelib
4
PORTNAME=	corelib
5
DISTVERSION=	${QT4_VERSION}
5
DISTVERSION=	${QT4_VERSION}
6
PORTREVISION=	5
7
CATEGORIES=	devel
6
CATEGORIES=	devel
8
PKGNAMEPREFIX=	qt4-
7
PKGNAMEPREFIX=	qt4-
9
8
(-)/usr/home/rakuco/dev/freebsd/area51/trunk/area51/QT/devel/qt4-designer/Makefile (-1 lines)
Lines 3-9 Link Here
3
3
4
PORTNAME=	designer
4
PORTNAME=	designer
5
DISTVERSION=	${QT4_VERSION}
5
DISTVERSION=	${QT4_VERSION}
6
PORTREVISION=	1
7
CATEGORIES=	devel
6
CATEGORIES=	devel
8
PKGNAMEPREFIX=	qt4-
7
PKGNAMEPREFIX=	qt4-
9
8
(-)/usr/home/rakuco/dev/freebsd/area51/trunk/area51/QT/devel/qt4-help/Makefile (-1 lines)
Lines 3-9 Link Here
3
3
4
PORTNAME=	help
4
PORTNAME=	help
5
DISTVERSION=	${QT4_VERSION}
5
DISTVERSION=	${QT4_VERSION}
6
PORTREVISION=	1
7
CATEGORIES=	devel
6
CATEGORIES=	devel
8
PKGNAMEPREFIX=	qt4-
7
PKGNAMEPREFIX=	qt4-
9
8
(-)/usr/home/rakuco/dev/freebsd/area51/trunk/area51/QT/devel/qt4-linguist/Makefile (-1 lines)
Lines 3-9 Link Here
3
3
4
PORTNAME=	linguist
4
PORTNAME=	linguist
5
DISTVERSION=	${QT4_VERSION}
5
DISTVERSION=	${QT4_VERSION}
6
PORTREVISION=	2
7
CATEGORIES=	devel
6
CATEGORIES=	devel
8
PKGNAMEPREFIX=	qt4-
7
PKGNAMEPREFIX=	qt4-
9
8
(-)/usr/home/rakuco/dev/freebsd/area51/trunk/area51/QT/devel/qt4-qmlviewer/Makefile (-1 lines)
Lines 3-9 Link Here
3
3
4
PORTNAME=	qmlviewer
4
PORTNAME=	qmlviewer
5
DISTVERSION=	${QT4_VERSION}
5
DISTVERSION=	${QT4_VERSION}
6
PORTREVISION=	1
7
CATEGORIES=	devel
6
CATEGORIES=	devel
8
PKGNAMEPREFIX=	qt4-
7
PKGNAMEPREFIX=	qt4-
9
8
(-)/usr/home/rakuco/dev/freebsd/area51/trunk/area51/QT/devel/qt4-qt3support/Makefile (-1 lines)
Lines 3-9 Link Here
3
3
4
PORTNAME=	qt3support
4
PORTNAME=	qt3support
5
DISTVERSION=	${QT4_VERSION}
5
DISTVERSION=	${QT4_VERSION}
6
PORTREVISION=	1
7
CATEGORIES=	devel x11-toolkits
6
CATEGORIES=	devel x11-toolkits
8
PKGNAMEPREFIX=	qt4-
7
PKGNAMEPREFIX=	qt4-
9
8
(-)/usr/home/rakuco/dev/freebsd/area51/trunk/area51/QT/devel/qt4-qvfb/Makefile (-1 lines)
Lines 3-9 Link Here
3
3
4
PORTNAME=	qvfb
4
PORTNAME=	qvfb
5
DISTVERSION=	${QT4_VERSION}
5
DISTVERSION=	${QT4_VERSION}
6
PORTREVISION=	1
7
CATEGORIES=	devel
6
CATEGORIES=	devel
8
PKGNAMEPREFIX=	qt4-
7
PKGNAMEPREFIX=	qt4-
9
8
(-)/usr/home/rakuco/dev/freebsd/area51/trunk/area51/QT/devel/qt4-script/Makefile (-1 lines)
Lines 3-9 Link Here
3
3
4
PORTNAME=	script
4
PORTNAME=	script
5
DISTVERSION=	${QT4_VERSION}
5
DISTVERSION=	${QT4_VERSION}
6
PORTREVISION=	1
7
CATEGORIES=	devel
6
CATEGORIES=	devel
8
PKGNAMEPREFIX=	qt4-
7
PKGNAMEPREFIX=	qt4-
9
8
(-)/usr/home/rakuco/dev/freebsd/area51/trunk/area51/QT/devel/qt4-script/files/patch-src__3rdparty__javascriptcore__JavaScriptCore__wtf__Threading.h (-34 lines)
Lines 1-34 Link Here
1
--- src/3rdparty/javascriptcore/JavaScriptCore/wtf/Threading.h.orig	2014-04-10 20:37:12.000000000 +0200
2
+++ src/3rdparty/javascriptcore/JavaScriptCore/wtf/Threading.h	2014-04-24 15:06:18.000000000 +0200
3
@@ -71,18 +71,10 @@
4
 
5
 #if OS(WINDOWS) && !OS(WINCE)
6
 #include <windows.h>
7
-#elif OS(DARWIN)
8
-#include <libkern/OSAtomic.h>
9
 #elif OS(ANDROID)
10
 #include <cutils/atomic.h>
11
 #elif OS(QNX)
12
 #include <atomic.h>
13
-#elif COMPILER(GCC) && !OS(SYMBIAN)
14
-#if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 2))
15
-#include <ext/atomicity.h>
16
-#else
17
-#include <bits/atomicity.h>
18
-#endif
19
 #endif
20
 
21
 #if USE(PTHREADS)
22
@@ -230,12 +222,6 @@
23
 inline int atomicDecrement(int volatile* addend) { return InterlockedDecrement(reinterpret_cast<long volatile*>(addend)); }
24
 #endif
25
 
26
-#elif OS(DARWIN)
27
-#define WTF_USE_LOCKFREE_THREADSAFESHARED 1
28
-
29
-inline int atomicIncrement(int volatile* addend) { return OSAtomicIncrement32Barrier(const_cast<int*>(addend)); }
30
-inline int atomicDecrement(int volatile* addend) { return OSAtomicDecrement32Barrier(const_cast<int*>(addend)); }
31
-
32
 #elif OS(ANDROID)
33
 
34
 inline int atomicIncrement(int volatile* addend) { return android_atomic_inc(addend); }
(-)/usr/home/rakuco/dev/freebsd/area51/trunk/area51/QT/devel/qt4-scripttools/Makefile (-1 lines)
Lines 2-8 Link Here
2
2
3
PORTNAME=	scripttools
3
PORTNAME=	scripttools
4
DISTVERSION=	${QT4_VERSION}
4
DISTVERSION=	${QT4_VERSION}
5
PORTREVISION=	1
6
CATEGORIES=	devel
5
CATEGORIES=	devel
7
PKGNAMEPREFIX=	qt4-
6
PKGNAMEPREFIX=	qt4-
8
7
(-)/usr/home/rakuco/dev/freebsd/area51/trunk/area51/QT/devel/qt4-testlib/Makefile (-1 lines)
Lines 3-9 Link Here
3
3
4
PORTNAME=	testlib
4
PORTNAME=	testlib
5
DISTVERSION=	${QT4_VERSION}
5
DISTVERSION=	${QT4_VERSION}
6
PORTREVISION=	1
7
CATEGORIES=	devel
6
CATEGORIES=	devel
8
PKGNAMEPREFIX=	qt4-
7
PKGNAMEPREFIX=	qt4-
9
8
(-)/usr/home/rakuco/dev/freebsd/area51/trunk/area51/QT/graphics/qt4-imageformats/Makefile (-1 lines)
Lines 3-9 Link Here
3
3
4
PORTNAME=	imageformats
4
PORTNAME=	imageformats
5
DISTVERSION=	${QT4_VERSION}
5
DISTVERSION=	${QT4_VERSION}
6
PORTREVISION=	3
7
CATEGORIES=	graphics
6
CATEGORIES=	graphics
8
PKGNAMEPREFIX=	qt4-
7
PKGNAMEPREFIX=	qt4-
9
8
(-)/usr/home/rakuco/dev/freebsd/area51/trunk/area51/QT/graphics/qt4-imageformats/files/patch-CVE-2014-0190 (-38 lines)
Lines 1-38 Link Here
1
commit f1b76c126c476c155af8c404b97c42cd1a709333
2
Author: Lars Knoll <lars.knoll@digia.com>
3
Date:   Thu Apr 24 15:33:27 2014 +0200
4
5
    Don't crash on broken GIF images
6
    
7
    Broken GIF images could set invalid width and height
8
    values inside the image, leading to Qt creating a null
9
    QImage for it. In that case we need to abort decoding
10
    the image and return an error.
11
    
12
    Initial patch by Rich Moore.
13
    
14
    Backport of Id82a4036f478bd6e49c402d6598f57e7e5bb5e1e from Qt 5
15
    
16
    Task-number: QTBUG-38367
17
    Change-Id: I0680740018aaa8356d267b7af3f01fac3697312a
18
    Security-advisory: CVE-2014-0190
19
    Reviewed-by: Richard J. Moore <rich@kde.org>
20
21
diff --git a/src/gui/image/qgifhandler.cpp b/src/gui/image/qgifhandler.cpp
22
index 3324f04..5199dd3 100644
23
--- src/gui/image/qgifhandler.cpp
24
+++ src/gui/image/qgifhandler.cpp
25
@@ -359,6 +359,13 @@ int QGIFFormat::decode(QImage *image, const uchar *buffer, int length,
26
                     memset(bits, 0, image->byteCount());
27
                 }
28
 
29
+                // Check if the previous attempt to create the image failed. If it
30
+                // did then the image is broken and we should give up.
31
+                if (image->isNull()) {
32
+                    state = Error;
33
+                    return -1;
34
+                }
35
+
36
                 disposePrevious(image);
37
                 disposed = false;
38
 
(-)/usr/home/rakuco/dev/freebsd/area51/trunk/area51/QT/graphics/qt4-imageformats/files/patch-CVE-2015-1858 (-24 lines)
Lines 1-24 Link Here
1
commit a1cf194c54be57d6ab55dfd26b9562a60532208e
2
Author: Eirik Aavitsland <eirik.aavitsland@theqtcompany.com>
3
Date:   Wed Mar 11 09:00:41 2015 +0100
4
5
    Fixes crash in gif image decoder
6
    
7
    Fuzzing test revealed that for certain malformed gif files,
8
    qgifhandler would segfault.
9
    
10
    Change-Id: I5bb6f60e1c61849e0d8c735edc3869945e5331c1
11
    (cherry picked from qtbase/ea2c5417fcd374302f5019e67f72af5facbd29f6)
12
    Reviewed-by: Richard J. Moore <rich@kde.org>
13
14
--- src/gui/image/qgifhandler.cpp
15
+++ src/gui/image/qgifhandler.cpp
16
@@ -944,6 +944,8 @@ void QGIFFormat::fillRect(QImage *image, int col, int row, int w, int h, QRgb co
17
 
18
 void QGIFFormat::nextY(unsigned char *bits, int bpl)
19
 {
20
+    if (out_of_bounds)
21
+        return;
22
     int my;
23
     switch (interlace) {
24
     case 0: // Non-interlaced
(-)/usr/home/rakuco/dev/freebsd/area51/trunk/area51/QT/graphics/qt4-imageformats/files/patch-CVE-2015-1859 (-53 lines)
Lines 1-53 Link Here
1
commit 3e55cd6dc467303a3c35312e9fcb255c2c048b32
2
Author: Eirik Aavitsland <eirik.aavitsland@theqtcompany.com>
3
Date:   Wed Mar 11 13:34:01 2015 +0100
4
5
    Fixes crash in bmp and ico image decoding
6
    
7
    Fuzzing test revealed that for certain malformed bmp and ico files,
8
    the handler would segfault.
9
    
10
    Change-Id: I19d45145f31e7f808f7f6a1a1610270ea4159cbe
11
    (cherry picked from qtbase/2adbbae5432aa9d8cc41c6fcf55c2e310d2d4078)
12
    Reviewed-by: Richard J. Moore <rich@kde.org>
13
14
--- src/gui/image/qbmphandler.cpp
15
+++ src/gui/image/qbmphandler.cpp
16
@@ -478,12 +478,6 @@ static bool read_dib_body(QDataStream &s, const BMP_INFOHDR &bi, int offset, int
17
                             p = data + (h-y-1)*bpl;
18
                             break;
19
                         case 2:                        // delta (jump)
20
-                            // Protection
21
-                            if ((uint)x >= (uint)w)
22
-                                x = w-1;
23
-                            if ((uint)y >= (uint)h)
24
-                                y = h-1;
25
-
26
                             {
27
                                 quint8 tmp;
28
                                 d->getChar((char *)&tmp);
29
@@ -491,6 +485,13 @@ static bool read_dib_body(QDataStream &s, const BMP_INFOHDR &bi, int offset, int
30
                                 d->getChar((char *)&tmp);
31
                                 y += tmp;
32
                             }
33
+
34
+                            // Protection
35
+                            if ((uint)x >= (uint)w)
36
+                                x = w-1;
37
+                            if ((uint)y >= (uint)h)
38
+                                y = h-1;
39
+
40
                             p = data + (h-y-1)*bpl + x;
41
                             break;
42
                         default:                // absolute mode
43
--- src/plugins/imageformats/ico/qicohandler.cpp
44
+++ src/plugins/imageformats/ico/qicohandler.cpp
45
@@ -571,7 +571,7 @@ QImage ICOReader::iconAt(int index)
46
                 QImage::Format format = QImage::Format_ARGB32;
47
                 if (icoAttrib.nbits == 24)
48
                     format = QImage::Format_RGB32;
49
-                else if (icoAttrib.ncolors == 2)
50
+                else if (icoAttrib.ncolors == 2 && icoAttrib.depth == 1)
51
                     format = QImage::Format_Mono;
52
                 else if (icoAttrib.ncolors > 0)
53
                     format = QImage::Format_Indexed8;
(-)/usr/home/rakuco/dev/freebsd/area51/trunk/area51/QT/graphics/qt4-opengl/Makefile (-1 lines)
Lines 3-9 Link Here
3
3
4
PORTNAME=	opengl
4
PORTNAME=	opengl
5
DISTVERSION=	${QT4_VERSION}
5
DISTVERSION=	${QT4_VERSION}
6
PORTREVISION=	2
7
CATEGORIES=	graphics
6
CATEGORIES=	graphics
8
PKGNAMEPREFIX=	qt4-
7
PKGNAMEPREFIX=	qt4-
9
8
(-)/usr/home/rakuco/dev/freebsd/area51/trunk/area51/QT/graphics/qt4-opengl/pkg-plist (+1 lines)
Lines 7-12 Link Here
7
%%QT_INCDIR%%/Qt/qglpixelbuffer.h
7
%%QT_INCDIR%%/Qt/qglpixelbuffer.h
8
%%QT_INCDIR%%/Qt/qglscreen_qws.h
8
%%QT_INCDIR%%/Qt/qglscreen_qws.h
9
%%QT_INCDIR%%/Qt/qglshaderprogram.h
9
%%QT_INCDIR%%/Qt/qglshaderprogram.h
10
%%QT_INCDIR%%/QtOpenGL/QGL
10
%%QT_INCDIR%%/QtOpenGL/QGLBuffer
11
%%QT_INCDIR%%/QtOpenGL/QGLBuffer
11
%%QT_INCDIR%%/QtOpenGL/QGLColormap
12
%%QT_INCDIR%%/QtOpenGL/QGLColormap
12
%%QT_INCDIR%%/QtOpenGL/QGLContext
13
%%QT_INCDIR%%/QtOpenGL/QGLContext
(-)/usr/home/rakuco/dev/freebsd/area51/trunk/area51/QT/graphics/qt4-svg/Makefile (-1 lines)
Lines 3-9 Link Here
3
3
4
PORTNAME=	svg
4
PORTNAME=	svg
5
DISTVERSION=	${QT4_VERSION}
5
DISTVERSION=	${QT4_VERSION}
6
PORTREVISION=	1
7
CATEGORIES=	graphics
6
CATEGORIES=	graphics
8
PKGNAMEPREFIX=	qt4-
7
PKGNAMEPREFIX=	qt4-
9
8
(-)/usr/home/rakuco/dev/freebsd/area51/trunk/area51/QT/misc/qt4-l10n/Makefile (-1 lines)
Lines 2-8 Link Here
2
2
3
PORTNAME=	l10n
3
PORTNAME=	l10n
4
DISTVERSION=	${QT4_VERSION}
4
DISTVERSION=	${QT4_VERSION}
5
PORTREVISION=	1
6
CATEGORIES=	misc
5
CATEGORIES=	misc
7
PKGNAMEPREFIX=	qt4-
6
PKGNAMEPREFIX=	qt4-
8
7
(-)/usr/home/rakuco/dev/freebsd/area51/trunk/area51/QT/misc/qt4-l10n/pkg-plist (+1 lines)
Lines 28-33 Link Here
28
%%QT_L10NDIR%%/linguist_de.qm
28
%%QT_L10NDIR%%/linguist_de.qm
29
%%QT_L10NDIR%%/linguist_eu.qm
29
%%QT_L10NDIR%%/linguist_eu.qm
30
%%QT_L10NDIR%%/linguist_fr.qm
30
%%QT_L10NDIR%%/linguist_fr.qm
31
%%QT_L10NDIR%%/linguist_he.qm
31
%%QT_L10NDIR%%/linguist_hu.qm
32
%%QT_L10NDIR%%/linguist_hu.qm
32
%%QT_L10NDIR%%/linguist_ja.qm
33
%%QT_L10NDIR%%/linguist_ja.qm
33
%%QT_L10NDIR%%/linguist_ko.qm
34
%%QT_L10NDIR%%/linguist_ko.qm
(-)/usr/home/rakuco/dev/freebsd/area51/trunk/area51/QT/misc/qt4-qtconfig/Makefile (-1 lines)
Lines 3-9 Link Here
3
3
4
PORTNAME=	qtconfig
4
PORTNAME=	qtconfig
5
DISTVERSION=	${QT4_VERSION}
5
DISTVERSION=	${QT4_VERSION}
6
PORTREVISION=	1
7
CATEGORIES=	misc
6
CATEGORIES=	misc
8
PKGNAMEPREFIX=	qt4-
7
PKGNAMEPREFIX=	qt4-
9
8
(-)/usr/home/rakuco/dev/freebsd/area51/trunk/area51/QT/misc/qt4-qtdemo/Makefile (-1 lines)
Lines 3-9 Link Here
3
3
4
PORTNAME=	qtdemo
4
PORTNAME=	qtdemo
5
DISTVERSION=	${QT4_VERSION}
5
DISTVERSION=	${QT4_VERSION}
6
PORTREVISION=	2
7
CATEGORIES=	misc
6
CATEGORIES=	misc
8
PKGNAMEPREFIX=	qt4-
7
PKGNAMEPREFIX=	qt4-
9
8
(-)/usr/home/rakuco/dev/freebsd/area51/trunk/area51/QT/multimedia/qt4-multimedia/Makefile (-1 lines)
Lines 2-8 Link Here
2
2
3
PORTNAME=	multimedia
3
PORTNAME=	multimedia
4
DISTVERSION=	${QT4_VERSION}
4
DISTVERSION=	${QT4_VERSION}
5
PORTREVISION=	1
6
CATEGORIES=	multimedia
5
CATEGORIES=	multimedia
7
PKGNAMEPREFIX=	qt4-
6
PKGNAMEPREFIX=	qt4-
8
7
(-)/usr/home/rakuco/dev/freebsd/area51/trunk/area51/QT/net/qt4-network/Makefile (-1 lines)
Lines 3-9 Link Here
3
3
4
PORTNAME=	network
4
PORTNAME=	network
5
DISTVERSION=	${QT4_VERSION}
5
DISTVERSION=	${QT4_VERSION}
6
PORTREVISION=	1
7
CATEGORIES=	net ipv6
6
CATEGORIES=	net ipv6
8
PKGNAMEPREFIX=	qt4-
7
PKGNAMEPREFIX=	qt4-
9
8
(-)/usr/home/rakuco/dev/freebsd/area51/trunk/area51/QT/textproc/clucene-qt4/Makefile (-1 lines)
Lines 3-9 Link Here
3
3
4
PORTNAME=	clucene
4
PORTNAME=	clucene
5
DISTVERSION=	${QT4_VERSION}
5
DISTVERSION=	${QT4_VERSION}
6
PORTREVISION=	1
7
CATEGORIES=	textproc
6
CATEGORIES=	textproc
8
PKGNAMEPREFIX=	qt4-
7
PKGNAMEPREFIX=	qt4-
9
8
(-)/usr/home/rakuco/dev/freebsd/area51/trunk/area51/QT/textproc/qt4-xml/Makefile (-1 lines)
Lines 3-9 Link Here
3
3
4
PORTNAME=	xml
4
PORTNAME=	xml
5
DISTVERSION=	${QT4_VERSION}
5
DISTVERSION=	${QT4_VERSION}
6
PORTREVISION=	1
7
CATEGORIES=	textproc
6
CATEGORIES=	textproc
8
PKGNAMEPREFIX=	qt4-
7
PKGNAMEPREFIX=	qt4-
9
8
(-)/usr/home/rakuco/dev/freebsd/area51/trunk/area51/QT/textproc/qt4-xmlpatterns/Makefile (-1 lines)
Lines 3-9 Link Here
3
3
4
PORTNAME=	xmlpatterns
4
PORTNAME=	xmlpatterns
5
DISTVERSION=	${QT4_VERSION}
5
DISTVERSION=	${QT4_VERSION}
6
PORTREVISION=	1
7
CATEGORIES=	textproc
6
CATEGORIES=	textproc
8
PKGNAMEPREFIX=	qt4-
7
PKGNAMEPREFIX=	qt4-
9
8
(-)/usr/home/rakuco/dev/freebsd/area51/trunk/area51/QT/www/webkit-qt4/Makefile (-1 lines)
Lines 3-9 Link Here
3
3
4
PORTNAME=	webkit
4
PORTNAME=	webkit
5
DISTVERSION=	${QT4_VERSION}
5
DISTVERSION=	${QT4_VERSION}
6
PORTREVISION=	2
7
CATEGORIES=	www
6
CATEGORIES=	www
8
PKGNAMEPREFIX=	qt4-
7
PKGNAMEPREFIX=	qt4-
9
8
(-)/usr/home/rakuco/dev/freebsd/area51/trunk/area51/QT/x11-toolkits/qt4-declarative/Makefile (-1 lines)
Lines 2-8 Link Here
2
2
3
PORTNAME=	declarative
3
PORTNAME=	declarative
4
DISTVERSION=	${QT4_VERSION}
4
DISTVERSION=	${QT4_VERSION}
5
PORTREVISION=	2
6
CATEGORIES=	x11-toolkits
5
CATEGORIES=	x11-toolkits
7
PKGNAMEPREFIX=	qt4-
6
PKGNAMEPREFIX=	qt4-
8
7
(-)/usr/home/rakuco/dev/freebsd/area51/trunk/area51/QT/x11-toolkits/qt4-gui/Makefile (-1 lines)
Lines 3-9 Link Here
3
3
4
PORTNAME=	gui
4
PORTNAME=	gui
5
DISTVERSION=	${QT4_VERSION}
5
DISTVERSION=	${QT4_VERSION}
6
PORTREVISION=	5
7
CATEGORIES=	x11-toolkits
6
CATEGORIES=	x11-toolkits
8
PKGNAMEPREFIX=	qt4-
7
PKGNAMEPREFIX=	qt4-
9
8
(-)/usr/home/rakuco/dev/freebsd/area51/trunk/area51/QT/x11-toolkits/qt4-gui/files/patch-CVE-2015-0295 (-34 lines)
Lines 1-34 Link Here
1
commit e50aa2252cdd5cb53eef7d8c4503c7edff634f68
2
Author: Richard J. Moore <rich@kde.org>
3
Date:   Tue Feb 24 19:02:35 2015 +0000
4
5
    Fix a division by zero when processing malformed BMP files.
6
    
7
    This fixes a division by 0 when processing a maliciously crafted BMP
8
    file. No impact beyond DoS.
9
    
10
    Backport of 661f6bfd032dacc62841037732816a583640e187
11
    
12
    Task-number: QTBUG-44547
13
    Change-Id: I43f06e752b11cb50669101460902a82b885ae618
14
    Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
15
16
--- src/gui/image/qbmphandler.cpp
17
+++ src/gui/image/qbmphandler.cpp
18
@@ -319,10 +319,16 @@ static bool read_dib_body(QDataStream &s, const BMP_INFOHDR &bi, int offset, int
19
         }
20
     } else if (comp == BMP_BITFIELDS && (nbits == 16 || nbits == 32)) {
21
         red_shift = calc_shift(red_mask);
22
+        if (((red_mask >> red_shift) + 1) == 0)
23
+            return false;
24
         red_scale = 256 / ((red_mask >> red_shift) + 1);
25
         green_shift = calc_shift(green_mask);
26
+        if (((green_mask >> green_shift) + 1) == 0)
27
+            return false;
28
         green_scale = 256 / ((green_mask >> green_shift) + 1);
29
         blue_shift = calc_shift(blue_mask);
30
+        if (((blue_mask >> blue_shift) + 1) == 0)
31
+            return false;
32
         blue_scale = 256 / ((blue_mask >> blue_shift) + 1);
33
     } else if (comp == BMP_RGB && (nbits == 24 || nbits == 32)) {
34
         blue_mask = 0x000000ff;
(-)/usr/home/rakuco/dev/freebsd/area51/trunk/area51/QT/x11-toolkits/qt4-gui/files/patch-CVE-2015-1859 (-53 lines)
Lines 1-53 Link Here
1
commit 3e55cd6dc467303a3c35312e9fcb255c2c048b32
2
Author: Eirik Aavitsland <eirik.aavitsland@theqtcompany.com>
3
Date:   Wed Mar 11 13:34:01 2015 +0100
4
5
    Fixes crash in bmp and ico image decoding
6
    
7
    Fuzzing test revealed that for certain malformed bmp and ico files,
8
    the handler would segfault.
9
    
10
    Change-Id: I19d45145f31e7f808f7f6a1a1610270ea4159cbe
11
    (cherry picked from qtbase/2adbbae5432aa9d8cc41c6fcf55c2e310d2d4078)
12
    Reviewed-by: Richard J. Moore <rich@kde.org>
13
14
--- src/gui/image/qbmphandler.cpp
15
+++ src/gui/image/qbmphandler.cpp
16
@@ -478,12 +478,6 @@ static bool read_dib_body(QDataStream &s, const BMP_INFOHDR &bi, int offset, int
17
                             p = data + (h-y-1)*bpl;
18
                             break;
19
                         case 2:                        // delta (jump)
20
-                            // Protection
21
-                            if ((uint)x >= (uint)w)
22
-                                x = w-1;
23
-                            if ((uint)y >= (uint)h)
24
-                                y = h-1;
25
-
26
                             {
27
                                 quint8 tmp;
28
                                 d->getChar((char *)&tmp);
29
@@ -491,6 +485,13 @@ static bool read_dib_body(QDataStream &s, const BMP_INFOHDR &bi, int offset, int
30
                                 d->getChar((char *)&tmp);
31
                                 y += tmp;
32
                             }
33
+
34
+                            // Protection
35
+                            if ((uint)x >= (uint)w)
36
+                                x = w-1;
37
+                            if ((uint)y >= (uint)h)
38
+                                y = h-1;
39
+
40
                             p = data + (h-y-1)*bpl + x;
41
                             break;
42
                         default:                // absolute mode
43
--- src/plugins/imageformats/ico/qicohandler.cpp
44
+++ src/plugins/imageformats/ico/qicohandler.cpp
45
@@ -571,7 +571,7 @@ QImage ICOReader::iconAt(int index)
46
                 QImage::Format format = QImage::Format_ARGB32;
47
                 if (icoAttrib.nbits == 24)
48
                     format = QImage::Format_RGB32;
49
-                else if (icoAttrib.ncolors == 2)
50
+                else if (icoAttrib.ncolors == 2 && icoAttrib.depth == 1)
51
                     format = QImage::Format_Mono;
52
                 else if (icoAttrib.ncolors > 0)
53
                     format = QImage::Format_Indexed8;
(-)/usr/home/rakuco/dev/freebsd/area51/trunk/area51/QT/x11/qt4-graphicssystems-opengl/Makefile (-1 lines)
Lines 2-8 Link Here
2
2
3
PORTNAME=	graphicssystems
3
PORTNAME=	graphicssystems
4
DISTVERSION=	${QT4_VERSION}
4
DISTVERSION=	${QT4_VERSION}
5
PORTREVISION=	1
6
CATEGORIES=	x11
5
CATEGORIES=	x11
7
PKGNAMEPREFIX=	qt4-
6
PKGNAMEPREFIX=	qt4-
8
PKGNAMESUFFIX=	-opengl
7
PKGNAMESUFFIX=	-opengl
(-)cad/qcad/Makefile (-4 / +4 lines)
Lines 52-63 Link Here
52
	${REINPLACE_CMD} -e "s|%%DATADIR%%|${DATADIR}|"	\
52
	${REINPLACE_CMD} -e "s|%%DATADIR%%|${DATADIR}|"	\
53
		${WRKSRC}/src/core/RSettings.cpp
53
		${WRKSRC}/src/core/RSettings.cpp
54
54
55
# Temporary hack for Qt 4.8.6 support while upstream does not add proper
55
# Temporary hack for Qt 4.8.7 support while upstream does not add proper
56
# bindings.
56
# bindings.
57
	(cd ${WRKSRC}/src/3rdparty/qt-labs-qtscriptgenerator-4.8.5 && \
57
	(cd ${WRKSRC}/src/3rdparty/qt-labs-qtscriptgenerator-4.8.5 && \
58
		${COPYTREE_SHARE} . ../qt-labs-qtscriptgenerator-4.8.6)
58
		${COPYTREE_SHARE} . ../qt-labs-qtscriptgenerator-4.8.7)
59
	(cd ${WRKSRC}/src/3rdparty/qt-labs-qtscriptgenerator-4.8.6 && \
59
	(cd ${WRKSRC}/src/3rdparty/qt-labs-qtscriptgenerator-4.8.7 && \
60
		mv qt-labs-qtscriptgenerator-4.8.5.pro qt-labs-qtscriptgenerator-4.8.6.pro)
60
		mv qt-labs-qtscriptgenerator-4.8.5.pro qt-labs-qtscriptgenerator-4.8.7.pro)
61
61
62
do-install:
62
do-install:
63
	${INSTALL_PROGRAM} ${RESDIR}/qcad-bin ${STAGEDIR}${PREFIX}/bin/
63
	${INSTALL_PROGRAM} ${RESDIR}/qcad-bin ${STAGEDIR}${PREFIX}/bin/
(-)x11/kdelibs4/Makefile (+1 lines)
Lines 3-8 Link Here
3
3
4
PORTNAME=	kdelibs
4
PORTNAME=	kdelibs
5
PORTVERSION=	${KDE4_VERSION}
5
PORTVERSION=	${KDE4_VERSION}
6
PORTREVISION=	1
6
CATEGORIES=	x11 kde
7
CATEGORIES=	x11 kde
7
MASTER_SITES=	KDE/${KDE4_BRANCH}/${PORTVERSION}/src
8
MASTER_SITES=	KDE/${KDE4_BRANCH}/${PORTVERSION}/src
8
DIST_SUBDIR=	KDE/${PORTVERSION}
9
DIST_SUBDIR=	KDE/${PORTVERSION}
(-)x11/kdelibs4/files/patch-cmake_modules_FindQt4.cmake (-3 / +49 lines)
Lines 1-6 Link Here
1
--- ./cmake/modules/FindQt4.cmake.orig	2011-07-28 05:34:31.000000000 +1100
1
Hunks 1 and 3:
2
+++ ./cmake/modules/FindQt4.cmake	2012-05-18 00:28:12.000000000 +1100
2
  Backport upstream CMake change de30173d ("Remove C compiler requirement from
3
@@ -627,23 +627,12 @@
3
  FindQt4.cmake") so that it uses a C++ compiler to look for Q_WS_X11,
4
  otherwise the build fails because <ciso646> from qglobal.h is not present
5
  when using a C compiler.
6
7
Hunk 2:
8
  Do the same thing we do in devel/cmake's FindQt4.cmake patch. The idea behind
9
  the change is that the directories FindQt4.cmake looks for might not be
10
  present at the time CMake looks for them since the ports that actually create
11
  them may not be required by the port calling CMake.
12
--- cmake/modules/FindQt4.cmake.orig	2014-11-06 22:33:50 UTC
13
+++ cmake/modules/FindQt4.cmake
14
@@ -405,7 +405,7 @@ QT_CHECK_FLAG_EXISTS(-DQT_NO_DEBUG CMAKE
15
 QT_CHECK_FLAG_EXISTS(-DQT_NO_DEBUG CMAKE_CXX_FLAGS_MINSIZEREL "release minsize")
16
 
17
 INCLUDE(MacroPushRequiredVars)
18
-INCLUDE(CheckSymbolExists)
19
+INCLUDE(CheckCXXSymbolExists)
20
 INCLUDE(MacroAddFileDependencies)
21
 
22
 SET(QT_USE_FILE ${CMAKE_ROOT}/Modules/UseQt4.cmake)
23
@@ -638,23 +638,12 @@ IF (QT4_QMAKE_FOUND)
4
   # ask qmake for the imports directory
24
   # ask qmake for the imports directory
5
   IF (QT_LIBRARY_DIR AND NOT QT_IMPORTS_DIR OR QT_QMAKE_CHANGED)
25
   IF (QT_LIBRARY_DIR AND NOT QT_IMPORTS_DIR OR QT_QMAKE_CHANGED)
6
     _qt4_query_qmake(QT_INSTALL_IMPORTS qt_imports_dir)
26
     _qt4_query_qmake(QT_INSTALL_IMPORTS qt_imports_dir)
Lines 26-28 Link Here
26
 
46
 
27
 
47
 
28
   #############################################
48
   #############################################
49
@@ -671,19 +660,19 @@ IF (QT4_QMAKE_FOUND)
50
     SET(CMAKE_REQUIRED_FLAGS "-F${QT_LIBRARY_DIR} ")
51
   ENDIF( QT_USE_FRAMEWORKS )
52
   # Check for Window system symbols (note: only one should end up being set)
53
-  CHECK_SYMBOL_EXISTS(Q_WS_X11 "QtCore/qglobal.h" Q_WS_X11)
54
-  CHECK_SYMBOL_EXISTS(Q_WS_WIN "QtCore/qglobal.h" Q_WS_WIN)
55
-  CHECK_SYMBOL_EXISTS(Q_WS_QWS "QtCore/qglobal.h" Q_WS_QWS)
56
-  CHECK_SYMBOL_EXISTS(Q_WS_MAC "QtCore/qglobal.h" Q_WS_MAC)
57
+  CHECK_CXX_SYMBOL_EXISTS(Q_WS_X11 "QtCore/qglobal.h" Q_WS_X11)
58
+  CHECK_CXX_SYMBOL_EXISTS(Q_WS_WIN "QtCore/qglobal.h" Q_WS_WIN)
59
+  CHECK_CXX_SYMBOL_EXISTS(Q_WS_QWS "QtCore/qglobal.h" Q_WS_QWS)
60
+  CHECK_CXX_SYMBOL_EXISTS(Q_WS_MAC "QtCore/qglobal.h" Q_WS_MAC)
61
   IF(Q_WS_MAC)
62
     IF(QT_QMAKE_CHANGED)
63
       UNSET(QT_MAC_USE_COCOA CACHE)
64
     ENDIF(QT_QMAKE_CHANGED)
65
-    CHECK_SYMBOL_EXISTS(QT_MAC_USE_COCOA "QtCore/qconfig.h" QT_MAC_USE_COCOA)
66
+    CHECK_CXX_SYMBOL_EXISTS(QT_MAC_USE_COCOA "QtCore/qconfig.h" QT_MAC_USE_COCOA)
67
   ENDIF(Q_WS_MAC)
68
 
69
   IF (QT_QTCOPY_REQUIRED)
70
-     CHECK_SYMBOL_EXISTS(QT_IS_QTCOPY "QtCore/qglobal.h" QT_KDE_QT_COPY)
71
+     CHECK_CXX_SYMBOL_EXISTS(QT_IS_QTCOPY "QtCore/qglobal.h" QT_KDE_QT_COPY)
72
      IF (NOT QT_IS_QTCOPY)
73
         MESSAGE(FATAL_ERROR "qt-copy is required, but hasn't been found")
74
      ENDIF (NOT QT_IS_QTCOPY)

Return to bug 202808