summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDonald Carr2016-01-14 14:37:05 -0800
committerDonald Carr2016-01-14 15:56:02 -0800
commit14ceb7e285f579ea92f2e84e9d0c8028ad038a5b (patch)
tree9cea68519caa077f7327e108d15eeb7199f3b42e
parent675dff3ec644f2215be0f6d43c2031070bb1174d (diff)
downloadaur-14ceb7e285f579ea92f2e84e9d0c8028ad038a5b.tar.gz
Bring rpi 1 recipe up to speed with rpi 2 recipe
Change-Id: Ie5fb36279723a5b86bc7294c797b28ee78c5704b
-rw-r--r--PKGBUILD47
-rw-r--r--qpi.install112
-rw-r--r--qpi.sh5
3 files changed, 149 insertions, 15 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 6b7b0485e50..f6ee355105c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -37,10 +37,17 @@ pkgdesc="Cross compile Qt for the Raspberry Pi${_piver}"
arch=("x86_64")
url="http://www.qt.io"
license=("LGPL3")
-makedepends=("git" "pkgconfig" "gcc" "qpi-toolchain")
-source=("git://github.com/qtproject/qtquickcontrols2.git" "git://github.com/sirspudd/mkspecs.git" "https://download.qt.io/development_releases/qt/5.6/${_pkgver}/single/${_pipkgname}.tar.gz")
-sha256sums=("SKIP" "SKIP" "d69103ec34b3775edfa47581b14ee9a20789d4b0d7d26220fb92f2cd32eb06f9")
+depends=("qpi-toolchain" "qtcreator")
+makedepends=("git" "pkgconfig" "gcc")
+source=("git://github.com/sirspudd/mkspecs.git" "https://download.qt.io/development_releases/qt/5.6/${_pkgver}/single/${_pipkgname}.tar.gz")
+sha256sums=("SKIP" "d69103ec34b3775edfa47581b14ee9a20789d4b0d7d26220fb92f2cd32eb06f9")
options=('!strip')
+install=qpi.install
+_device_configure_flags=""
+
+if [[ ${_piver} = "1" ]]; then
+ _device_configure_flags="-skip qtwebengine -no-icu"
+fi
build() {
local _srcdir="${srcdir}/${_pipkgname}"
@@ -66,12 +73,32 @@ build() {
# -developer-build \
# -separate-debug-info \
+ # Chromium requires python2 to be the system python on your build host
+ # I literally symlink /usr/bin/python to /usr/bin/python2 on arch
+
+ # patch
+ local _webenginefileoverride="${_srcdir}/qtwebengine/tools/qmake/mkspecs/features/functions.prf"
+ sed -i "s/linux-clang/linux*/" ${_webenginefileoverride}
+ local _reducerelocations="${_srcdir}/qtbase/config.tests/unix/bsymbolic_functions.test"
+ sed -i "s/error/warning/" ${_reducerelocations}
+
+ # end patch
+
+ # Breaks in qtwayland
+ # -qtnamespace Pi \
+
${_srcdir}/configure \
-qreal float \
-release \
-silent \
-confirm-license \
-opensource \
+ -qtlibinfix Pi \
+ -reduce-exports \
+ -reduce-relocations \
+ -pch \
+ -ltcg \
+ -no-compile-examples \
-hostprefix ${_installprefix} \
-prefix ${_installprefix} \
-opengl es2 \
@@ -87,7 +114,8 @@ build() {
\
-sysroot ${_sysroot} \
-device ${_mkspec} \
- -device-option CROSS_COMPILE=/opt/arm-sirspuddarch-linux-gnueabihf/bin/arm-sirspuddarch-linux-gnueabihf-
+ -device-option CROSS_COMPILE=/opt/arm-sirspuddarch-linux-gnueabihf/bin/arm-sirspuddarch-linux-gnueabihf- \
+ ${_device_configure_flags}
make
@@ -98,12 +126,6 @@ build() {
cd "${_bindir}/qtwayland"
${_bindir}/qtbase/bin/qmake CONFIG+=wayland-compositor
make
-
- # temp hack
- cp -r "${srcdir}/qtquickcontrols2" "${_bindir}"
- cd "${_bindir}/qtquickcontrols2"
- ${_bindir}/qtbase/bin/qmake
- make
}
package() {
@@ -114,7 +136,6 @@ package() {
rm -Rf ${pkgdir}
mkdir -p ${pkgdir}
- # FIXME: installs both host/target bin/libs to pi path
cd "${_bindir}"
INSTALL_ROOT="$pkgdir" make install
@@ -122,10 +143,6 @@ package() {
cd "${_bindir}/qtwayland"
INSTALL_ROOT="$pkgdir" make install
- # temp hack
- cd "${_bindir}/qtquickcontrols2"
- INSTALL_ROOT="$pkgdir" make install
-
# Qt is now installed to $pkgdir/$sysroot/$prefix
# manually generate/decompose host/target
local _libsdir="${startdir}/${_libspkgname}"
diff --git a/qpi.install b/qpi.install
new file mode 100644
index 00000000000..b94afa83ce4
--- /dev/null
+++ b/qpi.install
@@ -0,0 +1,112 @@
+_piver="1"
+_sdktool="/usr/libexec/qtcreator/sdktool"
+_devicefamily="raspberrypi"
+_devicename="${_devicefamily}${_piver}"
+_familytext="Raspberry Pi"
+_devicetext="${_familytext} ${_piver}"
+_qmakepath="/opt/qt-5.6.0-beta-rpi${_piver}/bin/qmake"
+_sysroot="/mnt/pi"
+
+setup_toolchain() {
+${_sdktool} addTC \
+ --id "ProjectExplorer.ToolChain.Gcc:${_devicefamily}" \
+ --name "${_familytext} toolchain" \
+ --path /opt/arm-sirspuddarch-linux-gnueabihf/bin/arm-sirspuddarch-linux-gnueabihf-gcc \
+ --abi arm-linux-generic-elf-32bit \
+ --supportedAbis arm-linux-generic-elf-32bit
+
+${_sdktool} addDebugger \
+ --id "${_devicefamily}_gdb" \
+ --name "${_familytext} gdb" \
+ --binary /opt/arm-sirspuddarch-linux-gnueabihf/bin/arm-sirspuddarch-linux-gnueabihf-gdb \
+ --abis arm-linux-generic-elf-32bit \
+ --engine 1
+}
+
+remove_toolchain() {
+#TODO: Don't remove if the other pi package is present
+#Not used at present
+${_sdktool} rmTC \
+ --id "ProjectExplorer.ToolChain.Gcc:${_devicefamily}"
+
+${_sdktool} rmDebugger \
+ --id "${_devicefamily}_gdb"
+}
+
+remove_kit() {
+${_sdktool} rmQt \
+ --id "${_devicename}_qt"
+
+${_sdktool} rmKit \
+ --id "${_devicename}_kit"
+
+${_sdktool} rmDev \
+ --id "${_devicename}_device"
+}
+
+setup_kit() {
+ remove_kit
+ setup_toolchain
+
+${_sdktool} addDev \
+ --id "${_devicename}_device" \
+ --name "${_devicetext}" \
+ --host "qp${_piver}.local" \
+ --uname "root" \
+ --password "root" \
+ --osType "GenericLinuxOsType" \
+ --type 0 \
+ --sshPort 22 \
+ --freePorts "10000-10100"
+
+${_sdktool} addQt \
+ --id "${_devicename}_qt" \
+ --name "${_devicetext} Qt" \
+ --qmake ${_qmakepath} \
+ --type RemoteLinux.EmbeddedLinuxQt
+
+${_sdktool} addKit \
+ --id "${_devicename}_kit" \
+ --name "${_devicetext} Kit" \
+ --debugger "${_devicefamily}_gdb" \
+ --devicetype GenericLinuxOsType \
+ --device "${_devicename}_device" \
+ --sysroot ${_sysroot} \
+ --toolchain "ProjectExplorer.ToolChain.Gcc:${_devicefamily}" \
+ --qt "${_devicename}_qt" \
+ --mkspec "devices/linux-rpi${_piver}-g++"
+}
+
+## arg 1: the new package version
+pre_install() {
+ echo ""
+}
+
+## arg 1: the new package version
+post_install() {
+ setup_kit
+}
+#post_install
+
+## arg 1: the new package version
+## arg 2: the old package version
+pre_upgrade() {
+ echo ""
+}
+
+## arg 1: the new package version
+## arg 2: the old package version
+post_upgrade() {
+ setup_kit
+}
+
+## arg 1: the old package version
+pre_remove() {
+ echo ""
+}
+#pre_remove
+
+## arg 1: the old package version
+post_remove() {
+ remove_kit
+}
diff --git a/qpi.sh b/qpi.sh
new file mode 100644
index 00000000000..5dd134abadc
--- /dev/null
+++ b/qpi.sh
@@ -0,0 +1,5 @@
+export QT_QPA_PLATFORM=wayland
+export QT_WAYLAND_CLIENT_BUFFER_INTEGRATION=brcm
+
+PATH="localpiprefix:${PATH}"
+export PATH