diff options
Diffstat (limited to 'extra/qt4')
-rw-r--r-- | extra/qt4/PKGBUILD | 132 | ||||
-rw-r--r-- | extra/qt4/assistant-qt4.desktop | 9 | ||||
-rw-r--r-- | extra/qt4/declarative-fix-sigbus.patch | 33 | ||||
-rw-r--r-- | extra/qt4/designer-qt4.desktop | 11 | ||||
-rw-r--r-- | extra/qt4/improve-cups-support.patch | 84 | ||||
-rw-r--r-- | extra/qt4/linguist-qt4.desktop | 10 | ||||
-rw-r--r-- | extra/qt4/qt4.install | 12 | ||||
-rw-r--r-- | extra/qt4/qtconfig-qt4.desktop | 9 |
8 files changed, 300 insertions, 0 deletions
diff --git a/extra/qt4/PKGBUILD b/extra/qt4/PKGBUILD new file mode 100644 index 000000000..62851cbea --- /dev/null +++ b/extra/qt4/PKGBUILD @@ -0,0 +1,132 @@ +# $Id: PKGBUILD 180689 2013-03-25 19:15:41Z bpiotrowski $ +# Maintainer: Andrea Scarpino <andrea@archlinux.org> +# Contributor: Pierre Schmitz <pierre@archlinux.de> + +pkgname=qt4 +pkgver=4.8.4 +pkgrel=16 +arch=('i686' 'x86_64' 'mips64el') +url='http://qt-project.org/' +license=('GPL3' 'LGPL') +pkgdesc='A cross-platform application and UI framework' +depends=('libtiff' 'libpng' 'libmng' 'sqlite' 'ca-certificates' 'dbus' + 'fontconfig' 'libgl' 'libxrandr' 'libxv' 'libxi' 'alsa-lib' + 'xdg-utils' 'hicolor-icon-theme' 'desktop-file-utils') +makedepends=('postgresql-libs' 'mariadb' 'unixodbc' 'cups' 'gtk2' + 'mesa-libgl') +optdepends=('postgresql-libs: PostgreSQL driver' + 'libmariadbclient: MariaDB driver' + 'unixodbc: ODBC driver' + 'libxinerama: Xinerama support' + 'libxcursor: Xcursor support' + 'libxfixes: Xfixes support' + 'icu: Unicode support') +if [ "$CARCH" != "mips64el" ]; then + makedepends+=('libfbclient') + optdepends+=('libfbclient: Firebird/iBase driver') +fi +install="${pkgname}.install" +options=('!libtool') +replaces=('qt<=4.8.4') +conflicts=('qt') +_pkgfqn="qt-everywhere-opensource-src-${pkgver}" +source=("http://releases.qt-project.org/${pkgname}/source/${_pkgfqn}.tar.gz" + 'qtconfig-qt4.desktop' 'assistant-qt4.desktop' 'designer-qt4.desktop' 'linguist-qt4.desktop' + 'improve-cups-support.patch' + 'declarative-fix-sigbus.patch') +md5sums=('89c5ecba180cae74c66260ac732dc5cb' + 'a16638f4781e56e7887ff8212a322ecc' + '4f0152ba6d645e81218b23ba8beeb42d' + '283a00ff7f662dca481b70d6daa826e0' + '027683880235708d4bc270a7ef961183' + 'c439c7731c25387352d8453ca7574971' + 'aac963d05a9d5733e2bfce9e26607f51') + +build() { + cd ${_pkgfqn} + + # (FS#28381) (KDEBUG#180051) + patch -p1 -i "${srcdir}"/improve-cups-support.patch + + # MIPS N32-specific fix, shouldn't affect correctness on other platforms. + patch -Np1 -i "${srcdir}/declarative-fix-sigbus.patch" + + export QT4DIR="${srcdir}"/${_pkgfqn} + export LD_LIBRARY_PATH=${QT4DIR}/lib:${LD_LIBRARY_PATH} + + [ "${CARCH}" = "mips64el" ] && export CXXFLAGS="${CXXFLAGS} -fpermissive" + + 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 + + [ "$CARCH" != "mips64el" ] && extra="-plugin-sql-ibase" + + ./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-{psql,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 \ + $extra + 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 "${pkgdir}"/usr/share/applications + install -m644 "${srcdir}"/{assistant,designer,linguist,qtconfig}-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/extra/qt4/assistant-qt4.desktop b/extra/qt4/assistant-qt4.desktop new file mode 100644 index 000000000..d2904beb2 --- /dev/null +++ b/extra/qt4/assistant-qt4.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Name=Qt4 Assistant +Comment=Shows Qt4 documentation and examples +Exec=assistant-qt4 +Icon=assistant +Terminal=false +Encoding=UTF-8 +Type=Application +Categories=Qt;Development;Documentation; diff --git a/extra/qt4/declarative-fix-sigbus.patch b/extra/qt4/declarative-fix-sigbus.patch new file mode 100644 index 000000000..0d446fce5 --- /dev/null +++ b/extra/qt4/declarative-fix-sigbus.patch @@ -0,0 +1,33 @@ +--- qt-everywhere-opensource-src-4.8.0.orig/src/declarative/qml/qdeclarativevmemetaobject.cpp 2012-02-04 21:23:56.573395948 +0100 ++++ qt-everywhere-opensource-src-4.8.0/src/declarative/qml/qdeclarativevmemetaobject.cpp 2012-02-04 23:32:44.900073230 +0100 +@@ -39,6 +39,7 @@ + ** + ****************************************************************************/ + ++#include <cstring> + #include "private/qdeclarativevmemetaobject_p.h" + + #include "qdeclarative.h" +@@ -191,10 +192,12 @@ + + double QDeclarativeVMEVariant::asDouble() + { ++ double result; + if (type != QMetaType::Double) + setValue(double(0)); + +- return *(double *)(dataPtr()); ++ std::memcpy(&result, (double *)(dataPtr()), sizeof(result)); ++ return result; + } + + const QString &QDeclarativeVMEVariant::asQString() +@@ -298,7 +301,7 @@ + cleanup(); + type = QMetaType::Double; + } +- *(double *)(dataPtr()) = v; ++ std::memcpy((double *)(dataPtr()), &v, sizeof(v)); + } + + void QDeclarativeVMEVariant::setValue(const QString &v) diff --git a/extra/qt4/designer-qt4.desktop b/extra/qt4/designer-qt4.desktop new file mode 100644 index 000000000..514146e78 --- /dev/null +++ b/extra/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 +MimeType=application/x-designer; +Terminal=false +Encoding=UTF-8 +Type=Application +Categories=Qt;Development; diff --git a/extra/qt4/improve-cups-support.patch b/extra/qt4/improve-cups-support.patch new file mode 100644 index 000000000..e0305e11b --- /dev/null +++ b/extra/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/extra/qt4/linguist-qt4.desktop b/extra/qt4/linguist-qt4.desktop new file mode 100644 index 000000000..61036b307 --- /dev/null +++ b/extra/qt4/linguist-qt4.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Name=Qt4 Linguist +Comment=Add translations to Qt4 applications +Exec=linguist-qt4 +Icon=linguist +MimeType=text/vnd.trolltech.linguist;application/x-linguist; +Terminal=false +Encoding=UTF-8 +Type=Application +Categories=Qt;Development; diff --git a/extra/qt4/qt4.install b/extra/qt4/qt4.install new file mode 100644 index 000000000..5495fb1b5 --- /dev/null +++ b/extra/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/extra/qt4/qtconfig-qt4.desktop b/extra/qt4/qtconfig-qt4.desktop new file mode 100644 index 000000000..578963124 --- /dev/null +++ b/extra/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 |