mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-18 22:54:00 +00:00
extra/qt to 4.7.2-1
This commit is contained in:
parent
6505907c4b
commit
be72821a26
4 changed files with 13 additions and 267 deletions
|
@ -1,23 +1,23 @@
|
|||
# $Id: PKGBUILD 103789 2010-12-23 10:04:34Z andrea $
|
||||
# $Id: PKGBUILD 111827 2011-03-01 11:00:03Z andrea $
|
||||
# Maintainer: Andrea Scarpino <andrea@archlinux.org>
|
||||
# Contributor: Pierre Schmitz <pierre@archlinux.de>
|
||||
|
||||
# PlugApps: Kevin Mihelich <kevin@plugapps.com>
|
||||
# - configure flags to disable opengl, mmx, etc.
|
||||
# - configure flags to disable mmx, etc.
|
||||
|
||||
plugrel=1
|
||||
noautobuild=1
|
||||
|
||||
pkgname=qt
|
||||
pkgver=4.7.1
|
||||
pkgrel=3
|
||||
pkgver=4.7.2
|
||||
pkgrel=1
|
||||
pkgdesc='A cross-platform application and UI framework'
|
||||
arch=('i686' 'x86_64')
|
||||
url='http://qt.nokia.com/'
|
||||
license=('GPL3' 'LGPL')
|
||||
depends=('libtiff' 'libpng' 'libmng' 'sqlite3' 'ca-certificates' 'glib2' 'dbus'
|
||||
'fontconfig' 'libgl' 'libsm' 'libxrandr' 'libxv' 'libxi' 'alsa-lib'
|
||||
'xdg-utils' 'hicolor-icon-theme')
|
||||
'xdg-utils' 'hicolor-icon-theme' 'desktop-file-utils')
|
||||
optdepends=('postgresql-libs: PostgreSQL driver'
|
||||
'libmysqlclient: MySQL driver'
|
||||
'unixodbc: ODBC driver'
|
||||
|
@ -30,16 +30,12 @@ options=('!libtool')
|
|||
_pkgfqn="qt-everywhere-opensource-src-${pkgver}"
|
||||
source=("ftp://ftp.qt.nokia.com/qt/source/${_pkgfqn}.tar.gz"
|
||||
'assistant.desktop' 'designer.desktop' 'linguist.desktop'
|
||||
'qtconfig.desktop'
|
||||
'fix-qtbug-15857.patch'
|
||||
'add-postgresql9.patch')
|
||||
md5sums=('6f88d96507c84e9fea5bf3a71ebeb6d7'
|
||||
'qtconfig.desktop')
|
||||
md5sums=('66b992f5c21145df08c99d21847f4fdb'
|
||||
'fc211414130ab2764132e7370f8e5caa'
|
||||
'85179f5e0437514f8639957e1d8baf62'
|
||||
'f11852b97583610f3dbb669ebc3e21bc'
|
||||
'6b771c8a81dd90b45e8a79afa0e5bbfd'
|
||||
'c359d7b8c3a7fdd99512feaab8c2e26b'
|
||||
'ae3bb58e7b63786d420905baf083fcd2')
|
||||
'6b771c8a81dd90b45e8a79afa0e5bbfd')
|
||||
|
||||
build() {
|
||||
unset QMAKESPEC
|
||||
|
@ -48,12 +44,8 @@ build() {
|
|||
export LD_LIBRARY_PATH=${QT4DIR}/lib:${LD_LIBRARY_PATH}
|
||||
|
||||
cd $srcdir/$_pkgfqn
|
||||
|
||||
# Already fixed upstream
|
||||
patch -Np1 -i ${srcdir}/fix-qtbug-15857.patch
|
||||
patch -Np1 -i ${srcdir}/add-postgresql9.patch
|
||||
|
||||
sed -i "s|-O2|$CXXFLAGS|" mkspecs/common/g++.conf
|
||||
|
||||
sed -i "s|-O2|$CXXFLAGS|" mkspecs/common/g++.conf
|
||||
sed -i "/^QMAKE_RPATH/s| -Wl,-rpath,||g" mkspecs/common/g++.conf
|
||||
sed -i "/^QMAKE_LFLAGS\s/s|+=|+= $LDFLAGS|g" mkspecs/common/g++.conf
|
||||
|
||||
|
@ -93,7 +85,7 @@ build() {
|
|||
-reduce-relocations \
|
||||
-no-separate-debug-info \
|
||||
-gtkstyle \
|
||||
-no-opengl \
|
||||
-opengl \
|
||||
-no-openvg \
|
||||
-glib \
|
||||
-no-mmx \
|
||||
|
@ -105,7 +97,7 @@ build() {
|
|||
-no-sse4.1 \
|
||||
-no-sse4.2 \
|
||||
-no-avx
|
||||
make
|
||||
make -j1
|
||||
}
|
||||
|
||||
package() {
|
||||
|
|
|
@ -1,215 +0,0 @@
|
|||
From 03f94089a16cf6b6a3b533ba1f90444eb18c29ab Mon Sep 17 00:00:00 2001
|
||||
From: Charles Yin <charles.yin@nokia.com>
|
||||
Date: Thu, 4 Nov 2010 15:38:57 +1000
|
||||
Subject: [PATCH] Add Postgresql 8.x and 9 supports
|
||||
|
||||
Change-Id: Ic740686ead768cc3e106703049d878549dfd3c6a
|
||||
Task-number:QTBUG-14206
|
||||
Reviewed-by: Michael Goddard
|
||||
---
|
||||
src/sql/drivers/psql/qsql_psql.cpp | 116 +++++++++++++++++++++---------
|
||||
src/sql/drivers/psql/qsql_psql.h | 6 ++-
|
||||
tests/auto/qsqldatabase/tst_databases.h | 2 +
|
||||
3 files changed, 88 insertions(+), 36 deletions(-)
|
||||
|
||||
diff --git a/src/sql/drivers/psql/qsql_psql.cpp b/src/sql/drivers/psql/qsql_psql.cpp
|
||||
index 2a4e595..bf9685f 100644
|
||||
--- a/src/sql/drivers/psql/qsql_psql.cpp
|
||||
+++ b/src/sql/drivers/psql/qsql_psql.cpp
|
||||
@@ -54,7 +54,6 @@
|
||||
#include <qstringlist.h>
|
||||
#include <qmutex.h>
|
||||
|
||||
-
|
||||
#include <libpq-fe.h>
|
||||
#include <pg_config.h>
|
||||
|
||||
@@ -619,6 +618,50 @@ static void setDatestyle(PGconn* connection)
|
||||
PQclear(result);
|
||||
}
|
||||
|
||||
+static QPSQLDriver::Protocol qMakePSQLVersion(int vMaj, int vMin)
|
||||
+{
|
||||
+ switch (vMaj) {
|
||||
+ case 6:
|
||||
+ return QPSQLDriver::Version6;
|
||||
+ case 7:
|
||||
+ {
|
||||
+ switch (vMin) {
|
||||
+ case 1:
|
||||
+ return QPSQLDriver::Version71;
|
||||
+ case 3:
|
||||
+ return QPSQLDriver::Version73;
|
||||
+ case 4:
|
||||
+ return QPSQLDriver::Version74;
|
||||
+ default:
|
||||
+ return QPSQLDriver::Version7;
|
||||
+ }
|
||||
+ break;
|
||||
+ }
|
||||
+ case 8:
|
||||
+ {
|
||||
+ switch (vMin) {
|
||||
+ case 1:
|
||||
+ return QPSQLDriver::Version81;
|
||||
+ case 2:
|
||||
+ return QPSQLDriver::Version82;
|
||||
+ case 3:
|
||||
+ return QPSQLDriver::Version83;
|
||||
+ case 4:
|
||||
+ return QPSQLDriver::Version84;
|
||||
+ default:
|
||||
+ return QPSQLDriver::Version8;
|
||||
+ }
|
||||
+ break;
|
||||
+ }
|
||||
+ case 9:
|
||||
+ return QPSQLDriver::Version9;
|
||||
+ break;
|
||||
+ default:
|
||||
+ break;
|
||||
+ }
|
||||
+ return QPSQLDriver::VersionUnknown;
|
||||
+}
|
||||
+
|
||||
static QPSQLDriver::Protocol getPSQLVersion(PGconn* connection)
|
||||
{
|
||||
QPSQLDriver::Protocol serverVersion = QPSQLDriver::Version6;
|
||||
@@ -626,50 +669,44 @@ static QPSQLDriver::Protocol getPSQLVersion(PGconn* connection)
|
||||
int status = PQresultStatus(result);
|
||||
if (status == PGRES_COMMAND_OK || status == PGRES_TUPLES_OK) {
|
||||
QString val = QString::fromAscii(PQgetvalue(result, 0, 0));
|
||||
+
|
||||
QRegExp rx(QLatin1String("(\\d+)\\.(\\d+)"));
|
||||
rx.setMinimal(true); // enforce non-greedy RegExp
|
||||
+
|
||||
if (rx.indexIn(val) != -1) {
|
||||
int vMaj = rx.cap(1).toInt();
|
||||
int vMin = rx.cap(2).toInt();
|
||||
-
|
||||
- switch (vMaj) {
|
||||
- case 7:
|
||||
- switch (vMin) {
|
||||
- case 0:
|
||||
- serverVersion = QPSQLDriver::Version7;
|
||||
- break;
|
||||
- case 1:
|
||||
- case 2:
|
||||
- serverVersion = QPSQLDriver::Version71;
|
||||
- break;
|
||||
- default:
|
||||
- serverVersion = QPSQLDriver::Version73;
|
||||
- break;
|
||||
- }
|
||||
- break;
|
||||
- case 8:
|
||||
- switch (vMin) {
|
||||
- case 0:
|
||||
- serverVersion = QPSQLDriver::Version8;
|
||||
- break;
|
||||
- case 1:
|
||||
- serverVersion = QPSQLDriver::Version81;
|
||||
- break;
|
||||
- case 2:
|
||||
- default:
|
||||
- serverVersion = QPSQLDriver::Version82;
|
||||
- break;
|
||||
- }
|
||||
- break;
|
||||
- default:
|
||||
- break;
|
||||
+ serverVersion = qMakePSQLVersion(vMaj, vMin);
|
||||
+#ifdef PG_MAJORVERSION
|
||||
+ if (rx.indexIn(QLatin1String(PG_MAJORVERSION)) != -1) {
|
||||
+ vMaj = rx.cap(1).toInt();
|
||||
+ vMin = rx.cap(2).toInt();
|
||||
+ }
|
||||
+ QPSQLDriver::Protocol clientVersion = qMakePSQLVersion(vMaj, vMin);
|
||||
+
|
||||
+ if (serverVersion >= QPSQLDriver::Version9 && clientVersion < QPSQLDriver::Version9) {
|
||||
+ //Client version before QPSQLDriver::Version9 only supports escape mode for bytea type,
|
||||
+ //but bytea format is set to hex by default in PSQL 9 and above. So need to force the
|
||||
+ //server use the old escape mode when connects to the new server with old client library.
|
||||
+ result = PQexec(connection, "SET bytea_output=escape; ");
|
||||
+ status = PQresultStatus(result);
|
||||
+ } else if (serverVersion == QPSQLDriver::VersionUnknown) {
|
||||
+ serverVersion = clientVersion;
|
||||
+ if (serverVersion != QPSQLDriver::VersionUnknown)
|
||||
+ qWarning("The server version of this PostgreSQL is unknown, falling back to the client version.");
|
||||
}
|
||||
+#endif
|
||||
}
|
||||
}
|
||||
PQclear(result);
|
||||
|
||||
- if (serverVersion < QPSQLDriver::Version71)
|
||||
+ //keep the old behavior unchanged
|
||||
+ if (serverVersion == QPSQLDriver::VersionUnknown)
|
||||
+ serverVersion = QPSQLDriver::Version6;
|
||||
+
|
||||
+ if (serverVersion < QPSQLDriver::Version71) {
|
||||
qWarning("This version of PostgreSQL is not supported and may not work.");
|
||||
+ }
|
||||
|
||||
return serverVersion;
|
||||
}
|
||||
@@ -852,7 +889,10 @@ bool QPSQLDriver::commitTransaction()
|
||||
// This hack can dissapear once there is an API to query this sort of information.
|
||||
if (d->pro == QPSQLDriver::Version8 ||
|
||||
d->pro == QPSQLDriver::Version81 ||
|
||||
- d->pro == QPSQLDriver::Version82) {
|
||||
+ d->pro == QPSQLDriver::Version82 ||
|
||||
+ d->pro == QPSQLDriver::Version83 ||
|
||||
+ d->pro == QPSQLDriver::Version84 ||
|
||||
+ d->pro == QPSQLDriver::Version9) {
|
||||
transaction_failed = qstrcmp(PQcmdStatus(res), "ROLLBACK") == 0;
|
||||
}
|
||||
|
||||
@@ -963,6 +1003,9 @@ QSqlIndex QPSQLDriver::primaryIndex(const QString& tablename) const
|
||||
case QPSQLDriver::Version8:
|
||||
case QPSQLDriver::Version81:
|
||||
case QPSQLDriver::Version82:
|
||||
+ case QPSQLDriver::Version83:
|
||||
+ case QPSQLDriver::Version84:
|
||||
+ case QPSQLDriver::Version9:
|
||||
stmt = QLatin1String("SELECT pg_attribute.attname, pg_attribute.atttypid::int, "
|
||||
"pg_class.relname "
|
||||
"FROM pg_attribute, pg_class "
|
||||
@@ -1046,6 +1089,9 @@ QSqlRecord QPSQLDriver::record(const QString& tablename) const
|
||||
case QPSQLDriver::Version8:
|
||||
case QPSQLDriver::Version81:
|
||||
case QPSQLDriver::Version82:
|
||||
+ case QPSQLDriver::Version83:
|
||||
+ case QPSQLDriver::Version84:
|
||||
+ case QPSQLDriver::Version9:
|
||||
stmt = QLatin1String("select pg_attribute.attname, pg_attribute.atttypid::int, "
|
||||
"pg_attribute.attnotnull, pg_attribute.attlen, pg_attribute.atttypmod, "
|
||||
"pg_attrdef.adsrc "
|
||||
diff --git a/src/sql/drivers/psql/qsql_psql.h b/src/sql/drivers/psql/qsql_psql.h
|
||||
index 22871ff..107da87 100644
|
||||
--- a/src/sql/drivers/psql/qsql_psql.h
|
||||
+++ b/src/sql/drivers/psql/qsql_psql.h
|
||||
@@ -97,6 +97,7 @@ class Q_EXPORT_SQLDRIVER_PSQL QPSQLDriver : public QSqlDriver
|
||||
Q_OBJECT
|
||||
public:
|
||||
enum Protocol {
|
||||
+ VersionUnknown = -1,
|
||||
Version6 = 6,
|
||||
Version7 = 7,
|
||||
Version71 = 8,
|
||||
@@ -104,7 +105,10 @@ public:
|
||||
Version74 = 10,
|
||||
Version8 = 11,
|
||||
Version81 = 12,
|
||||
- Version82 = 13
|
||||
+ Version82 = 13,
|
||||
+ Version83 = 14,
|
||||
+ Version84 = 15,
|
||||
+ Version9 = 16,
|
||||
};
|
||||
|
||||
explicit QPSQLDriver(QObject *parent=0);
|
||||
|
||||
--
|
||||
1.6.1
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
From 6ae84f1183e91c910ca92a55e37f8254ace805c0 Mon Sep 17 00:00:00 2001
|
||||
From: Jiang Jiang <jiang.jiang@nokia.com>
|
||||
Date: Mon, 6 Dec 2010 13:07:36 +0100
|
||||
Subject: [PATCH] Fix QTextEdit::selectAll crash from textChanged()
|
||||
|
||||
Doing selectAll() after the entire block of text has been removed
|
||||
will cause this crash, because we didn't check if the block we
|
||||
found is valid or not.
|
||||
|
||||
Task-number: QTBUG-15857
|
||||
Reviewed-by: Eskil
|
||||
---
|
||||
src/gui/text/qtextcursor.cpp | 3 +++
|
||||
1 files changed, 3 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/src/gui/text/qtextcursor.cpp b/src/gui/text/qtextcursor.cpp
|
||||
index 769ab2f..f73cc4b 100644
|
||||
--- a/src/gui/text/qtextcursor.cpp
|
||||
+++ b/src/gui/text/qtextcursor.cpp
|
||||
@@ -363,6 +363,9 @@ bool QTextCursorPrivate::movePosition(QTextCursor::MoveOperation op, QTextCursor
|
||||
bool adjustX = true;
|
||||
QTextBlock blockIt = block();
|
||||
|
||||
+ if (!blockIt.isValid())
|
||||
+ return false;
|
||||
+
|
||||
if (op >= QTextCursor::Left && op <= QTextCursor::WordRight
|
||||
&& blockIt.textDirection() == Qt::RightToLeft) {
|
||||
if (op == QTextCursor::Left)
|
||||
--
|
||||
1.6.1
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
post_install() {
|
||||
xdg-icon-resource forceupdate --theme hicolor &> /dev/null
|
||||
update-desktop-database -q
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
|
|
Loading…
Reference in a new issue