summaryrefslogtreecommitdiff
path: root/extra/qt5
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2013-04-12 00:04:48 -0700
committerroot <root@rshg054.dnsready.net>2013-04-12 00:04:48 -0700
commitd976aa5e1544c80dc2457ea20b27f28f3fa05899 (patch)
treeb920a24b920930916f1d58602326568fd1e4e9bf /extra/qt5
parent337402b957bab442da9e0d46ee7a8d8f32ede3ce (diff)
Fri Apr 12 00:04:48 PDT 2013
Diffstat (limited to 'extra/qt5')
-rw-r--r--extra/qt5/PKGBUILD80
-rw-r--r--extra/qt5/gcc48.patch63
-rw-r--r--extra/qt5/use-python2.patch11
3 files changed, 146 insertions, 8 deletions
diff --git a/extra/qt5/PKGBUILD b/extra/qt5/PKGBUILD
index e9cf73b33..658ae50e7 100644
--- a/extra/qt5/PKGBUILD
+++ b/extra/qt5/PKGBUILD
@@ -1,9 +1,10 @@
-# $Id: PKGBUILD 180690 2013-03-25 19:15:43Z bpiotrowski $
+# $Id: PKGBUILD 182619 2013-04-11 11:34:49Z andrea $
# Maintainer: Andrea Scarpino <andrea@archlinux.org>
pkgbase=qt5
pkgname=('qt5-base'
'qt5-declarative'
+ 'qt5-doc'
'qt5-graphicaleffects'
'qt5-imageformats'
'qt5-jsbackend'
@@ -15,8 +16,8 @@ pkgname=('qt5-base'
'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 @@ options=('!libtool')
_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 @@ build() {
-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 @@ build() {
-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 @@ package_qt5-base() {
# 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,6 +141,32 @@ package_qt5-declarative() {
# 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() {
@@ -140,6 +192,12 @@ package_qt5-xmlpatterns() {
# 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 @@ package_qt5-tools() {
# 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() {
diff --git a/extra/qt5/gcc48.patch b/extra/qt5/gcc48.patch
new file mode 100644
index 000000000..03b205b68
--- /dev/null
+++ b/extra/qt5/gcc48.patch
@@ -0,0 +1,63 @@
+# Author: David E. Narváez <david.narvaez@computer.org>
+# AuthorDate: 2013-02-23 23:14:50 -0500
+# Commit: David E. Narváez <david.narvaez@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);
diff --git a/extra/qt5/use-python2.patch b/extra/qt5/use-python2.patch
index 8a7075a97..eb53b10f6 100644
--- a/extra/qt5/use-python2.patch
+++ b/extra/qt5/use-python2.patch
@@ -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")