From 167e1d1b4b9a7a188b14d2e3e818d8fd6f9707aa Mon Sep 17 00:00:00 2001 From: Britney Fransen Date: Thu, 4 Dec 2014 21:23:57 +0000 Subject: qt4: update to 4.8.6 rename qt to qt4 to get ready for qt5 --- abs/core/qt/PKGBUILD | 136 ---------------------------- abs/core/qt/__changelog | 2 - abs/core/qt/assistant.desktop | 9 -- abs/core/qt/designer.desktop | 11 --- abs/core/qt/fix-assistant-crash.patch | 12 --- abs/core/qt/improve-cups-support.patch | 84 ----------------- abs/core/qt/linguist.desktop | 10 -- abs/core/qt/qt.install | 12 --- abs/core/qt/qtconfig.desktop | 10 -- abs/core/qt4/CVE-2014-0190.patch | 32 +++++++ abs/core/qt4/PKGBUILD | 156 ++++++++++++++++++++++++++++++++ abs/core/qt4/__changelog | 3 + abs/core/qt4/assistant-qt4.desktop | 9 ++ abs/core/qt4/designer-qt4.desktop | 11 +++ abs/core/qt4/fix-assistant-crash.patch | 12 +++ abs/core/qt4/improve-cups-support.patch | 84 +++++++++++++++++ abs/core/qt4/linguist-qt4.desktop | 10 ++ abs/core/qt4/moc-boost-workaround.patch | 12 +++ abs/core/qt4/qdbusviewer-qt4.desktop | 10 ++ abs/core/qt4/qt4.install | 12 +++ abs/core/qt4/qtconfig-qt4.desktop | 9 ++ 21 files changed, 360 insertions(+), 286 deletions(-) delete mode 100644 abs/core/qt/PKGBUILD delete mode 100644 abs/core/qt/__changelog delete mode 100644 abs/core/qt/assistant.desktop delete mode 100644 abs/core/qt/designer.desktop delete mode 100644 abs/core/qt/fix-assistant-crash.patch delete mode 100644 abs/core/qt/improve-cups-support.patch delete mode 100644 abs/core/qt/linguist.desktop delete mode 100644 abs/core/qt/qt.install delete mode 100644 abs/core/qt/qtconfig.desktop create mode 100644 abs/core/qt4/CVE-2014-0190.patch create mode 100644 abs/core/qt4/PKGBUILD create mode 100644 abs/core/qt4/__changelog create mode 100644 abs/core/qt4/assistant-qt4.desktop create mode 100644 abs/core/qt4/designer-qt4.desktop create mode 100644 abs/core/qt4/fix-assistant-crash.patch create mode 100644 abs/core/qt4/improve-cups-support.patch create mode 100644 abs/core/qt4/linguist-qt4.desktop create mode 100644 abs/core/qt4/moc-boost-workaround.patch create mode 100644 abs/core/qt4/qdbusviewer-qt4.desktop create mode 100644 abs/core/qt4/qt4.install create mode 100644 abs/core/qt4/qtconfig-qt4.desktop diff --git a/abs/core/qt/PKGBUILD b/abs/core/qt/PKGBUILD deleted file mode 100644 index 8c0d260..0000000 --- a/abs/core/qt/PKGBUILD +++ /dev/null @@ -1,136 +0,0 @@ -# $Id: PKGBUILD 162529 2012-06-27 06:33:44Z andrea $ -# Maintainer: Andrea Scarpino -# Contributor: Pierre Schmitz - -pkgbase=qt -pkgname=('qt' 'qt-private-headers') -pkgver=4.8.2 -pkgrel=3 -arch=('i686' 'x86_64') -url='http://qt-project.org/' -license=('GPL3' 'LGPL') -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' - 'mysql' 'unixodbc' 'gtk2' ) -options=('!libtool') -_pkgfqn="${pkgbase}-everywhere-opensource-src-${pkgver}" -source=("http://releases.qt-project.org/qt4/source/${_pkgfqn}.tar.gz" - 'assistant.desktop' 'designer.desktop' 'linguist.desktop' - 'qtconfig.desktop' - 'improve-cups-support.patch' - 'fix-assistant-crash.patch') -md5sums=('3c1146ddf56247e16782f96910a8423b' - 'fc211414130ab2764132e7370f8e5caa' - '85179f5e0437514f8639957e1d8baf62' - 'f11852b97583610f3dbb669ebc3e21bc' - '6b771c8a81dd90b45e8a79afa0e5bbfd' - 'c439c7731c25387352d8453ca7574971' - 'e9c11e4606b7f55ae405e3e76f863dc1') - -build() { - cd "${srcdir}"/${_pkgfqn} - - # (FS#28381) (KDEBUG#180051) - patch -p1 -i "${srcdir}"/improve-cups-support.patch - - patch -p1 -i "${srcdir}"/fix-assistant-crash.patch - - export QT4DIR="${srcdir}"/${_pkgfqn} - export LD_LIBRARY_PATH=${QT4DIR}/lib:${LD_LIBRARY_PATH} - - 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 - - ./configure -v -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/xdg \ - -examplesdir /usr/share/doc/qt/examples \ - -demosdir /usr/share/doc/qt/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 - make -} - -package_qt() { - pkgdesc='A cross-platform application and UI framework' - 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' - 'libmysqlclient: MySQL driver' - 'unixodbc: ODBC driver' - 'libfbclient: Firebird/iBase 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/{QtCore,QtDeclarative,QtGui,QtScript} - install -d "${pkgdir}"/usr/src/{corelib,declarative,gui,script} - - for i in QtCore QtDeclarative QtGui QtScript; do - cp -r "${srcdir}"/${_pkgfqn}/include/${i}/private/ \ - "${pkgdir}"/usr/include/${i}/ - done - - for i in corelib declarative gui script; do - cp -r "${srcdir}"/${_pkgfqn}/src/${i} "${pkgdir}"/usr/src/ - done -} diff --git a/abs/core/qt/__changelog b/abs/core/qt/__changelog deleted file mode 100644 index 5e878fe..0000000 --- a/abs/core/qt/__changelog +++ /dev/null @@ -1,2 +0,0 @@ -remove cups support, postgresql libs -libfbclient diff --git a/abs/core/qt/assistant.desktop b/abs/core/qt/assistant.desktop deleted file mode 100644 index a9e98c4..0000000 --- a/abs/core/qt/assistant.desktop +++ /dev/null @@ -1,9 +0,0 @@ -[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/abs/core/qt/designer.desktop b/abs/core/qt/designer.desktop deleted file mode 100644 index 9b7b6e9..0000000 --- a/abs/core/qt/designer.desktop +++ /dev/null @@ -1,11 +0,0 @@ -[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/abs/core/qt/fix-assistant-crash.patch b/abs/core/qt/fix-assistant-crash.patch deleted file mode 100644 index 67bbbc4..0000000 --- a/abs/core/qt/fix-assistant-crash.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- 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/qt/improve-cups-support.patch b/abs/core/qt/improve-cups-support.patch deleted file mode 100644 index e0305e1..0000000 --- a/abs/core/qt/improve-cups-support.patch +++ /dev/null @@ -1,84 +0,0 @@ -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/qt/linguist.desktop b/abs/core/qt/linguist.desktop deleted file mode 100644 index 8cbe865..0000000 --- a/abs/core/qt/linguist.desktop +++ /dev/null @@ -1,10 +0,0 @@ -[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/abs/core/qt/qt.install b/abs/core/qt/qt.install deleted file mode 100644 index 5495fb1..0000000 --- a/abs/core/qt/qt.install +++ /dev/null @@ -1,12 +0,0 @@ -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/qt/qtconfig.desktop b/abs/core/qt/qtconfig.desktop deleted file mode 100644 index 46dcf9e..0000000 --- a/abs/core/qt/qtconfig.desktop +++ /dev/null @@ -1,10 +0,0 @@ -[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 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 +# Contributor: Pierre Schmitz + +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 -- cgit v0.12