qt: update to 4.8.1.

This commit is contained in:
Juan RP 2012-05-16 19:26:54 +02:00
parent 4e0ae5d6e2
commit 29e890d1cc
16 changed files with 186 additions and 25 deletions

View file

@ -416,7 +416,6 @@ libQtHelp.so.4 qt qt-devel
libphonon.so.4 qt-libphonon qt-devel
libQtCore.so.4 qt qt-devel
libQtSql.so.4 qt qt-devel
libQtWebKit.so.4 qt qt-devel
libQtDeclarative.so.4 qt qt-devel
libQtDesignerComponents.so.4 qt-designer qt-devel
libQtDesigner.so.4 qt-designer qt-devel

View file

@ -1,2 +1,2 @@
abi_depends=">=4.5.3"
api_depends=">=4.8.0_1"
api_depends=">=4.8.1"

View file

@ -0,0 +1,33 @@
From 827e5c4c689d4ecb4f8c1ab48c9a7ab712fe2ca7 Mon Sep 17 00:00:00 2001
From: John Tapsell <john.tapsell.ext@basyskom.com>
Date: Mon, 12 Mar 2012 22:07:47 +0000
Subject: [PATCH] Harfbuzz-thai - fix buffer overflow when setting item
attributes
Change-Id: I19eeb4ec25a7c6cb3f584e6290169f9f327b8713
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
---
src/3rdparty/harfbuzz/src/harfbuzz-thai.c | 9 +++++-
.../qtextscriptengine/tst_qtextscriptengine.cpp | 29 ++++++++++++++++++++
2 files changed, 36 insertions(+), 2 deletions(-)
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-thai.c b/src/3rdparty/harfbuzz/src/harfbuzz-thai.c
index bf6c35b..3c0ffe8 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-thai.c
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-thai.c
@@ -263,8 +263,13 @@ static HB_Bool HB_ThaiConvertStringToGlyphIndices (HB_ShaperItem *item)
// The only glyphs that should be passed to this function that cannot be mapped to
// tis620 are the ones of type Inherited class. Pass these glyphs untouched.
glyphString[slen++] = string[i];
- if (string[i] == 0x200D || string[i] == 0x200C)
- item->attributes[slen-1].dontPrint = true; // Hide ZWJ and ZWNJ characters
+ if (string[i] == 0x200D || string[i] == 0x200C) {
+ // Check that we do not run out of bounds when setting item->attributes. If we do
+ // run out of bounds then this function will return false, the necessary amount of
+ // memory is reallocated, and this function will then be called again.
+ if (slen <= item->num_glyphs)
+ item->attributes[slen-1].dontPrint = true; // Hide ZWJ and ZWNJ characters
+ }
} else {
glyphString[slen++] = (HB_UChar16) thai_get_glyph_index (font_type, rglyphs[lgi]);
}

View file

