summaryrefslogtreecommitdiffstats
path: root/abs/core/qt4
diff options
context:
space:
mode:
Diffstat (limited to 'abs/core/qt4')
-rw-r--r--abs/core/qt4/CVE-2014-0190.patch32
-rw-r--r--abs/core/qt4/PKGBUILD156
-rw-r--r--abs/core/qt4/__changelog3
-rw-r--r--abs/core/qt4/assistant-qt4.desktop9
-rw-r--r--abs/core/qt4/designer-qt4.desktop11
-rw-r--r--abs/core/qt4/fix-assistant-crash.patch12
-rw-r--r--abs/core/qt4/improve-cups-support.patch84
-rw-r--r--abs/core/qt4/linguist-qt4.desktop10
-rw-r--r--abs/core/qt4/moc-boost-workaround.patch12
-rw-r--r--abs/core/qt4/qdbusviewer-qt4.desktop10
-rw-r--r--abs/core/qt4/qt4.install12
-rw-r--r--abs/core/qt4/qtconfig-qt4.desktop9
12 files changed, 360 insertions, 0 deletions
diff --git a/abs/core/qt4/CVE-2014-0190.patch b/abs/core/qt4/CVE-2014-0190.patch
new file mode 100644
index 0000000..e97ee7b
--- /dev/null
+++ b/abs/core/qt4/CVE-2014-0190.patch
@@ -0,0 +1,32 @@
+Don't crash on broken GIF images
+
+Broken GIF images could set invalid width and height
+values inside the image, leading to Qt creating a null
+QImage for it. In that case we need to abort decoding
+the image and return an error.
+
+Initial patch by Rich Moore.
+
+Backport of Id82a4036f478bd6e49c402d6598f57e7e5bb5e1e from Qt 5
+
+Task-number: QTBUG-38367
+Change-Id: I0680740018aaa8356d267b7af3f01fac3697312a
+Security-advisory: CVE-2014-0190
+
+diff -up qt-everywhere-opensource-src-4.8.6/src/gui/image/qgifhandler.cpp.QTBUG-38367 qt-everywhere-opensource-src-4.8.6/src/gui/image/qgifhandler.cpp
+--- qt-everywhere-opensource-src-4.8.6/src/gui/image/qgifhandler.cpp.QTBUG-38367 2014-04-10 13:37:12.000000000 -0500
++++ qt-everywhere-opensource-src-4.8.6/src/gui/image/qgifhandler.cpp 2014-04-24 15:58:54.515862458 -0500
+@@ -359,6 +359,13 @@ int QGIFFormat::decode(QImage *image, co
+ memset(bits, 0, image->byteCount());
+ }
+
++ // Check if the previous attempt to create the image failed. If it
++ // did then the image is broken and we should give up.
++ if (image->isNull()) {
++ state = Error;
++ return -1;
++ }
++
+ disposePrevious(image);
+ disposed = false;
+
diff --git a/abs/core/qt4/PKGBUILD b/abs/core/qt4/PKGBUILD
new file mode 100644
index 0000000..f045f76
--- /dev/null
+++ b/abs/core/qt4/PKGBUILD
@@ -0,0 +1,156 @@
+# $Id$
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+# Contributor: Pierre Schmitz <pierre@archlinux.de>
+
+pkgname=qt4
+pkgver=4.8.6
+pkgrel=3
+arch=('i686' 'x86_64')
+url='http://qt-project.org/'
+license=('GPL3' 'LGPL' 'FDL' 'custom')
+pkgdesc='A cross-platform application and UI framework'
+depends=('libtiff' 'libpng' 'sqlite' 'ca-certificates' 'dbus'
+ 'fontconfig' 'libgl' 'libxrandr' 'libxv' 'libxi' 'alsa-lib'
+ 'xdg-utils' 'hicolor-icon-theme' 'desktop-file-utils' 'libmng')
+makedepends=('mysql' 'unixodbc' 'gtk2'
+ 'mesa')
+optdepends=('qtchooser: set the default Qt toolkit'
+ 'libmysqlclient: mysql driver'
+ 'unixodbc: ODBC driver'
+ 'libfbclient: Firebird/iBase driver'
+ 'libxinerama: Xinerama support'
+ 'libxcursor: Xcursor support'
+ 'libxfixes: Xfixes support'
+ 'icu: Unicode support')
+install="${pkgname}.install"
+replaces=('qt<=4.8.4')
+conflicts=('qt')
+options=('staticlibs') # libQtUiTools builds as static only
+_pkgfqn="qt-everywhere-opensource-src-${pkgver}"
+source=("http://download.qt-project.org/official_releases/qt/4.8/${pkgver}/${_pkgfqn}.tar.gz"
+ 'qtconfig-qt4.desktop' 'assistant-qt4.desktop' 'designer-qt4.desktop'
+ 'linguist-qt4.desktop' 'qdbusviewer-qt4.desktop'
+ 'improve-cups-support.patch'
+ 'moc-boost-workaround.patch'
+ 'CVE-2014-0190.patch')
+md5sums=('2edbe4d6c2eff33ef91732602f3518eb'
+ 'a16638f4781e56e7887ff8212a322ecc'
+ '8a28b3f52dbeb685d4b69440b520a3e1'
+ '9727c406c240990870c905696a8c5bd1'
+ '0e384663d3dd32abe35f5331c4147569'
+ 'b859c5673e5098c39f72b2252947049e'
+ 'c439c7731c25387352d8453ca7574971'
+ 'da387bde22ae1c446f12525d2a31f070'
+ '34ed257109afb83342cfe514c8abe027')
+
+prepare() {
+ cd ${_pkgfqn}
+
+ # (FS#28381) (KDEBUG#180051)
+ patch -p1 -i "${srcdir}"/improve-cups-support.patch
+
+ # QTBUG#22829
+ patch -p1 -i "${srcdir}"/moc-boost-workaround.patch
+
+ # QTBUG#38367
+ patch -p1 -i "${srcdir}"/CVE-2014-0190.patch
+
+ sed -i "s|-O2|${CXXFLAGS}|" mkspecs/common/{g++,gcc}-base.conf
+ sed -i "/^QMAKE_LFLAGS_RPATH/s| -Wl,-rpath,||g" mkspecs/common/gcc-base-unix.conf
+ sed -i "/^QMAKE_LFLAGS\s/s|+=|+= ${LDFLAGS}|g" mkspecs/common/gcc-base.conf
+
+ cp mkspecs/common/linux{,32}.conf
+ sed -i "/^QMAKE_LIBDIR\s/s|=|= /usr/lib32|g" mkspecs/common/linux32.conf
+ sed -i "s|common/linux.conf|common/linux32.conf|" mkspecs/linux-g++-32/qmake.conf
+}
+
+build() {
+ export QT4DIR="${srcdir}"/${_pkgfqn}
+ export LD_LIBRARY_PATH=${QT4DIR}/lib:${LD_LIBRARY_PATH}
+
+ cd ${_pkgfqn}
+
+ ./configure -confirm-license -opensource \
+ -prefix /usr \
+ -bindir /usr/lib/qt4/bin \
+ -headerdir /usr/include/qt4 \
+ -docdir /usr/share/doc/qt4 \
+ -plugindir /usr/lib/qt4/plugins \
+ -importdir /usr/lib/qt4/imports \
+ -datadir /usr/share/qt4 \
+ -translationdir /usr/share/qt4/translations \
+ -sysconfdir /etc/xdg \
+ -examplesdir /usr/share/doc/qt4/examples \
+ -demosdir /usr/share/doc/qt4/demos \
+ -plugin-sql-{mysql,sqlite,odbc} \
+ -system-sqlite \
+ -no-phonon \
+ -no-phonon-backend \
+ -no-webkit \
+ -graphicssystem raster \
+ -openssl-linked \
+ -nomake demos \
+ -nomake examples \
+ -nomake docs \
+ -silent \
+ -no-rpath \
+ -optimized-qmake \
+ -reduce-relocations \
+ -dbus-linked \
+ -no-openvg \
+ -v
+ make
+}
+
+package() {
+ cd ${_pkgfqn}
+ make INSTALL_ROOT="${pkgdir}" install
+
+ # install missing icons and desktop files
+ install -D -m644 src/gui/dialogs/images/qtlogo-64.png \
+ "${pkgdir}"/usr/share/icons/hicolor/64x64/apps/qt4logo.png
+ install -D -m644 tools/assistant/tools/assistant/images/assistant.png \
+ "${pkgdir}"/usr/share/icons/hicolor/32x32/apps/assistant-qt4.png
+ install -D -m644 tools/assistant/tools/assistant/images/assistant-128.png \
+ "${pkgdir}"/usr/share/icons/hicolor/128x128/apps/assistant-qt4.png
+ install -D -m644 tools/designer/src/designer/images/designer.png \
+ "${pkgdir}"/usr/share/icons/hicolor/128x128/apps/designer-qt4.png
+ for icon in tools/linguist/linguist/images/icons/linguist-*-32.png ; do
+ size=$(echo $(basename ${icon}) | cut -d- -f2)
+ install -D -m644 ${icon} \
+ "${pkgdir}"/usr/share/icons/hicolor/${size}x${size}/apps/linguist-qt4.png
+ done
+ install -D -m644 tools/qdbus/qdbusviewer/images/qdbusviewer.png \
+ "${pkgdir}"/usr/share/icons/hicolor/32x32/apps/qdbusviewer-qt4.png
+ install -D -m644 tools/qdbus/qdbusviewer/images/qdbusviewer-128.png \
+ "${pkgdir}"/usr/share/icons/hicolor/128x128/apps/qdbusviewer-qt4.png
+
+ install -d "${pkgdir}"/usr/share/applications
+ install -m644 "${srcdir}"/{assistant,designer,linguist,qtconfig,qdbusviewer}-qt4.desktop \
+ "${pkgdir}"/usr/share/applications/
+
+ # Useful symlinks for cmake and configure scripts
+ install -d "${pkgdir}"/usr/bin
+ for b in "${pkgdir}"/usr/lib/qt4/bin/*; do
+ ln -s /usr/lib/qt4/bin/$(basename $b) "${pkgdir}"/usr/bin/$(basename $b)-qt4
+ done
+
+ # install license addition
+ install -D -m644 LGPL_EXCEPTION.txt \
+ ${pkgdir}/usr/share/licenses/${pkgname}/LGPL_EXCEPTION.txt
+
+ # Fix wrong libs path in pkgconfig files
+ find "${pkgdir}/usr/lib/pkgconfig" -type f -name '*.pc' \
+ -exec perl -pi -e "s, -L${srcdir}/?\S+,,g" {} \;
+
+ # Fix wrong bins path in pkgconfig files
+ find "${pkgdir}/usr/lib/pkgconfig" -type f -name '*.pc' \
+ -exec sed -i 's|/usr/bin/|/usr/lib/qt4/bin/|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/' {} \;
+
+ # The TGA plugin is broken (FS#33568)
+ rm "${pkgdir}"/usr/lib/qt4/plugins/imageformats/libqtga.so
+}
diff --git a/abs/core/qt4/__changelog b/abs/core/qt4/__changelog
new file mode 100644
index 0000000..e9a8775
--- /dev/null
+++ b/abs/core/qt4/__changelog
@@ -0,0 +1,3 @@
+PKGBUILD: remove deps cups, postgresql-libs, libfbclient
+ change mariadb to mysql
+ change ./configure option to -plugin-sql-{mysql,sqlite,odbc}
diff --git a/abs/core/qt4/assistant-qt4.desktop b/abs/core/qt4/assistant-qt4.desktop
new file mode 100644
index 0000000..d874d61
--- /dev/null
+++ b/abs/core/qt4/assistant-qt4.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Name=Qt4 Assistant
+Comment=Shows Qt4 documentation and examples
+Exec=assistant-qt4
+Icon=assistant-qt4
+Terminal=false
+Encoding=UTF-8
+Type=Application
+Categories=Qt;Development;Documentation;
diff --git a/abs/core/qt4/designer-qt4.desktop b/abs/core/qt4/designer-qt4.desktop
new file mode 100644
index 0000000..86ea4ed
--- /dev/null
+++ b/abs/core/qt4/designer-qt4.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Name=Qt4 Designer
+GenericName=Interface Designer
+Comment=Design GUIs for Qt4 applications
+Exec=designer-qt4
+Icon=designer-qt4
+MimeType=application/x-designer;
+Terminal=false
+Encoding=UTF-8
+Type=Application
+Categories=Qt;Development;
diff --git a/abs/core/qt4/fix-assistant-crash.patch b/abs/core/qt4/fix-assistant-crash.patch
new file mode 100644
index 0000000..67bbbc4
--- /dev/null
+++ b/abs/core/qt4/fix-assistant-crash.patch
@@ -0,0 +1,12 @@
+--- qt-everywhere-opensource-src-4.8.2/tools/assistant/tools/assistant/mainwindow.cpp 2012-06-26 17:37:47.334536023 +0000
++++ qt-everywhere-opensource-src-4.8.2/tools/assistant/tools/assistant/mainwindow.cpp~ 2012-06-26 17:37:08.531487286 +0000
+@@ -944,8 +944,7 @@
+ if (helpEngine.usesAppFont())
+ font = helpEngine.appFont();
+
+- const QWidgetList &widgets = qApp->allWidgets();
+- foreach (QWidget* widget, widgets)
++ foreach (QWidget* widget, QApplication::allWidgets())
+ widget->setFont(font);
+ }
+
diff --git a/abs/core/qt4/improve-cups-support.patch b/abs/core/qt4/improve-cups-support.patch
new file mode 100644
index 0000000..e0305e1
--- /dev/null
+++ b/abs/core/qt4/improve-cups-support.patch
@@ -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
+ }
+
+ /*!
diff --git a/abs/core/qt4/linguist-qt4.desktop b/abs/core/qt4/linguist-qt4.desktop
new file mode 100644
index 0000000..765c882
--- /dev/null
+++ b/abs/core/qt4/linguist-qt4.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Name=Qt4 Linguist
+Comment=Add translations to Qt4 applications
+Exec=linguist-qt4
+Icon=linguist-qt4
+MimeType=text/vnd.trolltech.linguist;application/x-linguist;
+Terminal=false
+Encoding=UTF-8
+Type=Application
+Categories=Qt;Development;
diff --git a/abs/core/qt4/moc-boost-workaround.patch b/abs/core/qt4/moc-boost-workaround.patch
new file mode 100644
index 0000000..027f806
--- /dev/null
+++ b/abs/core/qt4/moc-boost-workaround.patch
@@ -0,0 +1,12 @@
+diff -upr qt-everywhere-opensource-src-4.8.6.orig/src/tools/moc/main.cpp qt-everywhere-opensource-src-4.8.6/src/tools/moc/main.cpp
+--- qt-everywhere-opensource-src-4.8.6.orig/src/tools/moc/main.cpp 2014-04-10 21:37:12.000000000 +0300
++++ qt-everywhere-opensource-src-4.8.6/src/tools/moc/main.cpp 2014-11-06 02:24:44.287305916 +0200
+@@ -190,6 +190,8 @@ int runMoc(int _argc, char **_argv)
+
+ // Workaround a bug while parsing the boost/type_traits/has_operator.hpp header. See QTBUG-22829
+ pp.macros["BOOST_TT_HAS_OPERATOR_HPP_INCLUDED"];
++ pp.macros["BOOST_LEXICAL_CAST_INCLUDED"];
++ pp.macros["BOOST_NEXT_PRIOR_HPP_INCLUDED"];
+
+ QByteArray filename;
+ QByteArray output;
diff --git a/abs/core/qt4/qdbusviewer-qt4.desktop b/abs/core/qt4/qdbusviewer-qt4.desktop
new file mode 100644
index 0000000..2d4218c
--- /dev/null
+++ b/abs/core/qt4/qdbusviewer-qt4.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Name=Qt4 QDbusViewer
+GenericName=D-Bus Debugger
+Comment=Debug D-Bus applications
+Exec=qdbusviewer-qt4
+Icon=qdbusviewer-qt4
+Terminal=false
+Type=Application
+Categories=Qt;Development;Debugger;
+
diff --git a/abs/core/qt4/qt4.install b/abs/core/qt4/qt4.install
new file mode 100644
index 0000000..5495fb1
--- /dev/null
+++ b/abs/core/qt4/qt4.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/abs/core/qt4/qtconfig-qt4.desktop b/abs/core/qt4/qtconfig-qt4.desktop
new file mode 100644
index 0000000..5789631
--- /dev/null
+++ b/abs/core/qt4/qtconfig-qt4.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Name=Qt4 Config
+Comment=Configure Qt4 behavior, styles, fonts
+Exec=qtconfig-qt4
+Icon=qt4logo
+Terminal=false
+Type=Application
+Categories=Qt;Settings;
+NoDisplay=true