summaryrefslogtreecommitdiff
path: root/extra/qt
diff options
context:
space:
mode:
Diffstat (limited to 'extra/qt')
-rw-r--r--extra/qt/PKGBUILD219
-rw-r--r--extra/qt/assistant.desktop9
-rw-r--r--extra/qt/blacklist-fraudulent-comodo-certificates.patch89
-rw-r--r--extra/qt/designer.desktop11
-rw-r--r--extra/qt/linguist.desktop10
-rw-r--r--extra/qt/qt.install12
-rw-r--r--extra/qt/qtconfig.desktop10
7 files changed, 360 insertions, 0 deletions
diff --git a/extra/qt/PKGBUILD b/extra/qt/PKGBUILD
new file mode 100644
index 000000000..4e6d6dfb0
--- /dev/null
+++ b/extra/qt/PKGBUILD
@@ -0,0 +1,219 @@
+# $Id: PKGBUILD 117207 2011-03-29 18:21:55Z andrea $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+# Contributor: Pierre Schmitz <pierre@archlinux.de>
+
+pkgbase=qt
+pkgname=('qt' 'qt-private-headers')
+pkgver=4.7.2
+pkgrel=6
+arch=('i686' 'x86_64')
+url='http://qt.nokia.com/'
+license=('GPL3' 'LGPL')
+makedepends=('libtiff' 'libpng' 'libmng' 'sqlite3' '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')
+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'
+ 'blacklist-fraudulent-comodo-certificates.patch')
+md5sums=('66b992f5c21145df08c99d21847f4fdb'
+ 'fc211414130ab2764132e7370f8e5caa'
+ '85179f5e0437514f8639957e1d8baf62'
+ 'f11852b97583610f3dbb669ebc3e21bc'
+ '6b771c8a81dd90b45e8a79afa0e5bbfd'
+ 'af1259401447f4de59f1d4c2cbedafed')
+
+build() {
+ unset QMAKESPEC
+ export QT4DIR=$srcdir/$_pkgfqn
+ export PATH=${QT4DIR}/bin:${PATH}
+ export LD_LIBRARY_PATH=${QT4DIR}/lib:${LD_LIBRARY_PATH}
+
+ cd $srcdir/$_pkgfqn
+
+ 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
+
+ ./configure -confirm-license -opensource \
+ -prefix /usr \
+ -docdir /usr/share/doc/qt \
+ -plugindir /usr/lib/qt/plugins \
+ -importdir /usr/lib/qt/imports \
+ -datadir /usr/share/qt \
+ -translationdir /usr/share/qt/translations \
+ -sysconfdir /etc \
+ -examplesdir /usr/share/doc/qt/examples \
+ -demosdir /usr/share/doc/qt/demos \
+ -largefile \
+ -plugin-sql-{psql,mysql,sqlite,odbc} \
+ -system-sqlite \
+ -xmlpatterns \
+ -no-phonon \
+ -no-phonon-backend \
+ -svg \
+ -webkit \
+ -script \
+ -scripttools \
+ -system-zlib \
+ -system-libtiff \
+ -system-libpng \
+ -system-libmng \
+ -system-libjpeg \
+ -nomake demos \
+ -nomake examples \
+ -nomake docs \
+ -no-rpath \
+ -openssl-linked \
+ -silent \
+ -optimized-qmake \
+ -dbus \
+ -reduce-relocations \
+ -no-separate-debug-info \
+ -gtkstyle \
+ -opengl \
+ -no-openvg \
+ -glib
+ make
+}
+
+package_qt() {
+ pkgdesc='A cross-platform application and UI framework'
+ depends=('libtiff' 'libpng' 'libmng' 'sqlite3' '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'
+ 'libmysqlclient: MySQL driver'
+ 'unixodbc: ODBC driver'
+ 'libxinerama: Xinerama support'
+ 'libxcursor: Xcursor support'
+ 'libxfixes: Xfixes support')
+ install='qt.install'
+
+ cd $srcdir/$_pkgfqn
+ make INSTALL_ROOT=$pkgdir install
+
+ # install missing icons and desktop files
+ for icon in tools/linguist/linguist/images/icons/linguist-*-32.png ; do
+ size=$(echo $(basename ${icon}) | cut -d- -f2)
+ install -p -D -m644 ${icon} ${pkgdir}/usr/share/icons/hicolor/${size}x${size}/apps/linguist.png
+ done
+ install -p -D -m644 src/gui/dialogs/images/qtlogo-64.png ${pkgdir}/usr/share/icons/hicolor/64x64/apps/qtlogo.png
+ install -p -D -m644 tools/assistant/tools/assistant/images/assistant.png ${pkgdir}/usr/share/icons/hicolor/32x32/apps/assistant.png
+ install -p -D -m644 tools/designer/src/designer/images/designer.png ${pkgdir}/usr/share/icons/hicolor/128x128/apps/designer.png
+ install -d ${pkgdir}/usr/share/applications
+ install -m644 ${srcdir}/{linguist,designer,assistant,qtconfig}.desktop ${pkgdir}/usr/share/applications/
+
+ # install license addition
+ install -D -m644 LGPL_EXCEPTION.txt ${pkgdir}/usr/share/licenses/qt/LGPL_EXCEPTION.txt
+
+ # Fix wrong path in pkgconfig files
+ find ${pkgdir}/usr/lib/pkgconfig -type f -name '*.pc' \
+ -exec perl -pi -e "s, -L${srcdir}/?\S+,,g" {} \;
+ # Fix wrong path in prl files
+ find ${pkgdir}/usr/lib -type f -name '*.prl' \
+ -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d;s/\(QMAKE_PRL_LIBS =\).*/\1/' {} \;
+}
+
+package_qt-private-headers(){
+ pkgdesc="Qt private headers for development"
+ depends=("qt=${pkgver}")
+
+ install -d ${pkgdir}/usr/include/phonon/private
+ cd ${srcdir}/$_pkgfqn/src/3rdparty/phonon/phonon/
+ find . -name "*_p.h" -exec install -m644 {} \
+ ${pkgdir}/usr/include/phonon/private/ \; &> /dev/null
+
+ install -d ${pkgdir}/usr/include/Qt3Support/private
+ cd ${srcdir}/$_pkgfqn/src/qt3support/
+ find . -name "*_p.h" -exec install -m644 {} \
+ ${pkgdir}/usr/include/Qt3Support/private/ \; &> /dev/null
+
+ install -d ${pkgdir}/usr/include/QtCore/private
+ cd ${srcdir}/$_pkgfqn/src/corelib/
+ find . -name "*_p.h" -exec install -m644 {} \
+ ${pkgdir}/usr/include/QtCore/private/ \; &> /dev/null
+
+ install -d ${pkgdir}/usr/include/QtDBus/private
+ cd ${srcdir}/$_pkgfqn/src/dbus/
+ find . -name "*_p.h" -exec install -m644 {} \
+ ${pkgdir}/usr/include/QtDBus/private/ \; &> /dev/null
+
+ install -d ${pkgdir}/usr/include/QtDeclarative/private
+ cd ${srcdir}/$_pkgfqn/src/declarative/
+ find . -name "*_p.h" -exec install -m644 {} \
+ ${pkgdir}/usr/include/QtDeclarative/private/ \; &> /dev/null
+
+ install -d ${pkgdir}/usr/include/QtDesigner/private
+ cd ${srcdir}/$_pkgfqn/tools/designer/
+ find . -name "*_p.h" -exec install -m644 {} \
+ ${pkgdir}/usr/include/QtDesigner/private/ \; &> /dev/null
+
+ install -d ${pkgdir}/usr/include/QtGui/private
+ cd ${srcdir}/$_pkgfqn/src/gui/
+ find . -name "*_p.h" -exec install -m644 {} \
+ ${pkgdir}/usr/include/QtGui/private/ \; &> /dev/null
+
+ install -d ${pkgdir}/usr/include/QtHelp/private
+ cd ${srcdir}/$_pkgfqn/tools/assistant/
+ find . -name "*_p.h" -exec install -m644 {} \
+ ${pkgdir}/usr/include/QtHelp/private/ \; &> /dev/null
+
+ install -d ${pkgdir}/usr/include/QtMultimedia/private
+ cd ${srcdir}/$_pkgfqn/src/multimedia/
+ find . -name "*_p.h" -exec install -m644 {} \
+ ${pkgdir}/usr/include/QtMultimedia/private/ \; &> /dev/null
+
+ install -d ${pkgdir}/usr/include/QtNetwork/private
+ cd ${srcdir}/$_pkgfqn/src/network/
+ find . -name "*_p.h" -exec install -m644 {} \
+ ${pkgdir}/usr/include/QtNetwork/private/ \; &> /dev/null
+
+ install -d ${pkgdir}/usr/include/QtOpenGL/private
+ cd ${srcdir}/$_pkgfqn/src/opengl/
+ find . -name "*_p.h" -exec install -m644 {} \
+ ${pkgdir}/usr/include/QtOpenGL/private/ \; &> /dev/null
+
+ install -d ${pkgdir}/usr/include/QtScript/private
+ cd ${srcdir}/$_pkgfqn/src/script/
+ find . -name "*_p.h" -exec install -m644 {} \
+ ${pkgdir}/usr/include/QtScript/private/ \; &> /dev/null
+
+ install -d ${pkgdir}/usr/include/QtScriptTools/private
+ cd ${srcdir}/$_pkgfqn/src/scripttools/
+ find . -name "*_p.h" -exec install -m644 {} \
+ ${pkgdir}/usr/include/QtScriptTools/private/ \; &> /dev/null
+
+ install -d ${pkgdir}/usr/include/QtSql/private
+ cd ${srcdir}/$_pkgfqn/src/sql/
+ find . -name "*_p.h" -exec install -m644 {} \
+ ${pkgdir}/usr/include/QtSql/private/ \; &> /dev/null
+
+ install -d ${pkgdir}/usr/include/QtSvg/private
+ cd ${srcdir}/$_pkgfqn/src/svg/
+ find . -name "*_p.h" -exec install -m644 {} \
+ ${pkgdir}/usr/include/QtSvg/private/ \; &> /dev/null
+
+ install -d ${pkgdir}/usr/include/QtTest/private
+ cd ${srcdir}/$_pkgfqn/src/testlib/
+ find . -name "*_p.h" -exec install -m644 {} \
+ ${pkgdir}/usr/include/QtTest/private/ \; &> /dev/null
+
+ install -d ${pkgdir}/usr/include/QtUiTools/private
+ cd ${srcdir}/$_pkgfqn/tools/designer/src/uitools
+ find . -name "*_p.h" -exec install -m644 {} \
+ ${pkgdir}/usr/include/QtUiTools/private/ \; &> /dev/null
+
+ install -d ${pkgdir}/usr/include/QtWebKit/private
+ cd ${srcdir}/$_pkgfqn/src/3rdparty/webkit
+ find . -name "*_p.h" -exec install -m644 {} \
+ ${pkgdir}/usr/include/QtWebKit/private/ \; &> /dev/null
+
+ install -d ${pkgdir}/usr/include/QtXmlPatterns/private
+ cd ${srcdir}/$_pkgfqn/src/xmlpatterns/
+ find . -name "*_p.h" -exec install -m644 {} \
+ ${pkgdir}/usr/include/QtXmlPatterns/private/ \; &> /dev/null
+}
diff --git a/extra/qt/assistant.desktop b/extra/qt/assistant.desktop
new file mode 100644
index 000000000..a9e98c44b
--- /dev/null
+++ b/extra/qt/assistant.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Name=Qt Assistant
+Comment=Shows Qt documentation and examples
+Exec=/usr/bin/assistant
+Icon=assistant
+Terminal=false
+Encoding=UTF-8
+Type=Application
+Categories=Qt;Development;Documentation;
diff --git a/extra/qt/blacklist-fraudulent-comodo-certificates.patch b/extra/qt/blacklist-fraudulent-comodo-certificates.patch
new file mode 100644
index 000000000..bd2da5bb3
--- /dev/null
+++ b/extra/qt/blacklist-fraudulent-comodo-certificates.patch
@@ -0,0 +1,89 @@
+diff --git a/src/network/ssl/qsslcertificate.cpp b/src/network/ssl/qsslcertificate.cpp
+index 618ac79..a5cdf01 100644
+--- a/src/network/ssl/qsslcertificate.cpp
++++ b/src/network/ssl/qsslcertificate.cpp
+@@ -219,17 +219,19 @@ bool QSslCertificate::isNull() const
+ Returns true if this certificate is valid; otherwise returns
+ false.
+
+- Note: Currently, this function only checks that the current
++ Note: Currently, this function checks that the current
+ data-time is within the date-time range during which the
+- certificate is considered valid. No other checks are
+- currently performed.
++ certificate is considered valid, and checks that the
++ certificate is not in a blacklist of fraudulent certificates.
+
+ \sa isNull()
+ */
+ bool QSslCertificate::isValid() const
+ {
+ const QDateTime currentTime = QDateTime::currentDateTime();
+- return currentTime >= d->notValidBefore && currentTime <= d->notValidAfter;
++ return currentTime >= d->notValidBefore &&
++ currentTime <= d->notValidAfter &&
++ ! QSslCertificatePrivate::isBlacklisted(*this);
+ }
+
+ /*!
+@@ -798,6 +800,30 @@ QList<QSslCertificate> QSslCertificatePrivate::certificatesFromDer(const QByteAr
+ return certificates;
+ }
+
++// These certificates are known to be fraudulent and were created during the comodo
++// compromise. See http://www.comodo.com/Comodo-Fraud-Incident-2011-03-23.html
++static const char *certificate_blacklist[] = {
++ "04:7e:cb:e9:fc:a5:5f:7b:d0:9e:ae:36:e1:0c:ae:1e",
++ "f5:c8:6a:f3:61:62:f1:3a:64:f5:4f:6d:c9:58:7c:06",
++ "d7:55:8f:da:f5:f1:10:5b:b2:13:28:2b:70:77:29:a3",
++ "39:2a:43:4f:0e:07:df:1f:8a:a3:05:de:34:e0:c2:29",
++ "3e:75:ce:d4:6b:69:30:21:21:88:30:ae:86:a8:2a:71",
++ "e9:02:8b:95:78:e4:15:dc:1a:71:0a:2b:88:15:44:47",
++ "92:39:d5:34:8f:40:d1:69:5a:74:54:70:e1:f2:3f:43",
++ "b0:b7:13:3e:d0:96:f9:b5:6f:ae:91:c8:74:bd:3a:c0",
++ "d8:f3:5f:4e:b7:87:2b:2d:ab:06:92:e3:15:38:2f:b0",
++ 0
++};
++
++bool QSslCertificatePrivate::isBlacklisted(const QSslCertificate &certificate)
++{
++ for (int a = 0; certificate_blacklist[a] != 0; a++) {
++ if (certificate.serialNumber() == certificate_blacklist[a])
++ return true;
++ }
++ return false;
++}
++
+ #ifndef QT_NO_DEBUG_STREAM
+ QDebug operator<<(QDebug debug, const QSslCertificate &certificate)
+ {
+diff --git a/src/network/ssl/qsslcertificate_p.h b/src/network/ssl/qsslcertificate_p.h
+index cdceb0f..1ce33d3 100644
+--- a/src/network/ssl/qsslcertificate_p.h
++++ b/src/network/ssl/qsslcertificate_p.h
+@@ -96,6 +96,7 @@ public:
+ static QSslCertificate QSslCertificate_from_X509(X509 *x509);
+ static QList<QSslCertificate> certificatesFromPem(const QByteArray &pem, int count = -1);
+ static QList<QSslCertificate> certificatesFromDer(const QByteArray &der, int count = -1);
++ static bool isBlacklisted(const QSslCertificate &certificate);
+
+ friend class QSslSocketBackendPrivate;
+
+diff --git a/src/network/ssl/qsslsocket_openssl.cpp b/src/network/ssl/qsslsocket_openssl.cpp
+index 0866534..2427193 100644
+--- a/src/network/ssl/qsslsocket_openssl.cpp
++++ b/src/network/ssl/qsslsocket_openssl.cpp
+@@ -1193,6 +1193,13 @@ bool QSslSocketBackendPrivate::startHandshake()
+ X509 *x509 = q_SSL_get_peer_certificate(ssl);
+ configuration.peerCertificate = QSslCertificatePrivate::QSslCertificate_from_X509(x509);
+ q_X509_free(x509);
++ if (QSslCertificatePrivate::isBlacklisted(configuration.peerCertificate)) {
++ q->setErrorString(QSslSocket::tr("The peer certificate is blacklisted"));
++ q->setSocketError(QAbstractSocket::SslHandshakeFailedError);
++ emit q->error(QAbstractSocket::SslHandshakeFailedError);
++ plainSocket->disconnectFromHost();
++ return false;
++ }
+
+ // Start translating errors.
+ QList<QSslError> errors;
diff --git a/extra/qt/designer.desktop b/extra/qt/designer.desktop
new file mode 100644
index 000000000..9b7b6e9aa
--- /dev/null
+++ b/extra/qt/designer.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Name=Qt Designer
+GenericName=Interface Designer
+Comment=Design GUIs for Qt applications
+Exec=/usr/bin/designer
+Icon=designer
+MimeType=application/x-designer;
+Terminal=false
+Encoding=UTF-8
+Type=Application
+Categories=Qt;Development;
diff --git a/extra/qt/linguist.desktop b/extra/qt/linguist.desktop
new file mode 100644
index 000000000..8cbe86599
--- /dev/null
+++ b/extra/qt/linguist.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Name=Qt Linguist
+Comment=Add translations to Qt applications
+Exec=/usr/bin/linguist
+Icon=linguist
+MimeType=text/vnd.trolltech.linguist;application/x-linguist;
+Terminal=false
+Encoding=UTF-8
+Type=Application
+Categories=Qt;Development;
diff --git a/extra/qt/qt.install b/extra/qt/qt.install
new file mode 100644
index 000000000..81ce5c4b0
--- /dev/null
+++ b/extra/qt/qt.install
@@ -0,0 +1,12 @@
+post_install() {
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+ update-desktop-database -q
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/extra/qt/qtconfig.desktop b/extra/qt/qtconfig.desktop
new file mode 100644
index 000000000..46dcf9e3d
--- /dev/null
+++ b/extra/qt/qtconfig.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Name=Qt Config
+Comment=Configure Qt behavior, styles, fonts
+Exec=/usr/bin/qtconfig
+Icon=qtlogo
+Terminal=false
+Encoding=UTF-8
+Type=Application
+Categories=Qt;Settings;
+NoDisplay=true