summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDonald Carr2016-01-08 01:03:50 -0800
committerDonald Carr2016-01-08 01:29:23 -0800
commit697d6b845b0224d60fb17c7de17786df728bc56d (patch)
tree6e2c2b27c5998307f813496a103a5e168e721342
parent896b18be9fd0238456c0941ab3ef3a8d96cbc001 (diff)
downloadaur-697d6b845b0224d60fb17c7de17786df728bc56d.tar.gz
Update qpi to reflect state of qpii
Change-Id: I6395af0a696b4ac4e1decb5ec1d367b625f3df16
-rw-r--r--.SRCINFO10
-rw-r--r--PKGBUILD80
-rw-r--r--qpi-libs-PKGBUILD17
3 files changed, 89 insertions, 18 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 33a771db577f..5e3fac541877 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,17 +1,17 @@
# Generated by mksrcinfo v8
-# Thu Dec 31 23:17:43 UTC 2015
+# Fri Jan 8 09:01:50 UTC 2016
pkgbase = qpi
- pkgdesc = Qt for the pi, coz this shouldnt be obtuse
+ pkgdesc = Cross compile Qt for the Raspberry Pi1
pkgver = 5.6.0
- pkgrel = 1
+ pkgrel = 4
url = http://www.qt.io
arch = x86_64
- arch = i686
license = LGPL3
makedepends = git
makedepends = pkgconfig
makedepends = gcc
- makedepends = arm-bcm2708-linux-gnueabi
+ makedepends = qpi-toolchain
+ options = !strip
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
diff --git a/PKGBUILD b/PKGBUILD
index eecf3559ed04..73ccd30f5e50 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,11 +3,18 @@
# Documentation
# Set up the pi for Qt compilation. On Arch I just install chromium which pulls in all the deps
+# Removed xcomposite as code path breaks
# Remove 2 (mesa) pkgconfig files we allow screw our mkspec
# rm /usr/lib/pkgconfig/glesv2.pc
# rm /usr/lib/pkgconfig/egl.pc
+# You are gonna want to export the following vars in /etc/profile.d
+# if you intend to primarily use Wayland
+
+#export QT_QPA_PLATFORM=wayland
+#export QT_WAYLAND_CLIENT_BUFFER_INTEGRATION=brcm
+
# Mount/copy this prepped rasp rootfs somewhere and set this path as the sysroot below
# I use NFS personally: sudo mount qpii.local:/ /mnt/pi
@@ -15,22 +22,25 @@
echo "Set your sysroot prior to build" && exit 1
_sysroot=/mnt/pi
+_packaginguser=$(whoami)
pkgname=qpi
-_piver=pi
-
-_mkspec="linux-r${_piver}-g++"
+_libspkgname="${pkgname}-libs"
+_piver=1
+_mkspec="linux-rpi${_piver}-g++"
pkgver=5.6.0
_pkgver=${pkgver}-beta
+_baseprefix=/opt
+_installprefix=${_baseprefix}/qt-${_pkgver}-rpi${_piver}
_pipkgname=qt-everywhere-opensource-src-${_pkgver}
-pkgrel=1
-pkgdesc="Qt for the ${_piver}, coz this shouldnt be obtuse"
-arch=("x86_64" "i686")
+pkgrel=4
+pkgdesc="Cross compile Qt for the Raspberry Pi${_piver}"
+arch=("x86_64")
url="http://www.qt.io"
license=("LGPL3")
-makedepends=("git" "pkgconfig" "gcc" "arm-bcm2708-linux-gnueabi")
+makedepends=("git" "pkgconfig" "gcc" "qpi-toolchain")
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")
+options=('!strip')
build() {
local _srcdir="${srcdir}/${_pipkgname}"
@@ -47,16 +57,21 @@ build() {
mkdir -p ${_bindir}
cd ${_bindir}
- # skipping because of errors: qtwayland
# skipping on principle: qtscript, xcb
- # skipping because of the target in question: widgets qtwebengine qtwebchannel
+ # skipping because of the target in question: widgets qtwebchannel
+ # TODO: qtwebengine, a little bulky but useful
+
+ # Too bleeding big
+ # -developer-build \
+ # -separate-debug-info \
${_srcdir}/configure \
- -silent \
-release \
+ -silent \
-confirm-license \
-opensource \
- -prefix /opt/qt-${_pkgver}-${_piver} \
+ -hostprefix ${_installprefix} \
+ -prefix ${_installprefix} \
-opengl es2 \
-egl \
\
@@ -71,15 +86,54 @@ build() {
\
-sysroot ${_sysroot} \
-device ${_mkspec} \
- -device-option CROSS_COMPILE=/opt/arm-bcm2708hardfp-linux-gnueabi/bin/arm-bcm2708hardfp-linux-gnueabi-
+ -device-option CROSS_COMPILE=/opt/arm-sirspuddarch-linux-gnueabihf/bin/arm-sirspuddarch-linux-gnueabihf-
make
+
+ # regrettably required, as qtwayland barfs on shadow builds
+ # as private header paths not included: no clue how to fix, bypassing
+
+ cp -r ${_srcdir}/qtwayland .
+ cd qtwayland
+ ../qtbase/bin/qmake CONFIG+=wayland-compositor
+ make
}
package() {
local _srcdir="${srcdir}/${_pipkgname}"
local _bindir="${_srcdir}-build"
+ # cleanup
+ rm -Rf ${pkgdir}
+ mkdir -p ${pkgdir}
+
+ # FIXME: installs both host/target bin/libs to pi path
cd "${_bindir}"
INSTALL_ROOT="$pkgdir" make install
+
+ # regrettably required
+ cd "${_bindir}"/qtwayland
+ INSTALL_ROOT="$pkgdir" make install
+
+ # Qt is now installed to $pkgdir/$sysroot/$prefix
+ # manually generate/decompose host/target
+ local _libsdir="${startdir}/${_libspkgname}"
+ local _libspkgdir="${_libsdir}/topkg"
+ local _libspkgbuild="${_libsdir}/PKGBUILD"
+
+ rm -Rf ${_libspkgdir}
+ mkdir -p ${_libspkgdir}
+
+ cp ${startdir}/${_libspkgname}-PKGBUILD ${_libspkgbuild}
+ mv "${pkgdir}/${_sysroot}/${_baseprefix}" ${_libspkgdir}
+
+ # set correct libs version
+ sed -i "s/6.6.6/${pkgver}/" ${_libspkgbuild}
+
+ cd ${_libsdir}
+ runuser -l ${_packaginguser} -c 'makepkg -f'
+
+ echo "the libs package for the Raspberry Pi${_piver} is in the ${_packaginguser} home directory awaiting deployment"
+
+ mv ${_libsdir}/${_libspkgname}-${pkgver}-1-any.pkg.tar.xz ${HOME}
}
diff --git a/qpi-libs-PKGBUILD b/qpi-libs-PKGBUILD
new file mode 100644
index 000000000000..6c906f4f997f
--- /dev/null
+++ b/qpi-libs-PKGBUILD
@@ -0,0 +1,17 @@
+# Maintainer: Donald Carr <sirspudd@gmail.com>
+
+pkgname=qpi-libs
+pkgver=6.6.6
+pkgrel=1
+pkgdesc="Qt ${pkgver} libs for the ${_piver}"
+# I don't know how to set this correct for cross architecture builds
+arch=("any")
+url="http://www.qt.io"
+license=("LGPL3")
+source=()
+sha256sums=()
+options=('!strip')
+
+package() {
+ mv ${startdir}/topkg/* ${pkgdir}
+}