diff options
author | Donald Carr | 2015-12-31 15:20:34 -0800 |
---|---|---|
committer | Donald Carr | 2016-01-01 21:28:20 -0800 |
commit | 1f38bcf795669ba2e803d6d68fc8c2d55e180335 (patch) | |
tree | ed2cdeee6d3571d981da3a2f62c4a768cf5821a3 | |
download | aur-1f38bcf795669ba2e803d6d68fc8c2d55e180335.tar.gz |
Introduce PKGBUILD for cross compiling Qt for the Raspberry Pi 2
Change-Id: I982c08180c7642a2679328eda9d42796b9eab295
-rw-r--r-- | .SRCINFO | 21 | ||||
-rw-r--r-- | PKGBUILD | 71 |
2 files changed, 92 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..e6ffbe1f0066 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,21 @@ +# Generated by mksrcinfo v8 +# Sat Jan 2 05:27:55 UTC 2016 +pkgbase = qpii + pkgdesc = Qt for the pi2, coz this shouldnt be obtuse + pkgver = 5.6.0 + pkgrel = 1 + url = http://www.qt.io + arch = x86_64 + arch = i686 + license = LGPL3 + makedepends = git + makedepends = pkgconfig + makedepends = gcc + makedepends = arm-bcm2708-linux-gnueabi + source = git://github.com/sirspudd/mkspecs.git + source = https://download.qt.io/development_releases/qt/5.6/5.6.0-beta/single/qt-everywhere-opensource-src-5.6.0-beta.tar.gz + sha256sums = SKIP + sha256sums = d69103ec34b3775edfa47581b14ee9a20789d4b0d7d26220fb92f2cd32eb06f9 + +pkgname = qpii + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..3f3cb989d581 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,71 @@ +# Maintainer: Donald Carr <sirspudd@gmail.com> + +# Set up the pi for Qt compilation. On Arch I just install chromium which pulls in all the deps +# Mount/copy this prepped rasp rootfs somewhere and set this path as the sysroot below +echo "Set your sysroot" && exit 1 +_sysroot=/mnt/pi + +pkgname=qpii +_piver=pi2 +_mkspec="linux-r${_piver}-g++" +pkgver=5.6.0 +_pkgver=${pkgver}-beta +_pipkgname=qt-everywhere-opensource-src-${_pkgver} +pkgrel=1 +pkgdesc="Qt for the ${_piver}, coz this shouldnt be obtuse" +arch=("x86_64" "i686") +url="http://www.qt.io" +license=("LGPL3") +makedepends=("git" "pkgconfig" "gcc" "arm-bcm2708-linux-gnueabi") +source=("git://github.com/sirspudd/mkspecs.git" "https://download.qt.io/development_releases/qt/5.6/${_pkgver}/single/${_pipkgname}.tar.gz") +sha256sums=("SKIP" "d69103ec34b3775edfa47581b14ee9a20789d4b0d7d26220fb92f2cd32eb06f9") +#sha256sums=("SKIP" "eb7c430f9f73d8f9d1a0d328e8a77549ffcf3b9915bee0c3dd6ae9ceffb86ef9") + +build() { + local _srcdir="${srcdir}/${_pipkgname}" + local _bindir="${_srcdir}-build" + + # Qt tries to do the right thing and stores these, breaking cross compilation + unset LDFLAGS + unset CFLAGS + unset CXXFLAGS + + # Get our mkspec + cp -r "${srcdir}/mkspecs/${_mkspec}" ${_srcdir}/qtbase/mkspecs/devices + + mkdir -p ${_bindir} + cd ${_bindir} + + # skipping because of errors: qtwayland + # skipping on principle: qtscript + # skipping because of the target in question: widgets qtwebengine qtwebchannel + + ${_srcdir}/configure \ + -release \ + -confirm-license \ + -opensource \ + -prefix /opt/qt-${_pkgver}-${_piver} \ + -opengl es2 \ + \ + -no-widgets \ + -make libs \ + \ + -skip qtscript \ + -skip qtwebengine \ + -skip qtwebchannel \ + -skip qtwayland \ + \ + -sysroot ${_sysroot} \ + -device ${_mkspec} \ + -device-option CROSS_COMPILE=/opt/arm-bcm2708hardfp-linux-gnueabi/bin/arm-bcm2708hardfp-linux-gnueabi- + + make +} + +package() { + local _srcdir="${srcdir}/${_pipkgname}" + local _bindir="${_srcdir}-build" + + cd "${_bindir}" + INSTALL_ROOT="$pkgdir" make install +} |