@ -0,0 +1,32 @@
Index: fix-cursortox-crash.patch
===================================================================
--- fix-cursortox-crash.patch (revision 0)
+++ fix-cursortox-crash.patch (arbetskopia)
#commit cac12f4592477d99ef6fffaad40345bf85ef53b5
#Author: Jiang Jiang <jiang.jiang@nokia.com>
#Date: Mon Apr 2 12:32:05 2012 +0200
#
# Fix a crash in cursorToX() when new block is added
#
# When an empty new block is being added, the layoutData->memory data
# will be 0, thus QTextEngine::attributes() will return 0. We should
# only access the attributes pointer when some text actually exist.
#
# Task-number: QTBUG-24718
# Change-Id: I9ce9f7b57bccf24099a02832ce30fb6cebfaad33
#
diff --git a/src/gui/text/qtextlayout.cpp b/src/gui/text/qtextlayout.cpp
index ee658d9..16f7150 100644
--- a/src/gui/text/qtextlayout.cpp
+++ b/src/gui/text/qtextlayout.cpp
@@ -2508,6 +2508,10 @@ qreal QTextLine::cursorToX(int *cursorPos, Edge edge) const
int pos = *cursorPos;
int itm;
const HB_CharAttributes *attributes = eng->attributes();
+ if (!attributes) {
+ *cursorPos = 0;
+ return x.toReal();
+ }
while (pos < line.from + line.length && !attributes[pos].charStop)
pos++;
if (pos == line.from + (int)line.length) {

View file

@ -0,0 +1,27 @@
diff -up qt-everywhere-opensource-src-4.8.0/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSGlobalObject.h.me qt-everywhere-opensource-src-4.8.0/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSGlobalObject.h
--- qt-everywhere-opensource-src-4.8.0/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSGlobalObject.h.me 2012-01-24 11:24:14.729942043 +0100
+++ qt-everywhere-opensource-src-4.8.0/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSGlobalObject.h 2012-01-24 14:28:39.848109534 +0100
@@ -57,9 +57,7 @@ namespace JSC {
class JSGlobalObject : public JSVariableObject {
protected:
- using JSVariableObject::JSVariableObjectData;
-
- struct JSGlobalObjectData : public JSVariableObjectData {
+ struct JSGlobalObjectData : public JSVariableObject::JSVariableObjectData {
// We use an explicit destructor function pointer instead of a
// virtual destructor because we want to avoid adding a vtable
// pointer to this struct. Adding a vtable pointer would force the
diff -up qt-everywhere-opensource-src-4.8.0/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSStaticScopeObject.h.me qt-everywhere-opensource-src-4.8.0/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSStaticScopeObject.h
--- qt-everywhere-opensource-src-4.8.0/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSStaticScopeObject.h.me 2012-01-24 11:40:07.167856677 +0100
+++ qt-everywhere-opensource-src-4.8.0/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSStaticScopeObject.h 2012-01-24 14:28:34.640306629 +0100
@@ -32,8 +32,7 @@ namespace JSC{
class JSStaticScopeObject : public JSVariableObject {
protected:
- using JSVariableObject::JSVariableObjectData;
- struct JSStaticScopeObjectData : public JSVariableObjectData {
+ struct JSStaticScopeObjectData : public JSVariableObject::JSVariableObjectData {
JSStaticScopeObjectData()
: JSVariableObjectData(&symbolTable, &registerStore + 1)
{

View file

@ -0,0 +1,84 @@
diff -ur qt-everywhere-opensource-src-4.6.2/src/gui/dialogs/qprintdialog_unix.cpp qt-everywhere-opensource-src-4.6.2-cups/src/gui/dialogs/qprintdialog_unix.cpp
--- qt-everywhere-opensource-src-4.6.2/src/gui/dialogs/qprintdialog_unix.cpp 2010-02-11 16:55:22.000000000 +0100
+++ qt-everywhere-opensource-src-4.6.2-cups/src/gui/dialogs/qprintdialog_unix.cpp 2010-02-28 04:34:16.000000000 +0100
@@ -569,6 +569,32 @@
void QPrintDialogPrivate::selectPrinter(QCUPSSupport *cups)
{
options.duplex->setEnabled(cups && cups->ppdOption("Duplex"));
+
+ if (cups) {
+ const ppd_option_t* duplex = cups->ppdOption("Duplex");
+ if (duplex) {
+ // copy default ppd duplex to qt dialog
+ if (qstrcmp(duplex->defchoice, "DuplexTumble") == 0)
+ options.duplexShort->setChecked(true);
+ else if (qstrcmp(duplex->defchoice, "DuplexNoTumble") == 0)
+ options.duplexLong->setChecked(true);
+ else
+ options.noDuplex->setChecked(true);
+ }
+
+ if (cups->currentPPD()) {
+ // set default color
+ if (cups->currentPPD()->color_device)
+ options.color->setChecked(true);
+ else
+ options.grayscale->setChecked(true);
+ }
+
+ // set collation
+ const ppd_option_t *collate = cups->ppdOption("Collate");
+ if (collate)
+ options.collate->setChecked(qstrcmp(collate->defchoice, "True")==0);
+ }
}
#endif
diff -ur qt-everywhere-opensource-src-4.6.2/src/gui/painting/qprinter.cpp qt-everywhere-opensource-src-4.6.2-cups/src/gui/painting/qprinter.cpp
--- qt-everywhere-opensource-src-4.6.2/src/gui/painting/qprinter.cpp 2010-02-11 16:55:22.000000000 +0100
+++ qt-everywhere-opensource-src-4.6.2-cups/src/gui/painting/qprinter.cpp 2010-02-28 04:55:15.000000000 +0100
@@ -627,6 +627,44 @@
&& d_ptr->paintEngine->type() != QPaintEngine::MacPrinter) {
setOutputFormat(QPrinter::PdfFormat);
}
+
+#if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY)
+ // fill in defaults from ppd file
+ QCUPSSupport cups;
+
+ int printernum = -1;
+ for (int i = 0; i < cups.availablePrintersCount(); i++) {
+ if (printerName().toLocal8Bit() == cups.availablePrinters()[i].name)
+ printernum = i;
+ }
+ if (printernum >= 0) {
+ cups.setCurrentPrinter(printernum);
+
+ const ppd_option_t* duplex = cups.ppdOption("Duplex");
+ if (duplex) {
+ // copy default ppd duplex to qt dialog
+ if (qstrcmp(duplex->defchoice, "DuplexTumble") == 0)
+ setDuplex(DuplexShortSide);
+ else if (qstrcmp(duplex->defchoice, "DuplexNoTumble") == 0)
+ setDuplex(DuplexLongSide);
+ else
+ setDuplex(DuplexNone);
+ }
+
+ if (cups.currentPPD()) {
+ // set default color
+ if (cups.currentPPD()->color_device)
+ setColorMode(Color);
+ else
+ setColorMode(GrayScale);
+ }
+
+ // set collation
+ const ppd_option_t *collate = cups.ppdOption("Collate");
+ if (collate)
+ setCollateCopies(qstrcmp(collate->defchoice, "True")==0);
+ }
+#endif
}
/*!

View file

@ -7,7 +7,6 @@ libgcc_s.so.1
libc.so.6
libGL.so.1
libQtSql.so.4
libQtWebKit.so.4
libQtNetwork.so.4
libQtDeclarative.so.4
libQtXml.so.4

View file

@ -6,7 +6,6 @@ long_desc="${long_desc}
This package contains Qt 4 examples and demos."
gtk_iconcache_dirs="/usr/share/icons/hicolor"
revision=1
Add_dependency run hicolor-icon-theme
Add_dependency run qt-docs

View file

@ -4,7 +4,6 @@ libQtCore.so.4
libstdc++.so.6
libgcc_s.so.1
libc.so.6
libQtWebKit.so.4
libQtDeclarative.so.4
libQtOpenGL.so.4
libGL.so.1

View file

@ -1,6 +1,5 @@
# Template file for 'qt-designer'.
#
revision=1
short_desc="Qt GUI designer"
long_desc="${long_desc}

View file

@ -1,5 +1,4 @@
libQtHelp.so.4
libQtWebKit.so.4
libQtSql.so.4
libQtGui.so.4
libQtNetwork.so.4

View file

@ -1,6 +1,5 @@
# Template file for 'qt-devel'.
#
revision=1
short_desc="Qt development files"
long_desc="${long_desc}

View file

@ -5,7 +5,6 @@ long_desc="${long_desc}
This package contains a Qt phonon backend plugin for GStreamer."
revision=1
do_install() {
vmove usr/lib/qt/plugins/phonon_backend/libphonon_gstreamer.so \

View file

@ -6,7 +6,6 @@ long_desc="${long_desc}
The Qt Configuration program allows end users to configure the look
and behavior of any Qt application."
revision=1
gtk_iconcache_dirs="/usr/share/icons/hicolor"
Add_dependency run hicolor-icon-theme

View file

@ -1,7 +1,6 @@
libpthread.so.0
libz.so.1
libdl.so.2
libgthread-2.0.so.0
librt.so.1
libglib-2.0.so.0
libstdc++.so.6
@ -23,15 +22,8 @@ libX11.so.6
libGL.so.1
libOpenVG.so.1
libasound.so.2
libsqlite3.so.0
libmng.so.1
libjpeg.so.8
ld-linux-x86-64.so.2
libgstapp-0.10.so.0
libgstinterfaces-0.10.so.0
libgstpbutils-0.10.so.0
libgstvideo-0.10.so.0
libgstbase-0.10.so.0
libgstreamer-0.10.so.0
libtiff.so.5
ld-linux.so.2

View file

@ -1,15 +1,15 @@
# Template file for 'qt'
pkgname=qt
version=4.8.0
version=4.8.1
patch_args="-Np1"
_distname=qt-everywhere-opensource-src
wrksrc=${_distname}-${version}
homepage="http://qt.nokia.com/"
distfiles="ftp://ftp.qt.nokia.com/qt/source/${_distname}-$version.tar.gz"
revision=4
short_desc="A cross-platform application and UI framework"
maintainer="Juan RP <xtraeme@gmail.com>"
license="GPL-3, LGPL-2.1"
checksum=9392b74e485e15f75a3e07a527547d4f6747eaf55ebce71ba0e863a9fd320b6e
checksum=ef851a36aa41b4ad7a3e4c96ca27eaed2a629a6d2fa06c20f072118caed87ae8
long_desc="
Qt(TM) is a GUI software toolkit. Qt simplifies the task of writing and
maintaining GUI (graphical user interface) applications."
@ -19,7 +19,7 @@ subpackages="${subpackages} qt-demos qt-docs qt-qmake qt-qtconfig"
subpackages="${subpackages} qt-designer qt-devel qt-devel-tools"
subpackages="${subpackages} qt-plugin-gstreamer"
# XXX Missing dependencies: unixodbc and cups.
# XXX Missing dependencies: unixodbc.
Add_dependency build pkg-config
Add_dependency build freetype-devel
Add_dependency build MesaLib-devel
@ -32,6 +32,7 @@ Add_dependency build libXi-devel
Add_dependency build libXv-devel
Add_dependency build libXinerama-devel
Add_dependency build libXrandr-devel
Add_dependency build libXcursor-devel
Add_dependency build zlib-devel
Add_dependency build dbus-devel
Add_dependency build glib-devel
@ -51,6 +52,7 @@ Add_dependency build postgresql-libs-devel
Add_dependency build pulseaudio-devel
Add_dependency build gtk+-devel
Add_dependency build icu-devel
Add_dependency build cups-devel
do_configure() {
export LD_LIBRARY_PATH="${wrksrc}/lib:${LD_LIBRARY_PATH}"
@ -67,15 +69,15 @@ do_configure() {
-examplesdir /usr/share/doc/qt/examples \
-demosdir /usr/share/doc/qt/demos -largefile \
-plugin-sql-sqlite -system-sqlite \
-xmlpatterns -svg -webkit \
-scripttools -system-zlib \
-xmlpatterns -svg -no-webkit \
-scripttools -system-zlib -graphicssystem raster \
-system-libtiff -system-libpng -system-libmng -system-libjpeg \
-openssl-linked -optimized-qmake -no-rpath -reduce-relocations \
-no-separate-debug-info -gtkstyle -opengl -glib -gstreamer \
-no-sql-db2 -no-sql-ibase -gtkstyle \
-plugin-sql-mysql -plugin-sql-psql -no-sql-oci \
-no-sql-odbc -no-sql-sqlite2 \
-no-cups -dbus-linked -no-nas-sound -iconv -shared \
-dbus-linked -no-nas-sound -iconv -shared \
-release -fast -no-sql-tds
}