[arch-commits] Commit in qt5/trunk (PKGBUILD gcc48.patch use-python2.patch)

Andrea Scarpino andrea at nymeria.archlinux.org
Thu Apr 11 10:21:50 UTC 2013


    Date: Thursday, April 11, 2013 @ 12:21:49
  Author: andrea
Revision: 182618

Upstream release; ship docs and examples again; move binaries in /usr/lib/qt/bin so people can use qtchooser

Added:
  qt5/trunk/gcc48.patch
Modified:
  qt5/trunk/PKGBUILD
  qt5/trunk/use-python2.patch

-------------------+
 PKGBUILD          |   78 +++++++++++++++++++++++++++++++++++++++++++++++-----
 gcc48.patch       |   63 ++++++++++++++++++++++++++++++++++++++++++
 use-python2.patch |   11 +++++++
 3 files changed, 145 insertions(+), 7 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2013-04-11 10:02:01 UTC (rev 182617)
+++ PKGBUILD	2013-04-11 10:21:49 UTC (rev 182618)
@@ -4,6 +4,7 @@
 pkgbase=qt5
 pkgname=('qt5-base'
          'qt5-declarative'
+         'qt5-doc'
          'qt5-graphicaleffects'
          'qt5-imageformats'
          'qt5-jsbackend'
@@ -15,8 +16,8 @@
          'qt5-translations'
          'qt5-webkit'
          'qt5-xmlpatterns')
-pkgver=5.0.1
-pkgrel=10
+pkgver=5.0.2
+pkgrel=1
 arch=('i686' 'x86_64')
 url='http://qt-project.org/'
 license=('GPL3' 'LGPL')
