summaryrefslogtreecommitdiffstats
path: root/testing/qt
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2010-10-17 16:41:13 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2010-10-17 16:41:13 +0000
commit46ea5efd6f5548be6b7ea4aad3af5684e0fefcd2 (patch)
tree30b6438c7fbf9d4c679100425ea92e0d0f1fa0bd /testing/qt
parent67f67c40887f50f74fff30fb35fa983541ccd3e0 (diff)
downloadaports-46ea5efd6f5548be6b7ea4aad3af5684e0fefcd2.tar.bz2
aports-46ea5efd6f5548be6b7ea4aad3af5684e0fefcd2.tar.xz
testing/qt: new aport
A cross-platform application and UI framework http://qt.nokia.com/
Diffstat (limited to 'testing/qt')
-rw-r--r--testing/qt/APKBUILD122
-rw-r--r--testing/qt/PKGBUILD119
-rw-r--r--testing/qt/assistant.desktop8
-rw-r--r--testing/qt/designer.desktop9
-rw-r--r--testing/qt/fix-multisampling-with-ati-card.patch25
-rw-r--r--testing/qt/fix-scroll-when-last-item-is-removed.patch38
-rw-r--r--testing/qt/linguist.desktop9
-rw-r--r--testing/qt/qt.install11
-rw-r--r--testing/qt/qtconfig.desktop8
9 files changed, 349 insertions, 0 deletions
diff --git a/testing/qt/APKBUILD b/testing/qt/APKBUILD
new file mode 100644
index 000000000..3fa4136c2
--- /dev/null
+++ b/testing/qt/APKBUILD
@@ -0,0 +1,122 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=qt
+pkgver=4.7.0
+pkgrel=0
+pkgdesc="A cross-platform application and UI framework"
+url="http://qt.nokia.com/"
+license="GPL3 LGPL"
+depends="hicolor-icon-theme ca-certificates"
+subpackages="$pkgname-dev $pkgname-doc"
+makedepends="mesa-dev postgresql-dev mysql-dev unixodbc-dev cups-dev gtk+-dev
+ tiff-dev libpng-dev libmng-dev sqlite-dev glib-dev dbus-dev libiconv-dev
+ fontconfig-dev libsm-dev libxrandr-dev libxv-dev libxi-dev alsa-lib-dev"
+install=
+source="ftp://ftp.qt.nokia.com/qt/source/qt-everywhere-opensource-src-$pkgver.tar.gz
+ assistant.desktop
+ designer.desktop
+ linguist.desktop
+ qtconfig.desktop
+ fix-scroll-when-last-item-is-removed.patch
+ fix-multisampling-with-ati-card.patch"
+
+_builddir="$srcdir"/qt-everywhere-opensource-src-$pkgver
+prepare() {
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch)
+ msg "Applying $i"
+ patch -p1 -i "$srcdir"/$i || return 1
+ ;;
+ esac
+ done
+ sed -i "s|-O2|$CXXFLAGS|" mkspecs/common/g++.conf
+ sed -i "/^QMAKE_RPATH/s| -Wl,-rpath,||g" mkspecs/common/g++.conf
+ sed -i "/^QMAKE_LFLAGS\s/s|+=|+= $LDFLAGS|g" mkspecs/common/g++.conf
+}
+
+build() {
+ cd "$_builddir"
+ unset QMAKESPEC
+ export QT4DIR="$_builddir"
+ export PATH="${QT4DIR}/bin:${PATH}"
+ export LD_LIBRARY_PATH=${QT4DIR}/lib:${LD_LIBRARY_PATH}
+ ./configure -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 \
+ -examplesdir /usr/share/doc/qt/examples \
+ -demosdir /usr/share/doc/qt/demos \
+ -largefile \
+ -plugin-sql-psql \
+ -plugin-sql-mysql \
+ -plugin-sql-sqlite \
+ -plugin-sql-odbc \
+ -system-sqlite \
+ -xmlpatterns \
+ -no-phonon \
+ -no-phonon-backend \
+ -svg \
+ -webkit \
+ -script \
+ -scripttools \
+ -system-zlib \
+ -system-libtiff \
+ -system-libpng \
+ -system-libmng \
+ -system-libjpeg \
+ -nomake demos \
+ -nomake examples \
+ -nomake docs \
+ -no-rpath \
+ -openssl-linked \
+ -silent \
+ -optimized-qmake \
+ -dbus \
+ -reduce-relocations \
+ -no-separate-debug-info \
+ -gtkstyle \
+ -opengl \
+ -no-openvg \
+ -glib \
+ || return 1
+ make
+}
+
+package() {
+ cd "$_builddir"
+ 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/' {} \;
+}
+
+md5sums="3a2f25b9b115037277f4fb759194a7a5 qt-everywhere-opensource-src-4.7.0.tar.gz
+a445c6917086d80f1cfc1e40cb6b0132 assistant.desktop
+d457f0a0ad68a3861c3cadefe3b42ded designer.desktop
+668331d9798a0e2b94381efb7be4c513 linguist.desktop
+c29f2993d6a0f73d756d2fa36e130e1c qtconfig.desktop
+ef20c34afc5be5ed62f2935be66d9402 fix-scroll-when-last-item-is-removed.patch
+b2e0f134bbb848ebef41134a45a36ee9 fix-multisampling-with-ati-card.patch"
diff --git a/testing/qt/PKGBUILD b/testing/qt/PKGBUILD
new file mode 100644
index 000000000..f39d13ee4
--- /dev/null
+++ b/testing/qt/PKGBUILD
@@ -0,0 +1,119 @@
+# $Id: PKGBUILD 94734 2010-10-10 14:30:15Z andrea $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+# Contributor: Pierre Schmitz <pierre@archlinux.de>
+
+pkgname=qt
+pkgver=4.7.0
+pkgrel=4
+pkgdesc='A cross-platform application and UI framework'
+arch=('i686' 'x86_64')
+url='http://qt.nokia.com/'
+license=('GPL3' 'LGPL')
+depends=('libtiff' 'libpng' 'libmng' 'sqlite3' 'ca-certificates' 'glib2' 'dbus'
+ 'fontconfig' 'libgl' 'libsm' 'libxrandr' 'libxv' 'libxi' 'alsa-lib'
+ 'xdg-utils' 'hicolor-icon-theme')
+optdepends=('postgresql-libs: PostgreSQL driver'
+ 'libmysqlclient: MySQL driver'
+ 'unixodbc: ODBC driver'
+ 'libxinerama: Xinerama support'
+ 'libxcursor: Xcursor support'
+ 'libxfixes: Xfixes support')
+makedepends=('mesa' 'postgresql-libs' 'mysql' 'unixodbc' 'cups' 'gtk2')
+install="${pkgname}.install"
+options=('!libtool')
+_pkgfqn="qt-everywhere-opensource-src-${pkgver}"
+source=("ftp://ftp.qt.nokia.com/qt/source/${_pkgfqn}.tar.gz"
+ 'assistant.desktop' 'designer.desktop' 'linguist.desktop' 'qtconfig.desktop'
+ 'fix-scroll-when-last-item-is-removed.patch'
+ 'fix-multisampling-with-ati-card.patch')
+md5sums=('3a2f25b9b115037277f4fb759194a7a5'
+ 'a445c6917086d80f1cfc1e40cb6b0132'
+ 'd457f0a0ad68a3861c3cadefe3b42ded'
+ '668331d9798a0e2b94381efb7be4c513'
+ 'c29f2993d6a0f73d756d2fa36e130e1c'
+ 'ef20c34afc5be5ed62f2935be66d9402'
+ 'b2e0f134bbb848ebef41134a45a36ee9')
+
+build() {
+ unset QMAKESPEC
+ export QT4DIR=$srcdir/$_pkgfqn
+ export PATH=${QT4DIR}/bin:${PATH}
+ export LD_LIBRARY_PATH=${QT4DIR}/lib:${LD_LIBRARY_PATH}
+
+ cd $srcdir/$_pkgfqn
+
+ # Already fixed in 4.7.1
+ patch -Np1 -i ${srcdir}/fix-scroll-when-last-item-is-removed.patch
+ patch -Np1 -i ${srcdir}/fix-multisampling-with-ati-card.patch
+
+ sed -i "s|-O2|$CXXFLAGS|" mkspecs/common/g++.conf
+ sed -i "/^QMAKE_RPATH/s| -Wl,-rpath,||g" mkspecs/common/g++.conf
+ sed -i "/^QMAKE_LFLAGS\s/s|+=|+= $LDFLAGS|g" mkspecs/common/g++.conf
+
+ ./configure -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 \
+ -examplesdir /usr/share/doc/qt/examples \
+ -demosdir /usr/share/doc/qt/demos \
+ -largefile \
+ -plugin-sql-{psql,mysql,sqlite,odbc} \
+ -system-sqlite \
+ -xmlpatterns \
+ -no-phonon \
+ -no-phonon-backend \
+ -svg \
+ -webkit \
+ -script \
+ -scripttools \
+ -system-zlib \
+ -system-libtiff \
+ -system-libpng \
+ -system-libmng \
+ -system-libjpeg \
+ -nomake demos \
+ -nomake examples \
+ -nomake docs \
+ -no-rpath \
+ -openssl-linked \
+ -silent \
+ -optimized-qmake \
+ -dbus \
+ -reduce-relocations \
+ -no-separate-debug-info \
+ -gtkstyle \
+ -opengl \
+ -no-openvg \
+ -glib
+ make
+}
+
+package() {
+ 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/' {} \;
+}
diff --git a/testing/qt/assistant.desktop b/testing/qt/assistant.desktop
new file mode 100644
index 000000000..1b9f0a768
--- /dev/null
+++ b/testing/qt/assistant.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Exec=/usr/bin/assistant
+Name=Qt Assistant
+GenericName=Qt Document Browser
+Icon=assistant
+Terminal=false
+Type=Application
+Categories=Qt;Development;Documentation
diff --git a/testing/qt/designer.desktop b/testing/qt/designer.desktop
new file mode 100644
index 000000000..8f362731b
--- /dev/null
+++ b/testing/qt/designer.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Exec=/usr/bin/designer
+Name=Qt Designer
+GenericName=Interface Designer
+MimeType=application/x-designer
+Icon=designer
+Terminal=false
+Type=Application
+Categories=Qt;Development;GUIDesigner
diff --git a/testing/qt/fix-multisampling-with-ati-card.patch b/testing/qt/fix-multisampling-with-ati-card.patch
new file mode 100644
index 000000000..c215c2cc1
--- /dev/null
+++ b/testing/qt/fix-multisampling-with-ati-card.patch
@@ -0,0 +1,25 @@
+From e48e50c460434c451c67403390d98f7418c77cce Mon Sep 17 00:00:00 2001
+From: Jonathan Liu <net147@gmail.com>
+Date: Wed, 25 Aug 2010 14:07:40 +1000
+Subject: [PATCH] Fix OpenGL multisampling for some graphics drivers
+
+---
+ src/opengl/qgl_win.cpp | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/src/opengl/qgl_win.cpp b/src/opengl/qgl_win.cpp
+index 5ab944a..8eb6177 100644
+--- a/src/opengl/qgl_win.cpp
++++ b/src/opengl/qgl_win.cpp
+@@ -1042,7 +1042,7 @@ int QGLContext::choosePixelFormat(void* dummyPfd, HDC pdc)
+ iAttributes[i++] = WGL_DRAW_TO_WINDOW_ARB;
+ iAttributes[i++] = TRUE;
+ iAttributes[i++] = WGL_COLOR_BITS_ARB;
+- iAttributes[i++] = 32;
++ iAttributes[i++] = 24;
+ iAttributes[i++] = WGL_DOUBLE_BUFFER_ARB;
+ iAttributes[i++] = d->glFormat.doubleBuffer();
+ if (d->glFormat.stereo()) {
+--
+1.7.2.1
+
diff --git a/testing/qt/fix-scroll-when-last-item-is-removed.patch b/testing/qt/fix-scroll-when-last-item-is-removed.patch
new file mode 100644
index 000000000..86567024f
--- /dev/null
+++ b/testing/qt/fix-scroll-when-last-item-is-removed.patch
@@ -0,0 +1,38 @@
+From 6da6b7099d4e0b49329793e4b90703ec3d868048 Mon Sep 17 00:00:00 2001
+From: Frank Reininghaus <frank78ac@googlemail.com>
+Date: Wed, 22 Sep 2010 10:19:59 +0200
+Subject: [PATCH] QTreeView: do not scroll to top if last item is removed
+
+When the last item is the current item and is removed,
+QTreeViewPrivate::updateScrollBars() is called after QTreeViewPrivate's
+viewItems member is cleared. This commit makes sure that viewItems is
+restored by calling QTreeView::doItemsLayout() in this case, preventing
+that the scroll bar range is set to zero temporarily and the view is
+scrolled to the top unexpectedly (this was a regression in 4.7.0:
+QTBUG-13567).
+
+Merge-request: 2481
+Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
+---
+ src/gui/itemviews/qtreeview.cpp | 4 ++++
+ tests/auto/qtreeview/tst_qtreeview.cpp | 22 ++++++++++++++++++++++
+ 2 files changed, 26 insertions(+), 0 deletions(-)
+
+diff --git a/src/gui/itemviews/qtreeview.cpp b/src/gui/itemviews/qtreeview.cpp
+index b797776..40b51fe 100644
+--- a/src/gui/itemviews/qtreeview.cpp
++++ b/src/gui/itemviews/qtreeview.cpp
+@@ -3435,6 +3435,10 @@ void QTreeViewPrivate::updateScrollBars()
+ if (!viewportSize.isValid())
+ viewportSize = QSize(0, 0);
+
++ if (viewItems.isEmpty()) {
++ q->doItemsLayout();
++ }
++
+ int itemsInViewport = 0;
+ if (uniformRowHeights) {
+ if (defaultItemHeight <= 0)
+--
+1.6.1
+
diff --git a/testing/qt/linguist.desktop b/testing/qt/linguist.desktop
new file mode 100644
index 000000000..94e92c1b0
--- /dev/null
+++ b/testing/qt/linguist.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Exec=/usr/bin/linguist
+Name=Qt Linguist
+GenericName=Translation Tool
+MimeType=application/x-linguist
+Terminal=false
+Type=Application
+Icon=linguist
+Categories=Qt;Development;Translation
diff --git a/testing/qt/qt.install b/testing/qt/qt.install
new file mode 100644
index 000000000..e70c054ec
--- /dev/null
+++ b/testing/qt/qt.install
@@ -0,0 +1,11 @@
+post_install() {
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/testing/qt/qtconfig.desktop b/testing/qt/qtconfig.desktop
new file mode 100644
index 000000000..7c221e5f8
--- /dev/null
+++ b/testing/qt/qtconfig.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Name=Qt Config
+Comment=Configure Qt behavior, styles, fonts
+Exec=/usr/bin/qtconfig
+Icon=qtlogo
+Terminal=false
+Type=Application
+Categories=Qt;Settings;