mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2025-01-17 23:34:07 +00:00
extra/qt to 4.8.1-2
This commit is contained in:
parent
888861208c
commit
5b512fa642
4 changed files with 165 additions and 4 deletions
|
@ -15,11 +15,11 @@ plugrel=1
|
|||
pkgbase=qt
|
||||
pkgname=('qt' 'qt-private-headers')
|
||||
pkgver=4.8.1
|
||||
pkgrel=1
|
||||
pkgrel=2
|
||||
arch=('i686' 'x86_64')
|
||||
url='http://qt-project.org/'
|
||||
license=('GPL3' 'LGPL')
|
||||
makedepends=('libtiff' 'libpng' 'libmng' 'sqlite3' 'ca-certificates' 'glib2' 'dbus'
|
||||
makedepends=('libtiff' 'libpng' 'libmng' 'sqlite' 'ca-certificates' 'glib2' 'dbus'
|
||||
'fontconfig' 'libgl' 'libsm' 'libxrandr' 'libxv' 'libxi' 'alsa-lib'
|
||||
'xdg-utils' 'hicolor-icon-theme' 'desktop-file-utils' 'mesa' 'postgresql-libs'
|
||||
'mysql' 'unixodbc' 'cups' 'gtk2')
|
||||
|
@ -28,7 +28,10 @@ _pkgfqn="${pkgbase}-everywhere-opensource-src-${pkgver}"
|
|||
source=("http://get.qt.nokia.com/qt/source/${_pkgfqn}.tar.gz"
|
||||
'assistant.desktop' 'designer.desktop' 'linguist.desktop'
|
||||
'qtconfig.desktop'
|
||||
'gcc47.patch')
|
||||
'gcc47.patch'
|
||||
'improve-cups-support.patch'
|
||||
'fix-buffer-overflow.patch'
|
||||
'fix-cursortox-crash.patch')
|
||||
md5sums=('7960ba8e18ca31f0c6e4895a312f92ff'
|
||||
'fc211414130ab2764132e7370f8e5caa'
|
||||
'85179f5e0437514f8639957e1d8baf62'
|
||||
|
@ -41,6 +44,15 @@ build() {
|
|||
|
||||
#patch -p1 -i "${srcdir}"/gcc47.patch
|
||||
|
||||
# (FS#29158)
|
||||
patch -p1 -i "${srcdir}"/fix-buffer-overflow.patch
|
||||
|
||||
# (FS#29402) (QTBUG#24718)
|
||||
patch -p1 -i "${srcdir}"/fix-cursortox-crash.patch
|
||||
|
||||
# (FS#28381) (KDEBUG#180051)
|
||||
patch -p1 -i "${srcdir}"/improve-cups-support.patch
|
||||
|
||||
export QT4DIR="${srcdir}"/${_pkgfqn}
|
||||
export LD_LIBRARY_PATH=${QT4DIR}/lib:${LD_LIBRARY_PATH}
|
||||
|
||||
|
@ -97,7 +109,7 @@ build() {
|
|||
|
||||
package_qt() {
|
||||
pkgdesc='A cross-platform application and UI framework'
|
||||
depends=('libtiff' 'libpng' 'libmng' 'sqlite3' 'ca-certificates' 'glib2' 'dbus'
|
||||
depends=('libtiff' 'libpng' 'libmng' 'sqlite' 'ca-certificates' 'glib2' 'dbus'
|
||||
'fontconfig' 'libgl' 'libsm' 'libxrandr' 'libxv' 'libxi' 'alsa-lib'
|
||||
'xdg-utils' 'hicolor-icon-theme' 'desktop-file-utils')
|
||||
optdepends=('postgresql-libs: PostgreSQL driver'
|
||||
|
|
33
extra/qt/fix-buffer-overflow.patch
Normal file
33
extra/qt/fix-buffer-overflow.patch
Normal 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]);
|
||||
}
|
32
extra/qt/fix-cursortox-crash.patch
Normal file
32
extra/qt/fix-cursortox-crash.patch
Normal 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) {
|
84
extra/qt/improve-cups-support.patch
Normal file
84
extra/qt/improve-cups-support.patch
Normal 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
|
||||
}
|
||||
|
||||
/*!
|
Loading…
Reference in a new issue