@@ -31,12 +32,13 @@
 _pkgfqn="qt-everywhere-opensource-src-${pkgver}"
 source=("http://releases.qt-project.org/${pkgbase}/${pkgver}/single/${_pkgfqn}.tar.xz"
         'assistant.desktop' 'designer.desktop' 'linguist.desktop'
-        'use-python2.patch')
-md5sums=('00a577bd88e682d1b4d01d41d1d699cf'
+        'use-python2.patch' 'gcc48.patch')
+md5sums=('2cab3518d86fe8f0638c7faea8b46397'
          'f1837a03fd0ebbd2da58975845f278e3'
          '480fea1ed076992b688373c8db274be0'
          '5595c24d5bb942c21e3a4d299e6d0bf1'
-         'ec3133b093550f16a21bb91e5f0f2943')
+         'd6ab43fb371be494e3bfd9b210c40bf1'
+         '7927028e2374321c78a76df858e723d6')
 
 build() {
   cd ${_pkgfqn}
@@ -54,10 +56,16 @@
     -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \
     $(find . -name '*.py')
 
+  # GCC 4.8 fixes
+  cd qtbase
+  patch -p1 -i "${srcdir}"/gcc48.patch
+  cd ../
+
   ./configure -confirm-license -opensource \
     -prefix /usr \
+    -bindir /usr/lib/qt/bin \
     -docdir /usr/share/doc/qt \
-    -headerdir /usr/include/qt5 \
+    -headerdir /usr/include/qt \
     -archdatadir /usr/lib/qt \
     -datadir /usr/share/qt \
     -sysconfdir /etc/xdg \
@@ -74,13 +82,25 @@
     -reduce-relocations
 
   make
+
+  # build docs
+  make docs
+
+  # build examples
+  for m in qtbase qtdeclarative qtmultimedia qtquick1 qtscript qtsvg qttools \
+    qtwebkit-examples-and-demos qtxmlpatterns; do
+    cd ${m}/examples
+    ${QTDIR}/qmake
+    make
+  cd ../../
+  done
 }
 
 package_qt5-base() {
   pkgdesc='A cross-platform application and UI framework'
   depends=('libjpeg-turbo' 'xcb-util-keysyms' 'libgl' 'dbus' 'fontconfig' 'systemd'
            'xcb-util-wm' 'libxrender' 'libxi' 'sqlite' 'libpng' 'xcb-util-image'
-           'hicolor-icon-theme' 'xdg-utils' 'icu')
+           'hicolor-icon-theme' 'xdg-utils' 'icu' 'qtchooser')
   optdepends=('postgresql-libs: PostgreSQL driver'
               'libmariadbclient: MariaDB driver'
               'unixodbc: ODBC driver'
@@ -102,6 +122,12 @@
   # Fix wrong qmake path in pri file
   sed -i "s|${srcdir}/${_pkgfqn}/qtbase|/usr|" \
     "${pkgdir}"/usr/lib/qt/mkspecs/modules/qt_lib_bootstrap.pri
+
+  # Useful symlinks
+  install -d "${pkgdir}"/usr/bin
+  for b in "${pkgdir}"/usr/lib/qt/bin/*; do
+    ln -s /usr/lib/qt/bin/$(basename $b) "${pkgdir}"/usr/bin/$(basename $b)-qt5
+  done
 }
 
 package_qt5-declarative() {
@@ -115,8 +141,34 @@
   # 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/' {} \;
+  
+  # Useful symlinks
+  install -d "${pkgdir}"/usr/bin
+  for b in "${pkgdir}"/usr/lib/qt/bin/*; do
+    ln -s /usr/lib/qt/bin/$(basename $b) "${pkgdir}"/usr/bin/$(basename $b)-qt5
+  done
 }
 
+package_qt5-doc() {
+  pkgdesc='A cross-platform application and UI framework (Documentation and Examples)'
+  depends=('qt5-base')
+  conflicts=('qt-doc')
+  replaces=('qt-doc')
+  provides=('qt-doc')
+  options=('docs')
+  groups=()
+
+  cd ${_pkgfqn}
+  make INSTALL_ROOT="${pkgdir}" install_docs
+
+  for m in qtbase qtdeclarative qtmultimedia qtquick1 qtscript qtsvg qttools \
+    qtwebkit-examples-and-demos qtxmlpatterns; do
+    cd ${m}/examples
+    make INSTALL_ROOT="${pkgdir}" install
+    cd ../../
+  done
+}
+
 package_qt5-jsbackend() {
   pkgdesc='A cross-platform application and UI framework (QtV8)'
   depends=('qt5-base')
@@ -140,6 +192,12 @@
   # 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/' {} \;
+  
+  # Useful symlinks
+  install -d "${pkgdir}"/usr/bin
+  for b in "${pkgdir}"/usr/lib/qt/bin/*; do
+    ln -s /usr/lib/qt/bin/$(basename $b) "${pkgdir}"/usr/bin/$(basename $b)-qt5
+  done
 }
 
 package_qt5-translations() {
@@ -250,6 +308,12 @@
   # 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/' {} \;
+  
+  # Useful symlinks
+  install -d "${pkgdir}"/usr/bin
+  for b in "${pkgdir}"/usr/lib/qt/bin/*; do
+    ln -s /usr/lib/qt/bin/$(basename $b) "${pkgdir}"/usr/bin/$(basename $b)-qt5
+  done 
 }
 
 package_qt5-webkit() {

Added: gcc48.patch
===================================================================
--- gcc48.patch	                        (rev 0)
+++ gcc48.patch	2013-04-11 10:21:49 UTC (rev 182618)
@@ -0,0 +1,63 @@
+# Author:     David E. Narváez <david.narvaez at computer.org>
+# AuthorDate: 2013-02-23 23:14:50 -0500
+# Commit:     David E. Narváez <david.narvaez at computer.org>
+# CommitDate: 2013-02-23 23:14:50 -0500
+#
+# Rename qAbs Function for timeval
+#
+# This decouples it from qAbs which is declared as a constexpr under
+# certain compilation flags and enables for qtbase to be compiled with
+# GCC 4.8
+#
+# Change-Id: I78e02256ffc8b460ca74ae5241e77dfac4e09ba9
+diff --git a/src/corelib/kernel/qtimerinfo_unix.cpp b/src/corelib/kernel/qtimerinfo_unix.cpp
+index 0eee425..7a29247 100644
+--- a/src/corelib/kernel/qtimerinfo_unix.cpp
++++ b/src/corelib/kernel/qtimerinfo_unix.cpp
+@@ -87,22 +87,21 @@
+     firstTimerInfo = 0;
+ }
+ 
+ timeval QTimerInfoList::updateCurrentTime()
+ {
+     return (currentTime = qt_gettime());
+ }
+ 
+ #if ((_POSIX_MONOTONIC_CLOCK-0 <= 0) && !defined(Q_OS_MAC) && !defined(Q_OS_INTEGRITY)) || defined(QT_BOOTSTRAPPED)
+ 
+-template <>
+-timeval qAbs(const timeval &t)
++timeval qAbsTimeval(const timeval &t)
+ {
+     timeval tmp = t;
+     if (tmp.tv_sec < 0) {
+         tmp.tv_sec = -tmp.tv_sec - 1;
+         tmp.tv_usec -= 1000000;
+     }
+     if (tmp.tv_sec == 0 && tmp.tv_usec < 0) {
+         tmp.tv_usec = -tmp.tv_usec;
+     }
+     return normalizedTimeval(tmp);
+@@ -137,21 +136,21 @@
+     *delta = elapsedTime - elapsedTimeTicks;
+ 
+     previousTicks = currentTicks;
+     previousTime = currentTime;
+ 
+     // If tick drift is more than 10% off compared to realtime, we assume that the clock has
+     // been set. Of course, we have to allow for the tick granularity as well.
+     timeval tickGranularity;
+     tickGranularity.tv_sec = 0;
+     tickGranularity.tv_usec = msPerTick * 1000;
+-    return elapsedTimeTicks < ((qAbs(*delta) - tickGranularity) * 10);
++    return elapsedTimeTicks < ((qAbsTimeval(*delta) - tickGranularity) * 10);
+ }
+ 
+ /*
+   repair broken timer
+ */
+ void QTimerInfoList::timerRepair(const timeval &diff)
+ {
+     // repair all timers
+     for (int i = 0; i < size(); ++i) {
+         register QTimerInfo *t = at(i);

Modified: use-python2.patch
===================================================================
--- use-python2.patch	2013-04-11 10:02:01 UTC (rev 182617)
+++ use-python2.patch	2013-04-11 10:21:49 UTC (rev 182618)
@@ -94,3 +94,14 @@
  message_receiver_generator.input = MESSAGE_RECEIVERS
  message_receiver_generator.depends = $$SCRIPTS
  message_receiver_generator.output_function = message_receiver_generator_output
+--- qt-everywhere-opensource-src-5.0.2/qtwebkit/Tools/qmake/mkspecs/features/configure.prf~	2013-04-11 08:05:15.149214600 +0000
++++ qt-everywhere-opensource-src-5.0.2/qtwebkit/Tools/qmake/mkspecs/features/configure.prf	2013-04-11 08:05:28.829105110 +0000
+@@ -116,7 +116,7 @@
+     production_build:blackberry {
+         addReasonForSkippingBuild("Build not supported on BB10 yet.")
+     }
+-    requiredPrograms = gperf python perl bison ruby flex
++    requiredPrograms = gperf python2 perl bison ruby flex
+     for(program, requiredPrograms): \
+         !programExistsInPath($$program): \
+             addReasonForSkippingBuild("Missing $$program from PATH")




More information about the arch-commits mailing list