Browse Source

RPM Packaging: update qt3 for opensuse

pull/3/head
François Andriot 3 years ago
parent
commit
8492b0db14

+ 11
- 0
opensuse/core/qt3/patches/3.5.13.2/qt3-3.5.13.2-fix_not_a_string_literal.patch View File

@@ -0,0 +1,11 @@
1
+--- qmake/project.cpp.orig	2015-04-10 17:15:10.731091347 +0200
2
++++ qmake/project.cpp	2013-12-30 17:58:15.471703644 +0100
3
+@@ -685,7 +685,7 @@
4
+ //	    fprintf(stderr,"Current QT version number: " + ver + "\n");
5
+ 	    if (ver != "" && ver != test_version) {
6
+ 		ver = test_version;
7
+-		fprintf(stderr,"Changed QT version number to " + test_version + "!\n");
8
++		fprintf(stderr,"Changed QT version number to %s!\n", test_version.ascii());
9
+ 	    }
10
+ 	}
11
+     }

+ 840
- 0
opensuse/core/qt3/qt3-3.5.13.2.patch View File

@@ -0,0 +1,840 @@
1
+--- src/qt.pro
2
++++ src/qt.pro
3
+@@ -41,6 +41,8 @@
4
+ XML_CPP	        = xml
5
+ STYLES_CPP	= styles
6
+ EMBEDDED_CPP	= embedded
7
++QMAKE_CFLAGS += -fno-strict-aliasing
8
++QMAKE_CFLAGS_MT += -fno-strict-aliasing
9
+ 
10
+ win32 {
11
+ 	contains(QT_PRODUCT,qt-internal) {
12
+--- src/3rdparty/libmng/aclocal.m4
13
++++ src/3rdparty/libmng/aclocal.m4
14
+@@ -1607,7 +1607,7 @@
15
+     # If the export-symbols file already is a .def file (1st line
16
+     # is EXPORTS), use it as is.
17
+     # If DATA tags from a recent dlltool are present, honour them!
18
+-    archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
19
++    archive_expsym_cmds='if test "x`head -n 1 $export_symbols`" = xEXPORTS; then
20
+ 	cp $export_symbols $output_objdir/$soname-def;
21
+       else
22
+ 	echo EXPORTS > $output_objdir/$soname-def;
23
+@@ -3546,7 +3546,7 @@
24
+   lt_cv_file_magic_cmd='/usr/bin/file -L'
25
+   case "$host_os" in
26
+   rhapsody* | darwin1.[[012]])
27
+-    lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
28
++    lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -n 1`
29
+     ;;
30
+   *) # Darwin 1.3 on
31
+     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
32
+--- src/3rdparty/libmng/config.guess
33
++++ src/3rdparty/libmng/config.guess
34
+@@ -319,7 +319,7 @@
35
+ 	echo m68k-sun-sunos${UNAME_RELEASE}
36
+ 	exit 0 ;;
37
+     sun*:*:4.2BSD:*)
38
+-	UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
39
++	UNAME_RELEASE=`(head -n 1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
40
+ 	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
41
+ 	case "`/bin/arch`" in
42
+ 	    sun3)
43
+@@ -506,7 +506,7 @@
44
+ 	fi
45
+ 	exit 0 ;;
46
+     *:AIX:*:[45])
47
+-	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'`
48
++	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -n 1 | awk '{ print $1 }'`
49
+ 	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
50
+ 		IBM_ARCH=rs6000
51
+ 	else
52
+--- src/3rdparty/libmng/configure
53
++++ src/3rdparty/libmng/configure
54
+@@ -1956,7 +1956,7 @@
55
+   lt_cv_file_magic_cmd='/usr/bin/file -L'
56
+   case "$host_os" in
57
+   rhapsody* | darwin1.[012])
58
+-    lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
59
++    lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -n 1`
60
+     ;;
61
+   *) # Darwin 1.3 on
62
+     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
63
+@@ -3433,7 +3433,7 @@
64
+     # If the export-symbols file already is a .def file (1st line
65
+     # is EXPORTS), use it as is.
66
+     # If DATA tags from a recent dlltool are present, honour them!
67
+-    archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
68
++    archive_expsym_cmds='if test "x`head -n 1 $export_symbols`" = xEXPORTS; then
69
+ 	cp $export_symbols $output_objdir/$soname-def;
70
+       else
71
+ 	echo EXPORTS > $output_objdir/$soname-def;
72
+--- qmake/generators/unix/unixmake.cpp
73
++++ qmake/generators/unix/unixmake.cpp
74
+@@ -839,7 +839,7 @@
75
+ 	    ret += "\n\t";
76
+ 	ret += QString(resource ? "-$(INSTALL_DIR)" : "-$(INSTALL_FILE)") + " \"" +
77
+ 	       src_targ + "\" \"" + dst_targ + "\"";
78
+-	if(!project->isActiveConfig("debug") && !project->isEmpty("QMAKE_STRIP") &&
79
++	if(false && !project->isActiveConfig("debug") && !project->isEmpty("QMAKE_STRIP") &&
80
+ 	   (project->first("TEMPLATE") != "lib" || !project->isActiveConfig("staticlib"))) {
81
+ 	    ret += "\n\t-" + var("QMAKE_STRIP");
82
+ 	    if(project->first("TEMPLATE") == "lib" && !project->isEmpty("QMAKE_STRIPFLAGS_LIB"))
83
+--- plugins/src/sqldrivers/sqlite/sqlite.pro
84
++++ plugins/src/sqldrivers/sqlite/sqlite.pro
85
+@@ -10,6 +10,9 @@
86
+ 
87
+ unix {
88
+ 	OBJECTS_DIR = .obj
89
++	!contains( LIBS, .*sqlite.* ) {
90
++		LIBS    *= -lsqlite
91
++	}
92
+ }
93
+ 
94
+ win32 {
95
+@@ -23,54 +26,6 @@
96
+ #	}
97
+ }
98
+ 
99
+-!contains( LIBS, .*sqlite.* ) {
100
+-    INCLUDEPATH += ../../../../src/3rdparty/sqlite
101
+-
102
+-    HEADERS += ../../../../src/3rdparty/sqlite/btree.h \
103
+-               ../../../../src/3rdparty/sqlite/config.h \
104
+-               ../../../../src/3rdparty/sqlite/hash.h \
105
+-               ../../../../src/3rdparty/sqlite/opcodes.h \
106
+-               ../../../../src/3rdparty/sqlite/os.h \
107
+-               ../../../../src/3rdparty/sqlite/pager.h \
108
+-               ../../../../src/3rdparty/sqlite/parse.h \
109
+-               ../../../../src/3rdparty/sqlite/sqlite.h \
110
+-               ../../../../src/3rdparty/sqlite/sqliteInt.h \
111
+-               ../../../../src/3rdparty/sqlite/vdbe.h \
112
+-	       ../../../../src/3rdparty/sqlite/vdbeInt.h
113
+-
114
+-    SOURCES += ../../../../src/3rdparty/sqlite/attach.c \
115
+-               ../../../../src/3rdparty/sqlite/auth.c \
116
+-               ../../../../src/3rdparty/sqlite/btree.c \
117
+-               ../../../../src/3rdparty/sqlite/btree_rb.c \
118
+-               ../../../../src/3rdparty/sqlite/build.c \
119
+-               ../../../../src/3rdparty/sqlite/copy.c \
120
+-	       ../../../../src/3rdparty/sqlite/date.c \
121
+-               ../../../../src/3rdparty/sqlite/delete.c \
122
+-               ../../../../src/3rdparty/sqlite/expr.c \
123
+-               ../../../../src/3rdparty/sqlite/func.c \
124
+-               ../../../../src/3rdparty/sqlite/hash.c \
125
+-               ../../../../src/3rdparty/sqlite/insert.c \
126
+-               ../../../../src/3rdparty/sqlite/main.c \
127
+-               ../../../../src/3rdparty/sqlite/opcodes.c \
128
+-               ../../../../src/3rdparty/sqlite/os.c \
129
+-               ../../../../src/3rdparty/sqlite/pager.c \
130
+-               ../../../../src/3rdparty/sqlite/parse.c \
131
+-               ../../../../src/3rdparty/sqlite/pragma.c \
132
+-               ../../../../src/3rdparty/sqlite/printf.c \
133
+-               ../../../../src/3rdparty/sqlite/random.c \
134
+-               ../../../../src/3rdparty/sqlite/select.c \
135
+-               ../../../../src/3rdparty/sqlite/shell.c \
136
+-               ../../../../src/3rdparty/sqlite/table.c \
137
+-               ../../../../src/3rdparty/sqlite/tokenize.c \
138
+-               ../../../../src/3rdparty/sqlite/trigger.c \
139
+-               ../../../../src/3rdparty/sqlite/update.c \
140
+-               ../../../../src/3rdparty/sqlite/util.c \
141
+-               ../../../../src/3rdparty/sqlite/vacuum.c \
142
+-               ../../../../src/3rdparty/sqlite/vdbe.c \
143
+-	       ../../../../src/3rdparty/sqlite/vdbeaux.c \
144
+-               ../../../../src/3rdparty/sqlite/where.c
145
+-}
146
+-
147
+ REQUIRES	= sql
148
+ 
149
+ target.path += $$plugins.path/sqldrivers
150
+--- src/tools/qcstring.cpp
151
++++ src/tools/qcstring.cpp
152
+@@ -53,7 +53,7 @@
153
+ #include <ctype.h>
154
+ #include <limits.h>
155
+ #ifndef QT_NO_COMPRESS
156
+-#include "../3rdparty/zlib/zlib.h"
157
++#include <zlib.h>
158
+ #endif
159
+ 
160
+ /*****************************************************************************
161
+--- src/tools/qsettings.cpp
162
++++ src/tools/qsettings.cpp
163
+@@ -39,6 +39,7 @@
164
+ **********************************************************************/
165
+ 
166
+ #include "qplatformdefs.h"
167
++#include <stdlib.h>
168
+ 
169
+ // POSIX Large File Support redefines open -> open64
170
+ static inline int qt_open( const char *pathname, int flags, mode_t mode )
171
+@@ -468,8 +469,18 @@
172
+     Q_UNUSED( format );
173
+ #endif
174
+ 
175
+-    QString appSettings(QDir::homeDirPath() + "/.qt/");
176
+-    QString defPath;
177
++    QString home;
178
++    home = getenv("QT_HOME_DIR");
179
++    if ( !home.isEmpty() ){
180
++       home += "/";
181
++       QFileInfo i( home + "qtrc" );
182
++       if ( !i.isReadable() )
183
++         home = QDir::homeDirPath() + "/.qt/";
184
++    }else
185
++       home = QDir::homeDirPath() + "/.qt/";
186
++    QString appSettings(home);
187
++
188
++    QString defPath("/etc/X11/");
189
+ #ifdef Q_WS_WIN
190
+ #ifdef Q_OS_TEMP
191
+ 	TCHAR path[MAX_PATH];
192
+@@ -517,6 +528,15 @@
193
+ 
194
+     if ( !!defPath )
195
+ 	searchPaths.append(defPath);
196
++
197
++    QString system;
198
++    system = getenv("QT_SYSTEM_DIR");
199
++    if ( !system.isEmpty() && system[0] == '/') {
200
++       QFileInfo i( system + "/qtrc" );
201
++       if ( i.isReadable() )
202
++           searchPaths.append(system);
203
++    }
204
++
205
+     searchPaths.append(dir.path());
206
+ }
207
+ 
208
+--- src/tools/qgpluginmanager.cpp
209
++++ src/tools/qgpluginmanager.cpp
210
+@@ -389,6 +389,8 @@
211
+ 		sameBasename << (*git).mid( (*git).find( QChar(0xfffd) ) + 1 );
212
+ 		++git;
213
+ 	    }
214
++	    if( !sameBasename.isEmpty())
215
++		sameBasename.prepend( lib );
216
+ 
217
+ 	    if ( sameBasename.isEmpty() ) {
218
+ 		that->addLibrary( new QComLibrary( lib ) );
219
+--- mkspecs/linux-g++-64/qmake.conf
220
++++ mkspecs/linux-g++-64/qmake.conf
221
+@@ -58,7 +58,7 @@
222
+ QMAKE_LFLAGS_PLUGIN	= $$QMAKE_LFLAGS_SHLIB
223
+ QMAKE_LFLAGS_SONAME	= -Wl,-soname,
224
+ QMAKE_LFLAGS_THREAD	=
225
+-QMAKE_RPATH		= -Wl,-rpath,
226
++QMAKE_RPATH		= 
227
+ 
228
+ QMAKE_LIBS		=
229
+ QMAKE_LIBS_DYNLOAD	= -ldl
230
+--- mkspecs/linux-g++/qmake.conf
231
++++ mkspecs/linux-g++/qmake.conf
232
+@@ -55,7 +55,6 @@
233
+ QMAKE_LFLAGS_PLUGIN	= $$QMAKE_LFLAGS_SHLIB
234
+ QMAKE_LFLAGS_SONAME	= -Wl,-soname,
235
+ QMAKE_LFLAGS_THREAD	=
236
+-QMAKE_RPATH		= -Wl,-rpath,
237
+ 
238
+ QMAKE_LIBS		=
239
+ QMAKE_LIBS_DYNLOAD	= -ldl
240
+--- src/kernel/qpixmap_x11.cpp
241
++++ src/kernel/qpixmap_x11.cpp
242
+@@ -394,8 +394,9 @@
243
+ {
244
+ #if defined(QT_CHECK_STATE)
245
+     if ( qApp->type() == QApplication::Tty ) {
246
+-	qWarning( "QPixmap: Cannot create a QPixmap when no GUI "
247
+-		  "is being used" );
248
++//	qWarning( "QPixmap: Cannot create a QPixmap when no GUI "
249
++//		  "is being used" );
250
++       ;
251
+     }
252
+ #endif
253
+ 
254
+--- src/tools/qcomlibrary.cpp
255
++++ src/tools/qcomlibrary.cpp
256
+@@ -105,25 +105,11 @@
257
+ 		      (const char*) QFile::encodeName(library) );
258
+     } else if ( ( version > QT_VERSION ) ||
259
+ 		( ( QT_VERSION & 0xff0000 ) > ( version & 0xff0000 ) ) ) {
260
+-	if ( warn )
261
+-	    qWarning( "Conflict in %s:\n"
262
+-		      "  Plugin uses incompatible Qt library (%d.%d.%d)!",
263
+-		      (const char*) QFile::encodeName(library),
264
+-		      (version&0xff0000) >> 16, (version&0xff00) >> 8, version&0xff );
265
++	return FALSE;
266
+     } else if ( (flags & 2) != (our_flags & 2) ) {
267
+-	if ( warn )
268
+-	    qWarning( "Conflict in %s:\n"
269
+-		      "  Plugin uses %s Qt library!",
270
+-		      (const char*) QFile::encodeName(library),
271
+-		      (flags & 2) ? "multi threaded" : "single threaded" );
272
++	return FALSE;
273
+     } else if ( key != QT_BUILD_KEY ) {
274
+-	if ( warn )
275
+-	    qWarning( "Conflict in %s:\n"
276
+-		      "  Plugin uses incompatible Qt library!\n"
277
+-		      "  expected build key \"%s\", got \"%s\".",
278
+-		      (const char*) QFile::encodeName(library),
279
+-		      QT_BUILD_KEY,
280
+-		      key.isEmpty() ? "<null>" : (const char *) key );
281
++	return FALSE;
282
+     } else {
283
+ 	return TRUE;
284
+     }
285
+--- plugins/src/accessible/widgets/widgets.pro
286
++++ plugins/src/accessible/widgets/widgets.pro
287
+@@ -13,3 +13,7 @@
288
+ 
289
+ HEADERS  += qaccessiblewidget.h \
290
+ 	    qaccessiblemenu.h
291
++
292
++target.path += $$plugins.path/accessible
293
++INSTALLS += target
294
++
295
+Index: kernel/qasyncimageio.cpp
296
+================================================================================
297
+--- src/kernel/qasyncimageio.cpp
298
++++ src/kernel/qasyncimageio.cpp
299
+@@ -904,7 +904,12 @@
300
+ 		    sheight = newtop + newheight;
301
+ 
302
+ 		if (img.isNull()) {
303
+-		    img.create(swidth, sheight, 32);
304
++		    bool ok = img.create(swidth, sheight, 32);
305
++		    if (!ok)
306
++		    {
307
++			state = Error;
308
++			break;
309
++		    }
310
+ 		    memset( img.bits(), 0, img.numBytes() );
311
+ 		    if (consumer) consumer->setSize(swidth, sheight);
312
+ 		}
313
+@@ -959,9 +964,15 @@
314
+ 		    if (backingstore.width() < w
315
+ 			|| backingstore.height() < h) {
316
+ 			// We just use the backing store as a byte array
317
+-			backingstore.create( QMAX(backingstore.width(), w),
318
++			bool ok = backingstore.create(
319
++			                     QMAX(backingstore.width(), w),
320
+ 					     QMAX(backingstore.height(), h),
321
+ 					     32);
322
++			if (!ok)
323
++			{
324
++			    state = Error;
325
++			    break;
326
++			}
327
+ 			memset( img.bits(), 0, img.numBytes() );
328
+ 		    }
329
+ 		    for (int ln=0; ln<h; ln++) {
330
+--- src/kernel/qimage.cpp
331
++++ src/kernel/qimage.cpp
332
+@@ -68,6 +68,8 @@
333
+ #define QT_NO_IMAGE_16_BIT
334
+ #endif
335
+ 
336
++int qt_max_image_height = 0;
337
++int qt_max_image_width = 0;
338
+ 
339
+ /*!
340
+     \class QImage
341
+@@ -1211,6 +1213,28 @@
342
+     data->alpha = enable;
343
+ }
344
+ 
345
++QSize QImage::maxImageSize()
346
++{
347
++    if (!qt_max_image_height || !qt_max_image_width)
348
++       return QSize();
349
++    return QSize(qt_max_image_height, qt_max_image_width);
350
++}
351
++
352
++void QImage::setMaxImageSize(const QSize &size)
353
++{
354
++    if (size.isValid())
355
++    {
356
++        qt_max_image_height = size.height();
357
++        qt_max_image_width = size.width();
358
++    }
359
++    else
360
++    {
361
++        qt_max_image_height = 0;
362
++        qt_max_image_width = 0;
363
++    }
364
++}
365
++
366
++
367
+ 
368
+ /*!
369
+     Sets the image \a width, \a height, \a depth, its number of colors
370
+@@ -1240,6 +1264,14 @@
371
+     reset();					// reset old data
372
+     if ( width <= 0 || height <= 0 || depth <= 0 || numColors < 0 )
373
+ 	return FALSE;				// invalid parameter(s)
374
++    if ( qt_max_image_height && (height > qt_max_image_height * 4))
375
++        return FALSE; // Too high
376
++    if ( qt_max_image_width && (width > qt_max_image_width * 4))
377
++        return FALSE; // Too wide
378
++    if ( qt_max_image_height && qt_max_image_width &&
379
++         (height * width > qt_max_image_height * qt_max_image_width))
380
++        return FALSE; // Too large
381
++    
382
+     if ( depth == 1 && bitOrder == IgnoreEndian ) {
383
+ #if defined(QT_CHECK_RANGE)
384
+ 	qWarning( "QImage::create: Bit order is required for 1 bpp images" );
385
+--- src/kernel/qimage.h
386
++++ src/kernel/qimage.h
387
+@@ -197,6 +197,10 @@
388
+ 		      int quality=-1 ) const;
389
+     bool	save( QIODevice * device, const char* format,
390
+ 		      int quality=-1 ) const;
391
++		      
392
++#define QT_HAVE_MAX_IMAGE_SIZE
393
++    static QSize maxImageSize();
394
++    static void setMaxImageSize(const QSize &size);
395
+ #endif //QT_NO_IMAGEIO
396
+ 
397
+     bool	valid( int x, int y ) const;
398
+qt-bugs@ issue : 
399
+bugs.kde.org number :
400
+applied: yes
401
+author: Waldo Bastian <bastian@kde.org>
402
+
403
+QTextEdit::zoomIn /QTextEdit::zoomOut does not work if the original
404
+font had its size specified in pixels instead of points.
405
+pointSize() returns 0 in such case.
406
+
407
+Index: widgets/qtextedit.cpp
408
+================================================================================
409
+--- src/widgets/qtextedit.cpp
410
++++ src/widgets/qtextedit.cpp
411
+@@ -5774,7 +5774,11 @@
412
+ void QTextEdit::zoomIn( int range )
413
+ {
414
+     QFont f( QScrollView::font() );
415
+-    f.setPointSize( QFontInfo(f).pointSize() + range );
416
++    QFontInfo fi(f);
417
++    if (fi.pointSize() <= 0)
418
++       f.setPixelSize( fi.pixelSize() + range );
419
++    else
420
++       f.setPointSize( fi.pointSize() + range );
421
+     setFont( f );
422
+ }
423
+ 
424
+@@ -5789,7 +5793,11 @@
425
+ void QTextEdit::zoomOut( int range )
426
+ {
427
+     QFont f( QScrollView::font() );
428
+-    f.setPointSize( QMAX( 1, QFontInfo(f).pointSize() - range ) );
429
++    QFontInfo fi(f);
430
++    if (fi.pointSize() <= 0)
431
++       f.setPixelSize( QMAX( 1, fi.pixelSize() - range ) );
432
++    else
433
++       f.setPointSize( QMAX( 1, fi.pointSize() - range ) );
434
+     setFont( f );
435
+ }
436
+ 
437
+--- src/kernel/qtranslator.cpp
438
++++ src/kernel/qtranslator.cpp
439
+@@ -1015,7 +1015,7 @@
440
+ 	char con[256];
441
+ 	for ( ;; ) {
442
+ 	    t >> len;
443
+-	    if ( len == 0 )
444
++	    if ( len == 0 || t.atEnd())
445
+ 		return QTranslatorMessage();
446
+ 	    t.readRawBytes( con, len );
447
+ 	    con[len] = '\0';
448
+Index: src/kernel/qgplugin.h
449
+================================================================================
450
+--- src/kernel/qgplugin.h
451
++++ src/kernel/qgplugin.h
452
+@@ -90,35 +90,19 @@
453
+ 	    return i->iface(); \
454
+ 	}
455
+ 
456
+-#    ifdef Q_WS_WIN
457
+-#	ifdef Q_CC_BOR
458
+-#	    define Q_EXPORT_PLUGIN(PLUGIN) \
459
+-	        Q_PLUGIN_VERIFICATION_DATA \
460
+-		Q_EXTERN_C __declspec(dllexport) \
461
+-                const char * __stdcall qt_ucm_query_verification_data() \
462
+-                { return qt_ucm_verification_data; } \
463
+-		Q_EXTERN_C __declspec(dllexport) QUnknownInterface* \
464
+-                __stdcall ucm_instantiate() \
465
+-		Q_PLUGIN_INSTANTIATE( PLUGIN )
466
+-#	else
467
+-#	    define Q_EXPORT_PLUGIN(PLUGIN) \
468
+-	        Q_PLUGIN_VERIFICATION_DATA \
469
+-		Q_EXTERN_C __declspec(dllexport) \
470
+-                const char *qt_ucm_query_verification_data() \
471
+-                { return qt_ucm_verification_data; } \
472
+-		Q_EXTERN_C __declspec(dllexport) QUnknownInterface* ucm_instantiate() \
473
+-		Q_PLUGIN_INSTANTIATE( PLUGIN )
474
+-#	endif
475
+-#    else
476
+-#	define Q_EXPORT_PLUGIN(PLUGIN) \
477
++#if defined(Q_WS_WIN) && defined(Q_CC_BOR)
478
++#   define Q_STDCALL __stdcall
479
++#else
480
++#   define Q_STDCALL
481
++#endif
482
++
483
++#define Q_EXPORT_PLUGIN(PLUGIN) \
484
+ 	    Q_PLUGIN_VERIFICATION_DATA \
485
+-	    Q_EXTERN_C \
486
+-            const char *qt_ucm_query_verification_data() \
487
++	    Q_EXTERN_C Q_EXPORT \
488
++            const char * Q_STDCALL qt_ucm_query_verification_data() \
489
+             { return qt_ucm_verification_data; } \
490
+-	    Q_EXTERN_C QUnknownInterface* ucm_instantiate() \
491
++	    Q_EXTERN_C Q_EXPORT QUnknownInterface* Q_STDCALL ucm_instantiate() \
492
+             Q_PLUGIN_INSTANTIATE( PLUGIN )
493
+-#    endif
494
+-
495
+ #endif
496
+ 
497
+ struct QUnknownInterface;
498
+--- src/tools/qglobal.h
499
++++ src/tools/qglobal.h
500
+@@ -882,6 +882,10 @@
501
+ #    define Q_TEMPLATE_EXTERN
502
+ #    undef  Q_DISABLE_COPY 	/* avoid unresolved externals */
503
+ #  endif
504
++#elif defined(Q_CC_GNU) && __GNUC__ - 0 >= 4
505
++#    define Q_EXPORT __attribute__((visibility("default")))
506
++#    undef QT_MAKEDLL		/* ignore these for other platforms */
507
++#    undef QT_DLL
508
+ #else
509
+ #  undef QT_MAKEDLL		/* ignore these for other platforms */
510
+ #  undef QT_DLL
511
+--- src/widgets/qpopupmenu.cpp
512
++++ src/widgets/qpopupmenu.cpp
513
+@@ -1391,6 +1391,7 @@
514
+     performDelayedChanges();
515
+     updateSize(TRUE);
516
+     QWidget::show();
517
++    updateSize();
518
+     popupActive = -1;
519
+     if(style().styleHint(QStyle::SH_PopupMenu_SubMenuPopupDelay, this))
520
+ 	d->mouseMoveBuffer = QRegion();
521
+--- tools/assistant/lib/qassistantclient.cpp
522
++++ tools/assistant/lib/qassistantclient.cpp
523
+@@ -135,7 +135,7 @@
524
+     : QObject( parent, name ), host ( "localhost" )
525
+ {
526
+     if ( path.isEmpty() )
527
+-	assistantCommand = "assistant";
528
++	assistantCommand = "/usr/lib/qt3/bin/assistant";
529
+     else {
530
+ 	QFileInfo fi( path );
531
+ 	if ( fi.isDir() )
532
+--- src/kernel/qeventloop_unix.cpp
533
++++ src/kernel/qeventloop_unix.cpp
534
+@@ -517,6 +531,17 @@
535
+     return (tm->tv_sec*1000) + (tm->tv_usec/1000);
536
+ }
537
+ 
538
++static QString fullName(QObject* obj)
539
++{
540
++    QString oname;
541
++    if (obj && obj->name())
542
++        oname = QString(obj->name()) + "(" + QString(obj->className()) + ")";
543
++
544
++    if (obj && obj->parent())
545
++        return fullName(obj->parent()) + "/" + oname;
546
++    return oname;
547
++}
548
++
549
+ int QEventLoop::activateTimers()
550
+ {
551
+     if ( !timerList || !timerList->count() )	// no timers
552
+@@ -552,9 +577,27 @@
553
+ 	t->timeout += t->interval;
554
+ 	if ( t->timeout < currentTime )
555
+ 	    t->timeout = currentTime + t->interval;
556
++        // prefer system clock ticks for low resolution timers
557
++        // to save cpu power
558
++        if (t->interval.tv_sec * 1000 + t->interval.tv_usec / 1000 >= 1000) {
559
++            timeval drift;
560
++            drift.tv_sec = 0;
561
++            drift.tv_usec = (t->interval.tv_usec / 8) + (t->interval.tv_sec % 8) * 1000 * 1000 / 8;
562
++            timeval synced = t->timeout + drift;
563
++            if (synced.tv_usec < 2 * drift.tv_usec)
564
++                synced.tv_usec = 0;
565
++            t->timeout = synced;
566
++        }
567
+ 	insertTimer( t );			// relink timer
568
+ 	if ( t->interval.tv_usec > 0 || t->interval.tv_sec > 0 )
569
+ 	    n_act++;
570
++
571
++        if (t->obj && getenv("QT_DEBUG_TIMER"))
572
++            qDebug("qtimer: %ld/%s %d ms for %p/%s %s",
573
++                    getpid(), qApp && qApp->name() ? qApp->name() : "", 
574
++                    t->interval.tv_sec * 1000 + t->interval.tv_usec / 1000,
575
++                    t->obj, fullName(t->obj).latin1(), t->obj->className());
576
++
577
+ 	QTimerEvent e( t->id );
578
+ 	QApplication::sendEvent( t->obj, &e );	// send event
579
+ 	if ( timerList->findRef( begin ) == -1 )
580
+Index: src/kernel/qimage.h
581
+===================================================================
582
+--- src/kernel/qimage.h	(revision 594273)
583
++++ src/kernel/qimage.h	(working copy)
584
+@@ -55,7 +55,7 @@ public:
585
+     QCString lang;
586
+ 
587
+     bool operator< (const QImageTextKeyLang& other) const
588
+-	{ return key < other.key || key==other.key && lang < other.lang; }
589
++	{ return key < other.key || (key==other.key && lang < other.lang); }
590
+     bool operator== (const QImageTextKeyLang& other) const
591
+ 	{ return key==other.key && lang==other.lang; }
592
+ };
593
+--- src/tools/qcstring.h		(revision 658213)
594
++++ src/tools/qcstring.h		(working copy)
595
+@@ -161,7 +161,11 @@ public:
596
+ 
597
+     QCString	copy()	const;
598
+ 
599
+-    QCString    &sprintf( const char *format, ... );
600
++    QCString    &sprintf( const char *format, ... )
601
++#if defined(Q_CC_GNU) && !defined(__INSURE__)
602
++    __attribute__ ((format (printf, 2, 3)))
603
++#endif
604
++        ;
605
+ 
606
+     int		find( char c, int index=0, bool cs=TRUE ) const;
607
+     int		find( const char *str, int index=0, bool cs=TRUE ) const;
608
+--- src/kernel/qmngio.cpp.sav	2007-02-23 14:01:19.000000000 +0100
609
++++ src/kernel/qmngio.cpp	2007-08-28 15:27:28.000000000 +0200
610
+@@ -414,8 +414,11 @@ int QMNGFormat::decode( QImage& img, QIm
611
+     }
612
+ 
613
+     losttime += losingtimer.elapsed();
614
+-    if ( ndata || !length )
615
+-	mng_display_resume(handle);
616
++    bool needmore = false;
617
++    if ( ndata ) {
618
++	mng_retcode r = mng_display_resume(handle);
619
++	needmore = ( r == MNG_NEEDMOREDATA );
620
++    }
621
+     losingtimer.start();
622
+ 
623
+     image = 0;
624
+@@ -425,6 +428,13 @@ int QMNGFormat::decode( QImage& img, QIm
625
+ 	// Move back unused tail
626
+ 	memcpy(buffer,buffer+ubuffer,nbuffer);
627
+     }
628
++    // "The function should return without processing all the data if it reaches the end of a frame in the input."
629
++    if( ndata && !needmore ) {
630
++	length -= ndata;
631
++	ndata = 0;
632
++	if( length == 0 ) // 0 means done, process at least one byte
633
++	    length = ndata = 1;
634
++    }
635
+     if ( ndata ) {
636
+ 	// Not all used.
637
+ 	enlargeBuffer(nbuffer+ndata);
638
+--- src/kernel/qtaddons_x11.cpp
639
++++ src/kernel/qtaddons_x11.cpp
640
+@@ -22,6 +22,10 @@
641
+  * PERFORMANCE OF THIS SOFTWARE.
642
+  */
643
+ 
644
++#ifndef QT_CLEAN_NAMESPACE
645
++#define QT_CLEAN_NAMESPACE
646
++#endif
647
++
648
+ #include "qt_x11_p.h"
649
+ 
650
+ #if !defined(QT_NO_XFTFREETYPE) && !defined(QT_XFT2)
651
+--- src/kernel/qt_x11_p.h
652
++++ src/kernel/qt_x11_p.h
653
+@@ -86,7 +86,7 @@
654
+ 
655
+ 
656
+ // the wacom tablet (currently just the IRIX version)
657
+-#if defined (QT_TABLET_SUPPORT)
658
++#if defined (QT_TABLET_SUPPORT) && defined (QT_CLEAN_NAMESPACE)
659
+ #  include <X11/extensions/XInput.h>
660
+ #if defined (Q_OS_IRIX)
661
+ #  include <wacom.h>  // wacom driver defines for IRIX (quite handy)
662
+--- src/kernel/qwidget_x11.cpp
663
++++ src/kernel/qwidget_x11.cpp
664
+@@ -38,6 +38,10 @@
665
+ **
666
+ **********************************************************************/
667
+ 
668
++#ifndef QT_CLEAN_NAMESPACE
669
++#define QT_CLEAN_NAMESPACE
670
++#endif
671
++
672
+ #include "qapplication.h"
673
+ #include "qapplication_p.h"
674
+ #include "qnamespace.h"
675
+--- src/kernel/qfontdatabase.cpp
676
++++ src/kernel/qfontdatabase.cpp
677
+@@ -2476,11 +2476,14 @@ void QFontDatabase::parseFontName(const
678
+ 	int i = name.find('[');
679
+ 	int li = name.findRev(']');
680
+ 
681
+-	if (i < li) {
682
++	if (i > 0 && i + 1 < li) {
683
+ 	    foundry = name.mid(i + 1, li - i - 1);
684
+ 	    if (name[i - 1] == ' ')
685
+ 		i--;
686
+ 	    family = name.left(i);
687
++	} else {
688
++	    foundry = QString::null;
689
++	    family = name;
690
+ 	}
691
+     } else {
692
+ 	foundry = QString::null;
693
+--- src/moc/moc.y	2008-01-15 20:09:13.000000000 +0100
694
++++ src/moc/moc.y	2009-02-07 19:35:47.703930527 +0100
695
+@@ -2833,7 +2833,7 @@
696
+ {
697
+     const char *hdr1 = "/****************************************************************************\n"
698
+ 		 "** %s meta object code from reading C++ file '%s'\n**\n";
699
+-    const char *hdr2 = "** Created: %s\n"
700
++    const char *hdr2 = "** Created:\n"
701
+     const char *hdr3 = "** WARNING! All changes made in this file will be lost!\n";
702
+     const char *hdr4 = "*****************************************************************************/\n\n";
703
+     int   i;
704
+@@ -2872,7 +2872,7 @@
705
+ 	if ( i >= 0 )
706
+ 	    fn = &g->fileName[i];
707
+ 	fprintf( out, hdr1, (const char*)qualifiedClassName(),(const char*)fn);
708
+-	fprintf( out, hdr2, (const char*)dstr );
709
++	fprintf( out, hdr2 );
710
+ 	fprintf( out, hdr3 );
711
+ 	fprintf( out, hdr4 );
712
+ 
713
+diff -ru src/moc/moc_yacc.cpp src/moc/moc_yacc.cpp
714
+--- src/moc/moc_yacc.cpp	2008-01-14 13:24:36.000000000 +0100
715
++++ src/moc/moc_yacc.cpp	2009-02-07 19:35:30.039680400 +0100
716
+@@ -2872,7 +2872,7 @@
717
+ {
718
+     const char *hdr1 = "/****************************************************************************\n"
719
+ 		 "** %s meta object code from reading C++ file '%s'\n**\n";
720
+-    const char *hdr2 = "** Created: %s\n"
721
++    const char *hdr2 = "** Created: \n"
722
+ 		 "**      by: The Qt MOC ($Id: qt/moc_yacc.cpp   3.3.8   edited Feb 2 14:59 $)\n**\n";
723
+     const char *hdr3 = "** WARNING! All changes made in this file will be lost!\n";
724
+     const char *hdr4 = "*****************************************************************************/\n\n";
725
+@@ -2912,7 +2912,7 @@
726
+ 	if ( i >= 0 )
727
+ 	    fn = &g->fileName[i];
728
+ 	fprintf( out, hdr1, (const char*)qualifiedClassName(),(const char*)fn);
729
+-	fprintf( out, hdr2, (const char*)dstr );
730
++	fprintf( out, hdr2 );
731
+ 	fprintf( out, hdr3 );
732
+ 	fprintf( out, hdr4 );
733
+ 
734
+diff -ru tools/designer/uic/embed.cpp tools/designer/uic/embed.cpp
735
+--- tools/designer/uic/embed.cpp	2008-01-15 20:09:14.000000000 +0100
736
++++ tools/designer/uic/embed.cpp	2009-02-07 19:36:25.950931409 +0100
737
+@@ -137,7 +137,7 @@
738
+     for ( it = images.begin(); it != images.end(); ++it )
739
+ 	out << "**      " << *it << "\n";
740
+     out << "**\n";
741
+-    out << "** Created: " << QDateTime::currentDateTime().toString() << "\n";
742
++    out << "** Created:\n";
743
+     out << "**\n";
744
+     out << "** WARNING! All changes made in this file will be lost!\n";
745
+     out << "****************************************************************************/\n";
746
+diff -ru tools/designer/uic/main.cpp tools/designer/uic/main.cpp
747
+--- tools/designer/uic/main.cpp	2008-01-15 20:09:14.000000000 +0100
748
++++ tools/designer/uic/main.cpp	2009-02-07 19:36:36.603680916 +0100
749
+@@ -320,7 +320,7 @@
750
+ 	out << "/****************************************************************************" << endl;
751
+ 	out << "** Form "<< (impl? "implementation" : "interface") << " generated from reading ui file '" << fileName << "'" << endl;
752
+ 	out << "**" << endl;
753
+-	out << "** Created: " << QDateTime::currentDateTime().toString() << endl;
754
++	out << "** Created:" << endl;
755
+ 	out << "**" << endl;
756
+ 	out << "** WARNING! All changes made in this file will be lost!" << endl;
757
+ 	out << "****************************************************************************/" << endl << endl;
758
+Index: src/tools/qvaluevector.h
759
+===================================================================
760
+--- src/tools/qvaluevector.h.orig	2008-01-15 20:09:13.000000000 +0100
761
++++ src/tools/qvaluevector.h	2011-03-31 20:15:15.904712567 +0200
762
+@@ -246,7 +246,7 @@ public:
763
+     typedef const value_type& const_reference;
764
+     typedef size_t size_type;
765
+ #ifndef QT_NO_STL
766
+-    typedef ptrdiff_t difference_type;
767
++    typedef std::ptrdiff_t difference_type;
768
+ #else
769
+     typedef int difference_type;
770
+ #endif
771
+Index: src/tools/qmap.h
772
+===================================================================
773
+--- src/tools/qmap.h.orig	2008-01-15 20:09:13.000000000 +0100
774
++++ src/tools/qmap.h	2011-03-31 20:24:35.802101605 +0200
775
+@@ -108,7 +108,7 @@ class QMapIterator
776
+ #endif
777
+     typedef T          value_type;
778
+ #ifndef QT_NO_STL
779
+-    typedef ptrdiff_t  difference_type;
780
++    typedef std::ptrdiff_t  difference_type;
781
+ #else
782
+     typedef int difference_type;
783
+ #endif
784
+@@ -224,7 +224,7 @@ class QMapConstIterator
785
+ #endif
786
+     typedef T          value_type;
787
+ #ifndef QT_NO_STL
788
+-    typedef ptrdiff_t  difference_type;
789
++    typedef std::ptrdiff_t  difference_type;
790
+ #else
791
+     typedef int difference_type;
792
+ #endif
793
+@@ -605,7 +605,7 @@ public:
794
+     typedef value_type& reference;
795
+     typedef const value_type& const_reference;
796
+ #ifndef QT_NO_STL
797
+-    typedef ptrdiff_t  difference_type;
798
++    typedef std::ptrdiff_t  difference_type;
799
+ #else
800
+     typedef int difference_type;
801
+ #endif
802
+commit 1ee1ffbae69dc78721af139f0794628571fd35ef
803
+Author: Slávek Banko <slavek.banko@axis.cz>
804
+Date:   1386900429 +0100
805
+
806
+    Fix FTBFS with libfreetype6 >= 2.5.x
807
+    This resolves Bug 1765
808
+
809
+diff --git a/config.tests/x11/xfreetype.test b/config.tests/x11/xfreetype.test
810
+index 5cabc32..d4cb4ba 100755
811
+--- config.tests/x11/xfreetype.test
812
++++ config.tests/x11/xfreetype.test
813
+@@ -116,12 +116,15 @@ fi
814
+ # check for freetype2 headers
815
+ FREETYPE2_INCDIR=
816
+ if [ "$XFT" = "yes" ]; then
817
+-    INC="freetype2/freetype/freetype.h"
818
+     XDIRS=`sed -n -e '/^QMAKE_INCDIR_X11[	]*=/ { s/[^=]*=[	 ]*//; s/-I/ /g; p; }' $XCONFIG`
819
+     LDIRS=`sed -n -e '/^QMAKE_INCDIR[	]*=/ { s/[^=]*=[	 ]*//; s/-I/ /g; p; }' $XCONFIG`
820
+     INCDIRS="$IN_INCDIRS $XDIRS $LDIRS /usr/include /include"
821
+     F=
822
+     for INCDIR in $INCDIRS; do
823
++	INC="freetype2/freetype/freetype.h"  # libfreetype <= 2.4.9-1.1
824
++	if ! [ -f $INCDIR/$INC ]; then
825
++	    INC="freetype2/freetype.h"  # libfreetype >= 2.5.1-1
826
++	fi
827
+ 	if [ -f $INCDIR/$INC ]; then
828
+ 	    # detect major version of freetype2
829
+ 	    FREETYPE_MAJOR=`grep "#define FREETYPE_MAJOR" $INCDIR/$INC | head -n 1 | awk '{ print \$3 }'`
830
+--- qmake/project.cpp.orig	2015-04-10 17:15:10.731091347 +0200
831
++++ qmake/project.cpp	2013-12-30 17:58:15.471703644 +0100
832
+@@ -685,7 +685,7 @@
833
+ //	    fprintf(stderr,"Current QT version number: " + ver + "\n");
834
+ 	    if (ver != "" && ver != test_version) {
835
+ 		ver = test_version;
836
+-		fprintf(stderr,"Changed QT version number to " + test_version + "!\n");
837
++		fprintf(stderr,"Changed QT version number to %s!\n", test_version.ascii());
838
+ 	    }
839
+ 	}
840
+     }

Loading…
Cancel
Save