From ed875bb9f8f805ed30571b4e73d14ce8b471f96f Mon Sep 17 00:00:00 2001 From: Kevin Mihelich Date: Sun, 27 Mar 2016 18:30:28 +0000 Subject: [PATCH] added qt5-webkit --- .../qt5-webkit/0001-Add-ARM-64-support.patch | 13 ++++ extra/qt5-webkit/PKGBUILD | 68 +++++++++++++++++++ extra/qt5-webkit/qt5-webkit-pthread.patch | 32 +++++++++ ...002-Fix-QtWebKit-build-on-ARM-softfp.patch | 35 ++++++++++ 4 files changed, 148 insertions(+) create mode 100644 extra/qt5-webkit/0001-Add-ARM-64-support.patch create mode 100644 extra/qt5-webkit/PKGBUILD create mode 100644 extra/qt5-webkit/qt5-webkit-pthread.patch create mode 100644 extra/qt5-webkit/qt5webkit-0002-Fix-QtWebKit-build-on-ARM-softfp.patch diff --git a/extra/qt5-webkit/0001-Add-ARM-64-support.patch b/extra/qt5-webkit/0001-Add-ARM-64-support.patch new file mode 100644 index 000000000..73f5c97f8 --- /dev/null +++ b/extra/qt5-webkit/0001-Add-ARM-64-support.patch @@ -0,0 +1,13 @@ +diff --git a/Source/WTF/wtf/Platform.h b/Source/WTF/wtf/Platform.h +index 4594ec8..639f28f 100644 +--- a/Source/WTF/wtf/Platform.h ++++ b/Source/WTF/wtf/Platform.h +@@ -342,7 +342,7 @@ + #endif + #endif + +-#if CPU(ARM) || CPU(MIPS) || CPU(SH4) || CPU(SPARC) || CPU(MIPS64) ++#if CPU(ARM) || CPU(MIPS) || CPU(SH4) || CPU(SPARC) || CPU(MIPS64) || CPU(AARCH64) + #define WTF_CPU_NEEDS_ALIGNED_ACCESS 1 + #endif + diff --git a/extra/qt5-webkit/PKGBUILD b/extra/qt5-webkit/PKGBUILD new file mode 100644 index 000000000..1d5c33ebb --- /dev/null +++ b/extra/qt5-webkit/PKGBUILD @@ -0,0 +1,68 @@ +# $Id: PKGBUILD 240297 2015-06-03 10:22:03Z fyan $ +# Maintainer: Felix Yan +# Contributor: Andrea Scarpino + +# ALARM: Kevin Mihelich +# - icu makedepend +# - patch for soft-float armv5 +# - patch for AArch64 support in qtwebkit + +pkgname=qt5-webkit +_qtver=5.6.0 +pkgver=${_qtver/-/} +pkgrel=2 +arch=('i686' 'x86_64') +url='http://qt-project.org/' +license=('GPL3' 'LGPL' 'FDL' 'custom') +pkgdesc='Classes for a WebKit2 based implementation and a new QML API' +depends=('qt5-location' 'qt5-sensors' 'qt5-webchannel' 'libwebp' 'libxslt' 'libxcomposite' 'gst-plugins-base') +makedepends=('ruby' 'gperf' 'python2' 'icu') +optdepends=('gst-plugins-good: Webm codec support') +conflicts=('qt') +groups=('qt' 'qt5') +_pkgfqn="${pkgname/5-/}-opensource-src-${pkgver}" +source=("http://download.qt.io/community_releases/${pkgver%.*}/${pkgver}/qtwebkit-opensource-src-${pkgver}.tar.xz" + qt5-webkit-pthread.patch + qt5webkit-0002-Fix-QtWebKit-build-on-ARM-softfp.patch + 0001-Add-ARM-64-support.patch) +md5sums=('eba1382587add1c9b1293a532e7dd161' + 'f65286024f65ca87837171272fc8975d') + +prepare() { + mkdir -p build + +# Hack to force python2 + mkdir -p bin + ln -s /usr/bin/python2 bin/python + +# Fix linking to pthread + cd ${_pkgfqn} + patch -p1 -i ../qt5-webkit-pthread.patch + +# ARM fixes + patch -p1 -i ../qt5webkit-0002-Fix-QtWebKit-build-on-ARM-softfp.patch + patch -p1 -i ../0001-Add-ARM-64-support.patch + +# Generate headers + syncqt.pl-qt5 -version 5.6.0 Source/sync.profile +} + +build() { + cd build + + export PATH="${srcdir}/bin:$PATH" + qmake ../${_pkgfqn} + make +} + +package() { + cd build + make INSTALL_ROOT="$pkgdir" install + + # Drop QMAKE_PRL_BUILD_DIR because reference the build dir + find "$pkgdir/usr/lib" -type f -name '*.prl' \ + -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \; + + install -d "$pkgdir"/usr/share/licenses + ln -s /usr/share/licenses/qt5-base "$pkgdir"/usr/share/licenses/${pkgname} +} diff --git a/extra/qt5-webkit/qt5-webkit-pthread.patch b/extra/qt5-webkit/qt5-webkit-pthread.patch new file mode 100644 index 000000000..53d543924 --- /dev/null +++ b/extra/qt5-webkit/qt5-webkit-pthread.patch @@ -0,0 +1,32 @@ +From 5f359baacdf92fabcece83f0a2b30f74c7c02a3c Mon Sep 17 00:00:00 2001 +From: Allan Sandfeld Jensen +Date: Mon, 22 Feb 2016 10:57:32 +0100 +Subject: [PATCH] Fix linking with libpthread + +WebKit use libpthread directly but is depending on other qt modules +causing it to be linked against, which might break unless -lpthread +is last. Instead just add it explicitly after the static libraries. + +Change-Id: I2b95cff2c96373f8dce6f95052c4fccbe1982b33 +Reviewed-by: Simon Hausmann +(cherry picked from commit 5dd4bb67cfce812fd7686e43616e2069f354a7df) +Reviewed-by: Allan Sandfeld Jensen +--- + Tools/qmake/mkspecs/features/default_post.prf | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/Tools/qmake/mkspecs/features/default_post.prf b/Tools/qmake/mkspecs/features/default_post.prf +index 67276b7..39bb3f7 100644 +--- a/Tools/qmake/mkspecs/features/default_post.prf ++++ b/Tools/qmake/mkspecs/features/default_post.prf +@@ -201,6 +201,7 @@ needToLink() { + linkAgainstLibrary($$library, $$eval(WEBKIT.$${library_identifier}.root_source_dir)) + LIBS += $$eval(WEBKIT.$${library_identifier}.dependent_libs) + } ++ posix:!darwin: LIBS += -lpthread + } + + creating_module { +-- +2.7.1 + diff --git a/extra/qt5-webkit/qt5webkit-0002-Fix-QtWebKit-build-on-ARM-softfp.patch b/extra/qt5-webkit/qt5webkit-0002-Fix-QtWebKit-build-on-ARM-softfp.patch new file mode 100644 index 000000000..fc0eb22fd --- /dev/null +++ b/extra/qt5-webkit/qt5webkit-0002-Fix-QtWebKit-build-on-ARM-softfp.patch @@ -0,0 +1,35 @@ +From 8a716a29721d900069d82878c45cf87a356adba3 Mon Sep 17 00:00:00 2001 +From: Allan Sandfeld Jensen +Date: Tue, 17 Dec 2013 12:26:58 +0100 +Subject: [PATCH] Fix QtWebKit build on ARM softfp + +The low level interpreter depends on hardfp, so we need to disable it +when builing on ARM targets with softfp. + +Task-number: QTBUG-35681 +Change-Id: I8aaef546b92182a87cc7116ac452d8725de6a7db +Reviewed-by: Jocelyn Turcotte +Signed-off-by: Fatih Aşıcı +--- + Source/WTF/wtf/Platform.h | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/Source/WTF/wtf/Platform.h b/Source/WTF/wtf/Platform.h +index 3a9b509..cddc210 100644 +--- a/Source/WTF/wtf/Platform.h ++++ b/Source/WTF/wtf/Platform.h +@@ -803,6 +803,11 @@ + #define ENABLE_LLINT 0 + #endif + ++/* LLINT on ARM depends on an FPU */ ++#if !defined(ENABLE_LLINT) && CPU(ARM) && !CPU(ARM_HARDFP) ++#define ENABLE_LLINT 0 ++#endif ++ + /* On some of the platforms where we have a JIT, we want to also have the + low-level interpreter. */ + #if !defined(ENABLE_LLINT) \ +-- +1.8.5.1 +