Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

qt5-git: add PKGBUILDs for minimal qt5 install

packages qtbase, qtjsbackend, qtxlmpatterns and qtdeclarative are
added with support to i686, x86_64 and armv6h (the raspberry pi).

Signed-off-by: Sergio Correia <sergio.correia@uece.net>
  • Loading branch information...
commit 46e8e5f831982d83ba69b24d0d947b4b21990c19 0 parents
Sergio Correia authored
362 qt5-qtbase-git/0001-mkspecs-adjusts-for-qtbase-to-build-correctly-on-a-n.patch
@@ -0,0 +1,362 @@
+diff --git a/mkspecs/linux-g++/qeglfshooks_pi.cpp b/mkspecs/linux-g++/qeglfshooks_pi.cpp
+new file mode 100644
+index 0000000..acf0d8c
+--- /dev/null
++++ b/mkspecs/linux-g++/qeglfshooks_pi.cpp
+@@ -0,0 +1,293 @@
++/****************************************************************************
++**
++** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
++** Contact: http://www.qt-project.org/legal
++**
++** This file is part of the qmake spec of the Qt Toolkit.
++**
++** $QT_BEGIN_LICENSE:LGPL$
++** Commercial License Usage
++** Licensees holding valid commercial Qt licenses may use this file in
++** accordance with the commercial license agreement provided with the
++** Software or, alternatively, in accordance with the terms contained in
++** a written agreement between you and Digia. For licensing terms and
++** conditions see http://qt.digia.com/licensing. For further information
++** use the contact form at http://qt.digia.com/contact-us.
++**
++** GNU Lesser General Public License Usage
++** Alternatively, this file may be used under the terms of the GNU Lesser
++** General Public License version 2.1 as published by the Free Software
++** Foundation and appearing in the file LICENSE.LGPL included in the
++** packaging of this file. Please review the following information to
++** ensure the GNU Lesser General Public License version 2.1 requirements
++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
++**
++** In addition, as a special exception, Digia gives you certain additional
++** rights. These rights are described in the Digia Qt LGPL Exception
++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
++**
++** GNU General Public License Usage
++** Alternatively, this file may be used under the terms of the GNU
++** General Public License version 3.0 as published by the Free Software
++** Foundation and appearing in the file LICENSE.GPL included in the
++** packaging of this file. Please review the following information to
++** ensure the GNU General Public License version 3.0 requirements will be
++** met: http://www.gnu.org/copyleft/gpl.html.
++**
++**
++** $QT_END_LICENSE$
++**
++****************************************************************************/
++
++#include "qeglfshooks.h"
++#include "qeglfscursor.h"
++
++#include <QtDebug>
++
++#include <QtPlatformSupport/private/qeglconvenience_p.h>
++#include <QtPlatformSupport/private/qeglplatformcontext_p.h>
++
++#include <bcm_host.h>
++
++QT_BEGIN_NAMESPACE
++
++static DISPMANX_DISPLAY_HANDLE_T dispman_display = 0;
++
++static EGLNativeWindowType createDispmanxLayer(const QPoint &pos, const QSize &size, int z, DISPMANX_FLAGS_ALPHA_T flags)
++{
++ VC_RECT_T dst_rect;
++ dst_rect.x = pos.x();
++ dst_rect.y = pos.y();
++ dst_rect.width = size.width();
++ dst_rect.height = size.height();
++
++ VC_RECT_T src_rect;
++ src_rect.x = 0;
++ src_rect.y = 0;
++ src_rect.width = size.width() << 16;
++ src_rect.height = size.height() << 16;
++
++ DISPMANX_UPDATE_HANDLE_T dispman_update = vc_dispmanx_update_start(0);
++
++ VC_DISPMANX_ALPHA_T alpha;
++ alpha.flags = flags;
++ alpha.opacity = 0xFF;
++ alpha.mask = 0;
++
++ DISPMANX_ELEMENT_HANDLE_T dispman_element = vc_dispmanx_element_add(
++ dispman_update, dispman_display, z, &dst_rect, 0, &src_rect,
++ DISPMANX_PROTECTION_NONE, &alpha, (DISPMANX_CLAMP_T *)NULL, (DISPMANX_TRANSFORM_T)0);
++
++ vc_dispmanx_update_submit_sync(dispman_update);
++
++ EGL_DISPMANX_WINDOW_T *eglWindow = new EGL_DISPMANX_WINDOW_T;
++ eglWindow->element = dispman_element;
++ eglWindow->width = size.width();
++ eglWindow->height = size.height();
++
++ return eglWindow;
++}
++
++// this function is not part of debian squeeze headers
++extern "C" int VCHPOST_ vc_dispmanx_element_change_attributes(DISPMANX_UPDATE_HANDLE_T update,
++ DISPMANX_ELEMENT_HANDLE_T element, uint32_t change_flags, int32_t layer,
++ uint8_t opacity, const VC_RECT_T *dest_rect, const VC_RECT_T *src_rect,
++ DISPMANX_RESOURCE_HANDLE_T mask, VC_IMAGE_TRANSFORM_T transform);
++
++// these constants are not in any headers (yet)
++#define ELEMENT_CHANGE_LAYER (1<<0)
++#define ELEMENT_CHANGE_OPACITY (1<<1)
++#define ELEMENT_CHANGE_DEST_RECT (1<<2)
++#define ELEMENT_CHANGE_SRC_RECT (1<<3)
++#define ELEMENT_CHANGE_MASK_RESOURCE (1<<4)
++#define ELEMENT_CHANGE_TRANSFORM (1<<5)
++
++static void moveDispmanxLayer(EGLNativeWindowType window, const QPoint &pos)
++{
++ EGL_DISPMANX_WINDOW_T *eglWindow = static_cast<EGL_DISPMANX_WINDOW_T *>(window);
++ QSize size(eglWindow->width, eglWindow->height);
++
++ VC_RECT_T dst_rect;
++ dst_rect.x = pos.x();
++ dst_rect.y = pos.y();
++ dst_rect.width = size.width();
++ dst_rect.height = size.height();
++
++ VC_RECT_T src_rect;
++ src_rect.x = 0;
++ src_rect.y = 0;
++ src_rect.width = size.width() << 16;
++ src_rect.height = size.height() << 16;
++
++ DISPMANX_UPDATE_HANDLE_T dispman_update = vc_dispmanx_update_start(0);
++ vc_dispmanx_element_change_attributes(dispman_update,
++ eglWindow->element,
++ ELEMENT_CHANGE_DEST_RECT /*change_flags*/,
++ 0,
++ 0,
++ &dst_rect,
++ NULL,
++ 0,
++ (VC_IMAGE_TRANSFORM_T)0);
++
++ vc_dispmanx_update_submit_sync(dispman_update);
++}
++
++static void destroyDispmanxLayer(EGLNativeWindowType window)
++{
++ EGL_DISPMANX_WINDOW_T *eglWindow = static_cast<EGL_DISPMANX_WINDOW_T *>(window);
++ DISPMANX_UPDATE_HANDLE_T dispman_update = vc_dispmanx_update_start(0);
++ vc_dispmanx_element_remove(dispman_update, eglWindow->element);
++ vc_dispmanx_update_submit_sync(dispman_update);
++ delete eglWindow;
++}
++
++class QEglFSPiCursor : public QEglFSCursor
++{
++public:
++ QEglFSPiCursor(QEglFSScreen *screen) : QEglFSCursor(screen) {
++ QSurfaceFormat platformFormat;
++ platformFormat.setDepthBufferSize(24);
++ platformFormat.setStencilBufferSize(8);
++ platformFormat.setRedBufferSize(8);
++ platformFormat.setGreenBufferSize(8);
++ platformFormat.setBlueBufferSize(8);
++ platformFormat.setAlphaBufferSize(8);
++ m_config = q_configFromGLFormat(m_screen->display(), platformFormat);
++
++ createSurface();
++ createContext();
++ drawInLayer();
++ }
++
++ ~QEglFSPiCursor() {
++ eglDestroySurface(m_screen->display(), m_surface);
++ destroyDispmanxLayer(m_window);
++ eglDestroyContext(m_screen->display(), m_context);
++ }
++
++ void createSurface() {
++ const QRect cr = cursorRect();
++ m_window = createDispmanxLayer(cr.topLeft(), cr.size(), 50, DISPMANX_FLAGS_ALPHA_FROM_SOURCE);
++ m_surface = eglCreateWindowSurface(m_screen->display(), m_config, m_window, NULL);
++ }
++
++ void createContext() {
++ eglBindAPI(EGL_OPENGL_ES_API);
++ QVector<EGLint> attrs;
++ attrs.append(EGL_CONTEXT_CLIENT_VERSION);
++ attrs.append(2);
++ attrs.append(EGL_NONE);
++ m_context = eglCreateContext(m_screen->display(), m_config, EGL_NO_CONTEXT, attrs.constData());
++ }
++
++ void drawInLayer() {
++ eglMakeCurrent(m_screen->display(), m_surface, m_surface, m_context);
++
++ glClearColor(0, 0, 0, 0);
++ glClear(GL_COLOR_BUFFER_BIT);
++ draw(QRectF(QPointF(-1, 1), QPointF(1, -1)));
++
++ eglSwapBuffers(m_screen->display(), m_surface);
++ eglMakeCurrent(m_screen->display(), EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
++ }
++
++ void changeCursor(QCursor *cursor, QWindow *window) Q_DECL_OVERRIDE {
++ if (!setCurrentCursor(cursor))
++ return;
++
++ EGL_DISPMANX_WINDOW_T *eglWindow = static_cast<EGL_DISPMANX_WINDOW_T *>(m_window);
++ if (QSize(eglWindow->width, eglWindow->height) != m_cursor.size) {
++ eglDestroySurface(m_screen->display(), m_surface);
++ destroyDispmanxLayer(m_window);
++ createSurface();
++ }
++ drawInLayer();
++ }
++
++ void setPos(const QPoint &pos) Q_DECL_OVERRIDE {
++ m_cursor.pos = pos;
++ moveDispmanxLayer(m_window, cursorRect().topLeft());
++ }
++
++ void pointerEvent(const QMouseEvent &event) Q_DECL_OVERRIDE {
++ if (event.type() != QEvent::MouseMove)
++ return;
++ m_cursor.pos = event.pos();
++ moveDispmanxLayer(m_window, cursorRect().topLeft());
++ }
++
++ void paintOnScreen() Q_DECL_OVERRIDE { }
++private:
++ EGLConfig m_config;
++ EGLContext m_context;
++ EGLNativeWindowType m_window;
++ EGLSurface m_surface;
++};
++
++class QEglFSPiHooks : public QEglFSHooks
++{
++public:
++ virtual void platformInit();
++ virtual void platformDestroy();
++ virtual EGLNativeDisplayType platformDisplay() const;
++ virtual QSize screenSize() const;
++ virtual EGLNativeWindowType createNativeWindow(const QSize &size, const QSurfaceFormat &format);
++ virtual void destroyNativeWindow(EGLNativeWindowType window);
++ virtual bool hasCapability(QPlatformIntegration::Capability cap) const;
++
++ QEglFSCursor *createCursor(QEglFSScreen *screen) const {
++ return new QEglFSPiCursor(screen);
++ }
++};
++
++void QEglFSPiHooks::platformInit()
++{
++ bcm_host_init();
++}
++
++EGLNativeDisplayType QEglFSPiHooks::platformDisplay() const
++{
++ dispman_display = vc_dispmanx_display_open(0/* LCD */);
++ return EGL_DEFAULT_DISPLAY;
++}
++
++void QEglFSPiHooks::platformDestroy()
++{
++ vc_dispmanx_display_close(dispman_display);
++}
++
++QSize QEglFSPiHooks::screenSize() const
++{
++ uint32_t width, height;
++ graphics_get_display_size(0 /* LCD */, &width, &height);
++ return QSize(width, height);
++}
++
++EGLNativeWindowType QEglFSPiHooks::createNativeWindow(const QSize &size, const QSurfaceFormat &format)
++{
++ return createDispmanxLayer(QPoint(0, 0), size, 1, format.hasAlpha() ? DISPMANX_FLAGS_ALPHA_FROM_SOURCE : DISPMANX_FLAGS_ALPHA_FIXED_ALL_PIXELS);
++}
++
++void QEglFSPiHooks::destroyNativeWindow(EGLNativeWindowType window)
++{
++ destroyDispmanxLayer(window);
++}
++
++bool QEglFSPiHooks::hasCapability(QPlatformIntegration::Capability cap) const
++{
++ switch (cap) {
++ case QPlatformIntegration::ThreadedPixmaps:
++ case QPlatformIntegration::OpenGL:
++ case QPlatformIntegration::ThreadedOpenGL:
++ case QPlatformIntegration::BufferQueueingOpenGL:
++ return true;
++ default:
++ return false;
++ }
++}
++
++QEglFSPiHooks eglFSPiHooks;
++QEglFSHooks *platformHooks = &eglFSPiHooks;
++
++QT_END_NAMESPACE
+diff --git a/mkspecs/linux-g++/qmake.conf b/mkspecs/linux-g++/qmake.conf
+index 9c1e0d7..00012ba 100644
+--- a/mkspecs/linux-g++/qmake.conf
++++ b/mkspecs/linux-g++/qmake.conf
+@@ -1,12 +1,51 @@
+ #
+-# qmake configuration for linux-g++
+-#
++# qmake configuration for Broadcom's Raspberry PI on archlinuxarm hard float
++# http://wiki.qt-project.org/Devices/RaspberryPi
+
+ MAKEFILE_GENERATOR = UNIX
+-CONFIG += incremental gdb_dwarf_index
+-QMAKE_INCREMENTAL_STYLE = sublib
++CONFIG += incremental gdb_dwarf_index
++QMAKE_INCREMENTAL_STYLE = sublib
+
+ include(../common/linux.conf)
+ include(../common/gcc-base-unix.conf)
+ include(../common/g++-unix.conf)
++
++QT_QPA_DEFAULT_PLATFORM = eglfs
++
++QMAKE_LFLAGS += -Wl,-rpath-link,$$[QT_SYSROOT]/opt/vc/lib
++
++QMAKE_LIBDIR_OPENGL_ES2 = $$[QT_SYSROOT]/opt/vc/lib
++QMAKE_LIBDIR_EGL = $$QMAKE_LIBDIR_OPENGL_ES2
++
++QMAKE_INCDIR_EGL = $$[QT_SYSROOT]/opt/vc/include $$[QT_SYSROOT]/opt/vc/include/interface/vcos/pthreads
++QMAKE_INCDIR_OPENGL_ES2 = $${QMAKE_INCDIR_EGL}
++
++QMAKE_LIBS_EGL = -lEGL -lGLESv2
++QMAKE_LIBS_OPENGL_ES2 = -lGLESv2 -lEGL
++
++contains(DISTRO, squeeze) {
++ #Debian Squeeze: Legacy everything
++ QMAKE_LIBS_OPENGL_ES2 = -lGLESv2 -lEGL
++ QT_QPA_DEFAULT_PLATFORM = eglfs
++} else:contains(DISTRO, arch) {
++ #On principle: no wizardry required
++} else {
++ #This is not strictly necessary
++ DISTRO_OPTS += deb-multi-arch
++ DISTRO_OPTS += hard-float
++}
++
++QMAKE_CFLAGS += \
++ -marm \
++ -mfpu=vfp \
++ -mfloat-abi=hard \ # hard float archlinuxarm
++ -mtune=arm1176jzf-s \
++ -march=armv6zk \
++ -mabi=aapcs-linux
++
++QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
++
++EGLFS_PLATFORM_HOOKS_SOURCES = $$PWD/qeglfshooks_pi.cpp
++EGLFS_PLATFORM_HOOKS_LIBS = -lbcm_host
++
+ load(qt_config)
+--
+1.7.12.2
+
28 qt5-qtbase-git/0002-openvg-adjusts-to-build-qtbase-with-support-to-openv.patch
@@ -0,0 +1,28 @@
+diff --git a/config.tests/unix/openvg/openvg.pro b/config.tests/unix/openvg/openvg.pro
+index 4bbde99..a2315f7 100644
+--- a/config.tests/unix/openvg/openvg.pro
++++ b/config.tests/unix/openvg/openvg.pro
+@@ -12,8 +12,4 @@ openvg_on_opengl {
+ !isEmpty(QMAKE_LIBS_OPENGL): LIBS += $$QMAKE_LIBS_OPENGL
+ }
+
+-lower_case_includes {
+- DEFINES += QT_LOWER_CASE_VG_INCLUDES
+-}
+-
+ CONFIG -= qt
+diff --git a/mkspecs/linux-g++/qmake.conf b/mkspecs/linux-g++/qmake.conf
+index 00012ba..5452c31 100644
+--- a/mkspecs/linux-g++/qmake.conf
++++ b/mkspecs/linux-g++/qmake.conf
+@@ -23,6 +23,10 @@ QMAKE_INCDIR_OPENGL_ES2 = $${QMAKE_INCDIR_EGL}
+ QMAKE_LIBS_EGL = -lEGL -lGLESv2
+ QMAKE_LIBS_OPENGL_ES2 = -lGLESv2 -lEGL
+
++QMAKE_INCDIR_OPENVG = $${QMAKE_INCDIR_EGL}
++QMAKE_LIBDIR_OPENVG = $${QMAKE_LIBDIR_OPENGL_ES2}
++QMAKE_LIBS_OPENVG = $${QMAKE_LIBS_EGL}
++
+ contains(DISTRO, squeeze) {
+ #Debian Squeeze: Legacy everything
+ QMAKE_LIBS_OPENGL_ES2 = -lGLESv2 -lEGL
61 qt5-qtbase-git/PKGBUILD
@@ -0,0 +1,61 @@
+# Maintainer: Sergio Correia <sergio.correia@uece.net>
+# Contributor: Anselmo L. S. Melo <anselmolsm@gmail.com>
+
+pkgname=qt5-qtbase-git
+pkgver=20121004
+pkgrel=1
+pkgdesc="Qt 5: qtbase module"
+arch=('i686' 'x86_64' 'armv6h')
+url="https://qt.gitorious.org/qt/qtbase"
+license=('LGPL')
+depends=('libxcb' 'xcb-proto' 'xcb-util' 'xcb-util-image' 'xcb-util-keysyms' 'xcb-util-renderutil' 'xcb-util-wm' 'libxext' 'libgl' 'libegl' 'libgles' 'libxrender' 'icu' 'udev')
+source=()
+md5sums=()
+
+if [ "$CARCH" = "armv6h" ]; then
+ # raspberry pi
+ depends=('raspberrypi-firmware' 'icu' 'udev')
+ source=('0001-mkspecs-adjusts-for-qtbase-to-build-correctly-on-a-n.patch'
+ '0002-openvg-adjusts-to-build-qtbase-with-support-to-openv.patch')
+ md5sums=('bbd118828222d5418c6f9438cd4cf660'
+ '00b396fd82bcef15fe8b5a94a7cca39a')
+fi
+
+makedepends=('gcc' 'git')
+
+_gitroot="git://gitorious.org/qt/qtbase.git"
+_gitname=qt5-qtbase
+
+build() {
+ if [ ! -d "${_gitname}" ]; then
+ git clone ${_gitroot} ${_gitname} && cd ${_gitname}
+ else
+ cd ${_gitname} && git reset --hard && git pull origin && git clean -dfx
+ fi
+
+ msg "GIT checkout done."
+
+ CFLAGS_ARCH=""
+ if [ "$CARCH" = "armv6h" ]; then
+ # raspberry pi
+
+ patch -uNp1 -i ../0001-mkspecs-adjusts-for-qtbase-to-build-correctly-on-a-n.patch || return 1
+ patch -uNp1 -i ../0002-openvg-adjusts-to-build-qtbase-with-support-to-openv.patch || return 1
+ CFLAGS_ARCH="-no-pch -no-xcb -no-xrender -opengl es2 -optimized-qmake -reduce-relocations -reduce-exports"
+ fi
+
+ ./configure $CFLAGS_ARCH -no-accessibility -nomake demos -nomake tests -nomake examples -make libs -release --prefix=/opt/qt5 -opensource --confirm-license
+ make
+}
+
+package() {
+ cd "${_gitname}"
+
+ make INSTALL_ROOT="${pkgdir}" install
+
+ if [ "$CARCH" = "armv6h" ]; then
+ # raspberry pi
+ mkdir -p "${pkgdir}"/etc/ld.so.conf.d/
+ echo "/opt/vc/lib/" > "${pkgdir}"/etc/ld.so.conf.d/${pkgname}.conf
+ fi
+}
36 qt5-qtdeclarative-git/PKGBUILD
@@ -0,0 +1,36 @@
+# Maintainer: Sergio Correia <sergio.correia@uece.net>
+# Contributor: Anselmo L. S. Melo <anselmolsm@gmail.com>
+
+pkgname=qt5-qtdeclarative-git
+pkgver=20121004
+pkgrel=1
+pkgdesc="Qt 5: qtdeclarative module (QtQuick 2, QML)"
+arch=('i686' 'x86_64' 'armv6h')
+url="https://qt.gitorious.org/qt/qtdeclarative"
+license=('LGPL')
+depends=('qt5-qtbase-git' 'qt5-qtxmlpatterns-git' 'qt5-qtjsbackend-git')
+makedepends=('gcc' 'git')
+source=()
+md5sums=()
+
+_gitroot="git://gitorious.org/qt/qtdeclarative.git"
+_gitname=qt5-qtdeclarative
+
+build() {
+ if [ ! -d "${_gitname}" ]; then
+ git clone ${_gitroot} ${_gitname} && cd ${_gitname}
+ else
+ cd ${_gitname} && git reset --hard && git pull origin && git clean -dfx
+ fi
+
+ msg "GIT checkout done."
+
+ /opt/qt5/bin/qmake
+ make
+}
+
+package() {
+ cd "${_gitname}"
+
+ make INSTALL_ROOT="${pkgdir}" install
+}
371 qt5-qtjsbackend-git/0001-V8-Add-support-for-using-armv6-vfp2-instructions.patch
@@ -0,0 +1,371 @@
+From a09ee1da4f85f92aa6baabea57518234194fea81 Mon Sep 17 00:00:00 2001
+From: Andy Nichols <andy.nichols@nokia.com>
+Date: Mon, 28 May 2012 16:42:39 +0200
+Subject: [PATCH] [V8] Add support for using armv6 vfp2 instructions
+
+This is needed when building for armv6 with the
+hardfloat ABI. Config tests have been added to
+detect VFP3 and VFP2 instruction support.
+
+Change-Id: If6c5fcf840463bfc98bab564f5357b754b39a20f
+---
+ config.tests/vfp2/vfp2.cpp | 48 ++++++++++++++++++++++++++
+ config.tests/vfp2/vfp2.pro | 15 ++++++++
+ config.tests/vfp3/vfp3.cpp | 48 ++++++++++++++++++++++++++
+ config.tests/vfp3/vfp3.pro | 15 ++++++++
+ qtjsbackend.pro | 2 ++
+ src/3rdparty/v8/src/arm/assembler-arm.cc | 15 ++++----
+ src/3rdparty/v8/src/arm/code-stubs-arm.cc | 8 ++---
+ src/3rdparty/v8/src/arm/macro-assembler-arm.cc | 8 ++---
+ src/3rdparty/v8/src/v8globals.h | 1 +
+ src/v8/v8.pri | 11 ++++--
+ sync.profile | 7 ++++
+ 11 files changed, 161 insertions(+), 17 deletions(-)
+ create mode 100644 config.tests/vfp2/vfp2.cpp
+ create mode 100644 config.tests/vfp2/vfp2.pro
+ create mode 100644 config.tests/vfp3/vfp3.cpp
+ create mode 100644 config.tests/vfp3/vfp3.pro
+
+diff --git a/config.tests/vfp2/vfp2.cpp b/config.tests/vfp2/vfp2.cpp
+new file mode 100644
+index 0000000..7b36d5c
+--- /dev/null
++++ b/config.tests/vfp2/vfp2.cpp
+@@ -0,0 +1,48 @@
++/****************************************************************************
++**
++** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
++** Contact: http://www.qt-project.org/
++**
++** This file is part of the config.tests of the Qt Toolkit.
++**
++** $QT_BEGIN_LICENSE:LGPL$
++** GNU Lesser General Public License Usage
++** This file may be used under the terms of the GNU Lesser General Public
++** License version 2.1 as published by the Free Software Foundation and
++** appearing in the file LICENSE.LGPL included in the packaging of this
++** file. Please review the following information to ensure the GNU Lesser
++** General Public License version 2.1 requirements will be met:
++** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
++**
++** In addition, as a special exception, Nokia gives you certain additional
++** rights. These rights are described in the Nokia Qt LGPL Exception
++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
++**
++** GNU General Public License Usage
++** Alternatively, this file may be used under the terms of the GNU General
++** Public License version 3.0 as published by the Free Software Foundation
++** and appearing in the file LICENSE.GPL included in the packaging of this
++** file. Please review the following information to ensure the GNU General
++** Public License version 3.0 requirements will be met:
++** http://www.gnu.org/copyleft/gpl.html.
++**
++** Other Usage
++** Alternatively, this file may be used in accordance with the terms and
++** conditions contained in a signed written agreement between you and Nokia.
++**
++**
++**
++**
++**
++**
++** $QT_END_LICENSE$
++**
++****************************************************************************/
++
++int main(int, char**)
++{
++ // pretend to do some floating point math, but none of this is required
++ double a = 0.03, b = 16.05;
++ double c = a * b;
++ return (int)c;
++}
+diff --git a/config.tests/vfp2/vfp2.pro b/config.tests/vfp2/vfp2.pro
+new file mode 100644
+index 0000000..fd91f41
+--- /dev/null
++++ b/config.tests/vfp2/vfp2.pro
+@@ -0,0 +1,15 @@
++CONFIG -= x11 qt
++SOURCES = vfp2.cpp
++OBJECTS_DIR = obj
++QMAKE_CXXFLAGS += -MD
++
++equals(QT_ARCH, "arm"):unix {
++ test.commands = readelf -A vfp2 | grep -q \'Tag_FP_arch: VFPv2\'
++ test.depends = vfp2
++ QMAKE_EXTRA_TARGETS += test
++
++ default.target = all
++ default.depends += test
++ QMAKE_EXTRA_TARGETS += default
++}
++
+diff --git a/config.tests/vfp3/vfp3.cpp b/config.tests/vfp3/vfp3.cpp
+new file mode 100644
+index 0000000..7b36d5c
+--- /dev/null
++++ b/config.tests/vfp3/vfp3.cpp
+@@ -0,0 +1,48 @@
++/****************************************************************************
++**
++** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
++** Contact: http://www.qt-project.org/
++**
++** This file is part of the config.tests of the Qt Toolkit.
++**
++** $QT_BEGIN_LICENSE:LGPL$
++** GNU Lesser General Public License Usage
++** This file may be used under the terms of the GNU Lesser General Public
++** License version 2.1 as published by the Free Software Foundation and
++** appearing in the file LICENSE.LGPL included in the packaging of this
++** file. Please review the following information to ensure the GNU Lesser
++** General Public License version 2.1 requirements will be met:
++** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
++**
++** In addition, as a special exception, Nokia gives you certain additional
++** rights. These rights are described in the Nokia Qt LGPL Exception
++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
++**
++** GNU General Public License Usage
++** Alternatively, this file may be used under the terms of the GNU General
++** Public License version 3.0 as published by the Free Software Foundation
++** and appearing in the file LICENSE.GPL included in the packaging of this
++** file. Please review the following information to ensure the GNU General
++** Public License version 3.0 requirements will be met:
++** http://www.gnu.org/copyleft/gpl.html.
++**
++** Other Usage
++** Alternatively, this file may be used in accordance with the terms and
++** conditions contained in a signed written agreement between you and Nokia.
++**
++**
++**
++**
++**
++**
++** $QT_END_LICENSE$
++**
++****************************************************************************/
++
++int main(int, char**)
++{
++ // pretend to do some floating point math, but none of this is required
++ double a = 0.03, b = 16.05;
++ double c = a * b;
++ return (int)c;
++}
+diff --git a/config.tests/vfp3/vfp3.pro b/config.tests/vfp3/vfp3.pro
+new file mode 100644
+index 0000000..adc5f46
+--- /dev/null
++++ b/config.tests/vfp3/vfp3.pro
+@@ -0,0 +1,15 @@
++CONFIG -= x11 qt
++SOURCES = vfp3.cpp
++OBJECTS_DIR = obj
++QMAKE_CXXFLAGS += -MD
++
++equals(QT_ARCH, "arm"):unix {
++ test.commands = readelf -A vfp3 | grep -q \'Tag_FP_arch: VFPv3\'
++ test.depends = vfp3
++ QMAKE_EXTRA_TARGETS += test
++
++ default.target = all
++ default.depends += test
++ QMAKE_EXTRA_TARGETS += default
++}
++
+diff --git a/qtjsbackend.pro b/qtjsbackend.pro
+index f2bd8e7..62179b8 100644
+--- a/qtjsbackend.pro
++++ b/qtjsbackend.pro
+@@ -1,4 +1,6 @@
+ load(configure)
+ qtCompileTest(hardfloat)
++qtCompileTest(vfp2)
++qtCompileTest(vfp3)
+
+ load(qt_parts)
+diff --git a/src/3rdparty/v8/src/arm/assembler-arm.cc b/src/3rdparty/v8/src/arm/assembler-arm.cc
+index ec28da4..922eec4 100644
+--- a/src/3rdparty/v8/src/arm/assembler-arm.cc
++++ b/src/3rdparty/v8/src/arm/assembler-arm.cc
+@@ -52,7 +52,7 @@ unsigned CpuFeatures::found_by_runtime_probing_ = 0;
+
+
+ // Get the CPU features enabled by the build. For cross compilation the
+-// preprocessor symbols CAN_USE_ARMV7_INSTRUCTIONS and CAN_USE_VFP_INSTRUCTIONS
++// preprocessor symbols CAN_USE_ARMV7_INSTRUCTIONS and CAN_USE_VFP3_INSTRUCTIONS
+ // can be defined to enable ARMv7 and VFPv3 instructions when building the
+ // snapshot.
+ static uint64_t CpuFeaturesImpliedByCompiler() {
+@@ -60,9 +60,12 @@ static uint64_t CpuFeaturesImpliedByCompiler() {
+ #ifdef CAN_USE_ARMV7_INSTRUCTIONS
+ answer |= 1u << ARMv7;
+ #endif // def CAN_USE_ARMV7_INSTRUCTIONS
+-#ifdef CAN_USE_VFP_INSTRUCTIONS
+- answer |= 1u << VFP3 | 1u << ARMv7;
+-#endif // def CAN_USE_VFP_INSTRUCTIONS
++#ifdef CAN_USE_VFP3_INSTRUCTIONS
++ answer |= 1u << VFP3 | 1u << VFP2 | 1u << ARMv7;
++#endif // def CAN_USE_VFP3_INSTRUCTIONS
++#ifdef CAN_USE_VFP2_INSTRUCTIONS
++ answer |= 1u << VFP2;
++#endif // def CAN_USE_VFP2_INSTRUCTIONS
+
+ #ifdef __arm__
+ // If the compiler is allowed to use VFP then we can use VFP too in our code
+@@ -1742,7 +1745,7 @@ void Assembler::vstr(const DwVfpRegister src,
+ // Instruction details available in ARM DDI 0406A, A8-786.
+ // cond(31-28) | 1101(27-24)| U000(23-20) | | Rbase(19-16) |
+ // Vsrc(15-12) | 1011(11-8) | (offset/4)
+- ASSERT(CpuFeatures::IsEnabled(VFP3));
++ ASSERT(CpuFeatures::IsEnabled(VFP3) || CpuFeatures::IsEnabled(VFP2));
+ int u = 1;
+ if (offset < 0) {
+ offset = -offset;
+@@ -2028,7 +2031,7 @@ void Assembler::vmov(const DwVfpRegister dst,
+ // Instruction details available in ARM DDI 0406A, A8-646.
+ // cond(31-28) | 1100(27-24)| 010(23-21) | op=0(20) | Rt2(19-16) |
+ // Rt(15-12) | 1011(11-8) | 00(7-6) | M(5) | 1(4) | Vm
+- ASSERT(CpuFeatures::IsEnabled(VFP3));
++ ASSERT(CpuFeatures::IsEnabled(VFP3) || CpuFeatures::IsEnabled(VFP2));
+ ASSERT(!src1.is(pc) && !src2.is(pc));
+ emit(cond | 0xC*B24 | B22 | src2.code()*B16 |
+ src1.code()*B12 | 0xB*B8 | B4 | dst.code());
+diff --git a/src/3rdparty/v8/src/arm/code-stubs-arm.cc b/src/3rdparty/v8/src/arm/code-stubs-arm.cc
+index bea3169..bc7b4c5 100644
+--- a/src/3rdparty/v8/src/arm/code-stubs-arm.cc
++++ b/src/3rdparty/v8/src/arm/code-stubs-arm.cc
+@@ -986,7 +986,7 @@ void FloatingPointHelper::CallCCodeForDoubleOperation(
+ __ push(lr);
+ __ PrepareCallCFunction(0, 2, scratch);
+ if (masm->use_eabi_hardfloat()) {
+- CpuFeatures::Scope scope(VFP3);
++ CpuFeatures::Scope scope(VFP2);
+ __ vmov(d0, r0, r1);
+ __ vmov(d1, r2, r3);
+ }
+@@ -998,7 +998,7 @@ void FloatingPointHelper::CallCCodeForDoubleOperation(
+ // Store answer in the overwritable heap number. Double returned in
+ // registers r0 and r1 or in d0.
+ if (masm->use_eabi_hardfloat()) {
+- CpuFeatures::Scope scope(VFP3);
++ CpuFeatures::Scope scope(VFP2);
+ __ vstr(d0,
+ FieldMemOperand(heap_number_result, HeapNumber::kValueOffset));
+ } else {
+@@ -1370,7 +1370,7 @@ static void EmitTwoNonNanDoubleComparison(MacroAssembler* masm,
+ __ push(lr);
+ __ PrepareCallCFunction(0, 2, r5);
+ if (masm->use_eabi_hardfloat()) {
+- CpuFeatures::Scope scope(VFP3);
++ CpuFeatures::Scope scope(VFP2);
+ __ vmov(d0, r0, r1);
+ __ vmov(d1, r2, r3);
+ }
+@@ -3428,7 +3428,7 @@ void TranscendentalCacheStub::GenerateCallCFunction(MacroAssembler* masm,
+
+ __ push(lr);
+ __ PrepareCallCFunction(0, 1, scratch);
+- if (masm->use_eabi_hardfloat()) {
++ if (masm->use_eabi_hardfloat() && CpuFeatures::IsSupported(VFP3)) {
+ __ vmov(d0, d2);
+ } else {
+ __ vmov(r0, r1, d2);
+diff --git a/src/3rdparty/v8/src/arm/macro-assembler-arm.cc b/src/3rdparty/v8/src/arm/macro-assembler-arm.cc
+index 4da2fec..7a3ed33 100644
+--- a/src/3rdparty/v8/src/arm/macro-assembler-arm.cc
++++ b/src/3rdparty/v8/src/arm/macro-assembler-arm.cc
+@@ -930,7 +930,7 @@ void MacroAssembler::LeaveExitFrame(bool save_doubles,
+ }
+
+ void MacroAssembler::GetCFunctionDoubleResult(const DoubleRegister dst) {
+- if (use_eabi_hardfloat()) {
++ if (use_eabi_hardfloat() && CpuFeatures::IsSupported(VFP3)) {
+ Move(dst, d0);
+ } else {
+ vmov(dst, r0, r1);
+@@ -3313,7 +3313,7 @@ void MacroAssembler::PrepareCallCFunction(int num_reg_arguments,
+
+
+ void MacroAssembler::SetCallCDoubleArguments(DoubleRegister dreg) {
+- if (use_eabi_hardfloat()) {
++ if (use_eabi_hardfloat() && CpuFeatures::IsSupported(VFP3)) {
+ Move(d0, dreg);
+ } else {
+ vmov(r0, r1, dreg);
+@@ -3323,7 +3323,7 @@ void MacroAssembler::SetCallCDoubleArguments(DoubleRegister dreg) {
+
+ void MacroAssembler::SetCallCDoubleArguments(DoubleRegister dreg1,
+ DoubleRegister dreg2) {
+- if (use_eabi_hardfloat()) {
++ if (use_eabi_hardfloat() && CpuFeatures::IsSupported(VFP3)) {
+ if (dreg2.is(d0)) {
+ ASSERT(!dreg1.is(d1));
+ Move(d1, dreg2);
+@@ -3341,7 +3341,7 @@ void MacroAssembler::SetCallCDoubleArguments(DoubleRegister dreg1,
+
+ void MacroAssembler::SetCallCDoubleArguments(DoubleRegister dreg,
+ Register reg) {
+- if (use_eabi_hardfloat()) {
++ if (use_eabi_hardfloat() && CpuFeatures::IsSupported(VFP3)) {
+ Move(d0, dreg);
+ Move(r0, reg);
+ } else {
+diff --git a/src/3rdparty/v8/src/v8globals.h b/src/3rdparty/v8/src/v8globals.h
+index 6a1766a..1868b91 100644
+--- a/src/3rdparty/v8/src/v8globals.h
++++ b/src/3rdparty/v8/src/v8globals.h
+@@ -442,6 +442,7 @@ enum CpuFeature { SSE4_1 = 32 + 19, // x86
+ CPUID = 10, // x86
+ VFP3 = 1, // ARM
+ ARMv7 = 2, // ARM
++ VFP2 = 4, // ARM
+ SAHF = 0, // x86
+ FPU = 1}; // MIPS
+
+diff --git a/src/v8/v8.pri b/src/v8/v8.pri
+index 45beffc..07d8fb6 100644
+--- a/src/v8/v8.pri
++++ b/src/v8/v8.pri
+@@ -153,12 +153,17 @@ equals(V8_TARGET_ARCH, arm) {
+ DEFINES += V8_TARGET_ARCH_ARM
+ config_hardfloat {
+ DEFINES += USE_EABI_HARDFLOAT=1
++ config_vfp3 {
++ DEFINES += CAN_USE_VFP3_INSTRUCTIONS
++ DEFINES += CAN_USE_VFP2_INSTRUCTIONS
++ }
++ config_vfp2 {
++ DEFINES += CAN_USE_VFP2_INSTRUCTIONS
++ }
+ } else {
+ DEFINES += USE_EABI_HARDFLOAT=0
+ }
+-# Disable VFP3 until we add an option to configure
+-# QTBUG-24760
+-false:DEFINES += CAN_USE_VFP_INSTRUCTIONS
++
+ SOURCES += \
+ $$V8SRC/arm/builtins-arm.cc \
+ $$V8SRC/arm/code-stubs-arm.cc \
+diff --git a/sync.profile b/sync.profile
+index 05b86d2..e71ca59 100644
+--- a/sync.profile
++++ b/sync.profile
+@@ -17,3 +17,10 @@
+ %dependencies = (
+ "qtbase" => "refs/heads/master",
+ );
++
++# compile tests
++%configtests = (
++ "hardfloat" => {},
++ "vfp3" => {},
++ "vfp2" => {},
++);
+--
+1.7.12.2
+
43 qt5-qtjsbackend-git/PKGBUILD
@@ -0,0 +1,43 @@
+# Maintainer: Sergio Correia <sergio.correia@uece.net>
+# Contributor: Anselmo L. S. Melo <anselmolsm@gmail.com>
+
+pkgname=qt5-qtjsbackend-git
+pkgver=20121004
+pkgrel=1
+pkgdesc="Qt 5: qtjsbackend module (includes QtV8)"
+arch=('i686' 'x86_64' 'armv6h')
+url="https://qt.gitorious.org/qt/qtjsbackend"
+license=('LGPL')
+depends=('python')
+makedepends=('gcc' 'git' 'qt5-qtbase-git')
+source=()
+md5sums=()
+
+if [ "$CARCH" = "armv6h" ]; then
+ source=('0001-V8-Add-support-for-using-armv6-vfp2-instructions.patch')
+ md5sums=('300d4bcd2dcedc13d7212a9534e19696')
+fi
+
+_gitroot="git://gitorious.org/qt/qtjsbackend.git"
+_gitname=qt5-qtjsbackend
+
+build() {
+ if [ ! -d "${_gitname}" ]; then
+ git clone ${_gitroot} ${_gitname} && cd ${_gitname}
+ else
+ cd ${_gitname} && git reset --hard && git pull origin && git clean -dfx
+ fi
+
+ msg "GIT checkout done."
+
+ [ "$CARCH" = "armv6h" ] && patch -uNp1 -i ../0001-V8-Add-support-for-using-armv6-vfp2-instructions.patch || return 1
+
+ /opt/qt5/bin/qmake
+ make
+}
+
+package() {
+ cd "${_gitname}"
+
+ make INSTALL_ROOT="${pkgdir}" install
+}
38 qt5-qtxmlpatterns-git/PKGBUILD
@@ -0,0 +1,38 @@
+# Maintainer: Sergio Correia <sergio.correia@uece.net>
+# Contributor: Anselmo L. S. Melo <anselmolsm@gmail.com>
+
+pkgname=qt5-qtxmlpatterns-git
+pkgver=20121004
+pkgrel=1
+pkgdesc="Qt 5: qtxmlpatterns module"
+groups=('qt5' 'qt5-addons')
+arch=('i686' 'x86_64' 'armv6h')
+url="https://qt.gitorious.org/qt/qtxmlpatterns"
+license=('LGPL')
+depends=('qt5-qtbase-git')
+makedepends=('git')
+options=('!libtool')
+source=()
+md5sums=()
+
+_gitroot="git://gitorious.org/qt/qtxmlpatterns.git"
+_gitname=qt5-qtxmlpatterns
+
+build() {
+ if [ ! -d "${_gitname}" ]; then
+ git clone ${_gitroot} ${_gitname} && cd ${_gitname}
+ else
+ cd ${_gitname} && git reset --hard && git pull origin && git clean -dfx
+ fi
+
+ msg "GIT checkout done."
+
+ /opt/qt5/bin/qmake
+ make
+}
+
+package() {
+ cd "${_gitname}"
+
+ make INSTALL_ROOT="${pkgdir}" install
+}
Please sign in to comment.
Something went wrong with that request. Please try again.