summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIsaac David <isacdaavid@isacdaavid.info>2017-03-18 14:43:25 -0600
committerIsaac David <isacdaavid@isacdaavid.info>2017-03-18 14:43:25 -0600
commitdae3d22293f962ce4705af3bd2d7b4074f9b0adb (patch)
tree2b6b3934e4c91b1eae82837101fc05631d56a46d
parent8af0e128f2b639dc5ff4aae6991bccad53d6e99d (diff)
downloadabslibre-dae3d22293f962ce4705af3bd2d7b4074f9b0adb.tar.gz
abslibre-dae3d22293f962ce4705af3bd2d7b4074f9b0adb.tar.bz2
abslibre-dae3d22293f962ce4705af3bd2d7b4074f9b0adb.zip
qtcreator: add patch to build on ARM
-rw-r--r--libre/qtcreator/0001-Fix-Allow-qt-creator-to-build-on-arm-aarch32-and-aar.patch94
-rw-r--r--libre/qtcreator/PKGBUILD14
2 files changed, 104 insertions, 4 deletions
diff --git a/libre/qtcreator/0001-Fix-Allow-qt-creator-to-build-on-arm-aarch32-and-aar.patch b/libre/qtcreator/0001-Fix-Allow-qt-creator-to-build-on-arm-aarch32-and-aar.patch
new file mode 100644
index 000000000..84e268712
--- /dev/null
+++ b/libre/qtcreator/0001-Fix-Allow-qt-creator-to-build-on-arm-aarch32-and-aar.patch
@@ -0,0 +1,94 @@
+From c6d02dba2911d93e2379cfb5e550b93558dd51bf Mon Sep 17 00:00:00 2001
+From: Greg Nietsky <gregory@distrotech.co.za>
+Date: Tue, 4 Mar 2014 11:33:40 +0200
+Subject: [PATCH] Fix: Allow qt-creator to build on arm aarch32 and aarch64
+
+Botan is imported hardwired for x86 this small patch allows it
+too operate on arm other platforms could be added.
+
+Task-number: QTCREATORBUG-8107
+Change-Id: Iddea28f21c9fa1afd2fdd5d16a44e6c96a516a7a
+---
+ src/libs/3rdparty/botan/botan.cpp | 16 +++++++++++++++-
+ src/libs/3rdparty/botan/botan.h | 2 ++
+ 2 files changed, 17 insertions(+), 1 deletion(-)
+
+diff --git a/src/libs/3rdparty/botan/botan.cpp b/src/libs/3rdparty/botan/botan.cpp
+index 917c385..4364a2e 100644
+--- a/src/libs/3rdparty/botan/botan.cpp
++++ b/src/libs/3rdparty/botan/botan.cpp
+@@ -1101,6 +1101,8 @@ class Montgomery_Exponentiator : public Modular_Exponentiator
+
+ #if (BOTAN_MP_WORD_BITS != 32)
+ #error The mp_x86_32 module requires that BOTAN_MP_WORD_BITS == 32
++#elif !defined(BOTAN_TARGET_CPU_IS_X86_FAMILY)
++typedef Botan::u64bit dword;
+ #endif
+
+ #ifdef Q_OS_UNIX
+@@ -1118,6 +1120,7 @@ extern "C" {
+ */
+ inline word word_madd2(word a, word b, word* c)
+ {
++#if defined(BOTAN_TARGET_CPU_IS_X86_FAMILY)
+ asm(
+ ASM("mull %[b]")
+ ASM("addl %[c],%[a]")
+@@ -1127,6 +1130,11 @@ inline word word_madd2(word a, word b, word* c)
+ : "0"(a), "1"(b), [c]"g"(*c) : "cc");
+
+ return a;
++#else
++ dword z = (dword)a * b + *c;
++ *c = (word)(z >> BOTAN_MP_WORD_BITS);
++ return (word)z;
++#endif
+ }
+
+ /*
+@@ -1134,6 +1142,7 @@ inline word word_madd2(word a, word b, word* c)
+ */
+ inline word word_madd3(word a, word b, word c, word* d)
+ {
++#if defined(BOTAN_TARGET_CPU_IS_X86_FAMILY)
+ asm(
+ ASM("mull %[b]")
+
+@@ -1147,6 +1156,11 @@ inline word word_madd3(word a, word b, word c, word* d)
+ : "0"(a), "1"(b), [c]"g"(c), [d]"g"(*d) : "cc");
+
+ return a;
++#else
++ dword z = (dword)a * b + c + *d;
++ *d = (word)(z >> BOTAN_MP_WORD_BITS);
++ return (word)z;
++#endif
+ }
+
+ }
+@@ -2315,7 +2329,7 @@ namespace Botan {
+
+ extern "C" {
+
+-#ifdef Q_OS_UNIX
++#if defined(Q_OS_UNIX) && defined(BOTAN_TARGET_CPU_IS_X86_FAMILY)
+ /*
+ * Helper Macros for x86 Assembly
+ */
+diff --git a/src/libs/3rdparty/botan/botan.h b/src/libs/3rdparty/botan/botan.h
+index 6a9cbe0..3bfdbc2 100644
+--- a/src/libs/3rdparty/botan/botan.h
++++ b/src/libs/3rdparty/botan/botan.h
+@@ -81,7 +81,9 @@
+ #endif
+
+ #define BOTAN_TARGET_CPU_IS_LITTLE_ENDIAN
++#if !defined(__arm__) && !defined(__aarch64__)
+ #define BOTAN_TARGET_CPU_IS_X86_FAMILY
++#endif
+ #define BOTAN_TARGET_UNALIGNED_MEMORY_ACCESS_OK 1
+
+ #if defined(BOTAN_TARGET_CPU_IS_LITTLE_ENDIAN) || \
+--
+2.3.0
+
diff --git a/libre/qtcreator/PKGBUILD b/libre/qtcreator/PKGBUILD
index 994c79e47..6432e5cf7 100644
--- a/libre/qtcreator/PKGBUILD
+++ b/libre/qtcreator/PKGBUILD
@@ -10,9 +10,9 @@
pkgname=qtcreator
pkgver=4.2.1
_pkgver=v4.2.1
-pkgrel=3.parabola1
+pkgrel=3.parabola1.1
pkgdesc='Lightweight, cross-platform integrated development environment, without nonfree qt5-webengine support'
-arch=('i686' 'x86_64')
+arch=('i686' 'x86_64' 'armv7h')
url='http://qt-project.org'
license=('LGPL')
depends=('qt5-tools' 'qt5-declarative' 'qt5-script' 'qt5-quickcontrols' 'qt5-quickcontrols2' 'clang' 'qbs')
@@ -29,14 +29,20 @@ optdepends=('qt5-doc: integrated Qt documentation'
'bzr: bazaar support'
'valgrind: analyze support')
source=("http://download.qt.io/official_releases/qtcreator/4.2/${pkgver}/qt-creator-opensource-src-${pkgver}.tar.xz"
- 'libre.patch')
+ 'libre.patch'
+ '0001-Fix-Allow-qt-creator-to-build-on-arm-aarch32-and-aar.patch')
sha512sums=('3135b64a36240bffe41c1373d5e5d5327cfa556f42eb339afcacf2f8d294843b96269269417ab262ba8292e28a57472c78ab7ff4686f0360616a4014c75809e9'
- '57dd505e183661463567b6a7711a7b58f1d5e5b6ecc808acbae4df78366ed3d08be9eb04f6883ad8fd15318c826645e655e7028136b16a801e0084d3a2b51b2a')
+ '57dd505e183661463567b6a7711a7b58f1d5e5b6ecc808acbae4df78366ed3d08be9eb04f6883ad8fd15318c826645e655e7028136b16a801e0084d3a2b51b2a'
+ 'af0a0d5a2fadcfce14def65be73c99bff8227794b9ad2be333713c89e226e2c6b43802a802b6e30f3e6c1b4b77f31183bffdcca3404d9686f15fa84dfc64d1a1')
prepare() {
cd $srcdir/qt-creator-opensource-src-$pkgver
patch -p1 -i ../libre.patch
rm -rv src/plugins/help/webenginehelpviewer.{cpp,h}
+
+ if [[ "$CARCH" =~ ^arm*|^aarch64$ ]]; then
+ git apply ../0001-Fix-Allow-qt-creator-to-build-on-arm-aarch32-and-aar.patch
+ fi
}
build() {