diff options
author | Donald Carr | 2016-03-03 18:43:35 -0800 |
---|---|---|
committer | Donald Carr | 2016-03-03 18:43:35 -0800 |
commit | d5ca08aac4f24b71804ce53b6cc7bc941b22265d (patch) | |
tree | 0b9559688ccee9d784af46213721a986c8f0181e | |
parent | 4e4ef8d615e07897df8be891e0d2e08b34d11df4 (diff) | |
parent | 6107af538fba38ac958c4a961c43b940e222eaad (diff) | |
download | aur-d5ca08aac4f24b71804ce53b6cc7bc941b22265d.tar.gz |
Resolve conflicts
Merge remote-tracking branch 'pi2/master'
Change-Id: I41e2643ec4992dd9f9670694a0de19e862d9e270
-rw-r--r-- | .SRCINFO | 17 | ||||
-rw-r--r-- | PKGBUILD | 171 | ||||
-rw-r--r-- | PKGBUILD.libs | 13 | ||||
-rw-r--r-- | _qpi.install | 119 | ||||
-rw-r--r-- | qpi.install | 120 | ||||
-rw-r--r-- | qpi.sh | 2 |
6 files changed, 249 insertions, 193 deletions
@@ -1,9 +1,9 @@ # Generated by mksrcinfo v8 -# Wed Jan 27 21:12:06 UTC 2016 -pkgbase = qt-sdk-raspberry-pi1 - pkgdesc = Qt SDK for the Raspberry Pi1 +# Fri Mar 4 02:43:21 UTC 2016 +pkgbase = qt-sdk-raspberry-pi2 + pkgdesc = Qt SDK for the Raspberry Pi2 pkgver = 5.6.0 - pkgrel = 5 + pkgrel = 9 url = http://www.qt.io install = qpi.install arch = x86_64 @@ -14,11 +14,14 @@ pkgbase = qt-sdk-raspberry-pi1 makedepends = gcc depends = qpi-toolchain depends = qtcreator + provides = qt-sdk-raspberry-pi2 + conflicts = qt-sdk-raspberry-pi2 + replaces = qt-sdk-raspberry-pi2 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 + source = https://download.qt.io/development_releases/qt/5.6/5.6.0-rc/single/qt-everywhere-opensource-src-5.6.0-rc.7z sha256sums = SKIP - sha256sums = d69103ec34b3775edfa47581b14ee9a20789d4b0d7d26220fb92f2cd32eb06f9 + sha256sums = 82ed4bc1bf7735747e1612f322f8723dfd84f05fa4dca9398863e6527a0c1971 -pkgname = qt-sdk-raspberry-pi1 +pkgname = qt-sdk-raspberry-pi2 @@ -1,70 +1,117 @@ -# Maintainer: Donald Carr <sirspudd@gmail.com> +# Contributer: Donald Carr <sirspudd@gmail.com> -# Documentation +# set -x -# 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 +# Documentation -# Remove 2 (mesa) pkgconfig files we allow screw our mkspec -# rm /usr/lib/pkgconfig/glesv2.pc -# rm /usr/lib/pkgconfig/egl.pc +# Set up the pi for Qt compilation. +# For a comprehensive set of deps I just install chromium which pulls in everything -# You are gonna want to export the following vars in /etc/profile.d -# if you intend to primarily use Wayland +#* I had to removed xcomposite as code path breaks +#* Remove 2 (mesa) pkgconfig files we allow to screw our mkspec +# * rm /usr/lib/pkgconfig/glesv2.pc +# * rm /usr/lib/pkgconfig/egl.pc -#export QT_QPA_PLATFORM=wayland -#export QT_WAYLAND_CLIENT_BUFFER_INTEGRATION=brcm +# I use NFS to develop against my sysroot personally: sudo mount qpi2.local:/ /mnt/pi -# 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 +# NB: Mandatory edit: set this variable to point to your raspberry pi's sysroot +_sysroot=/mnt/pi # Options +_skip_web_engine=false +_static_build=false +_build_from_head=false +_local_qt5_repo="/opt/dev/src/qtproject/qt5" +_wayland_compositor=true + +pkgver=5.6.0 +pkgrel=9 -_skip_web_engine=true +# PKGBUILD +_piver=2 +pkgname="qt-sdk-raspberry-pi${_piver}" -# comment this turkey out in any circumstance when you need to regenate .SRCINFO -#echo "Set your sysroot prior to build" && exit 1 -_sysroot=/mnt/pi +if $_static_build; then + pkgname="${pkgname}-static" +fi -_piver=1 -pkgname=qt-sdk-raspberry-pi${_piver} +if $_build_from_head; then + _pkgver=6.6.6 +fi + +provides=("${pkgname}") +conflicts=("${pkgname}") +replaces=("${pkgname}") _packaginguser=$(whoami) _libspkgname="${pkgname}-target-libs" _mkspec="linux-rpi${_piver}-g++" -pkgver=5.6.0 -_pkgver=${pkgver}-beta +_pkgver=${pkgver}-rc _baseprefix=/opt -_installprefix=${_baseprefix}/${pkgname}-${_pkgver} -_pipkgname=qt-everywhere-opensource-src-${_pkgver} -pkgrel=5 +_installprefix=${_baseprefix}/${pkgname} +_source_package_name=qt-everywhere-opensource-src-${_pkgver} pkgdesc="Qt SDK for the Raspberry Pi${_piver}" arch=("x86_64") url="http://www.qt.io" license=("LGPL3" "GPL3") 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") +source=("git://github.com/sirspudd/mkspecs.git" "https://download.qt.io/development_releases/qt/5.6/${_pkgver}/single/${_source_package_name}.7z") +sha256sums=("SKIP" "82ed4bc1bf7735747e1612f322f8723dfd84f05fa4dca9398863e6527a0c1971") options=('!strip') install=qpi.install _fully_qualified_install_script="${startdir}/${install}" _device_configure_flags="" -if $_skip_web_engine || [[ ${_piver} = "1" ]]; then - _device_configure_flags="-skip qtwebengine" +#Sanity check +__pkgconfigpath="${_sysroot}/usr/lib/pkgconfig" +__eglpkgconfigpath="${__pkgconfigpath}/egl.pc" +__glespkgconfigpath="${__pkgconfigpath}/glesv2.pc" + +if [[ ! -d ${__pkgconfigpath} ]]; then + echo "You have to set a valid sysroot to proceed with the build" + exit 1 +fi + +if [[ -f ${__eglpkgconfigpath} ]] || [[ -f ${__glespkgconfigpath} ]] ; then + echo "Mesa is about to eat our communal poodle; delete egl.pc and glesv2.pc in your sysroot" + exit 1 +fi + +#end sanity check + +if $_static_build || $_skip_web_engine || [[ ${_piver} = "1" ]]; then + _device_configure_flags="$_device_configure_flags -skip qtwebengine" +fi + +if $_static_build; then + _device_configure_flags="$_device_configure_flags -static" +fi + +if $_build_from_head; then + _device_configure_flags="$_device_configure_flags -skip qt3d -skip qtsystems -skip qttools -skip qtwebkit" +fi + +if $_wayland_compositor; then + _device_configure_flags="$_device_configure_flags -skip qtwayland" fi build() { - local _srcdir="${srcdir}/${_pipkgname}" + local _srcdir="${srcdir}/${_source_package_name}" local _bindir="${_srcdir}-build" + local _mkspec_dir="${_srcdir}/qtbase/mkspecs/devices/${_mkspec}" # Qt tries to do the right thing and stores these, breaking cross compilation unset LDFLAGS unset CFLAGS unset CXXFLAGS +if $_build_from_head; then + _srcdir="${_local_qt5_repo}" +fi + # Get our mkspec - cp -r "${srcdir}/mkspecs/${_mkspec}" ${_srcdir}/qtbase/mkspecs/devices + rm -Rf $_mkspec_dir + cp -r "${srcdir}/mkspecs/${_mkspec}" $_mkspec_dir mkdir -p ${_bindir} cd ${_bindir} @@ -83,9 +130,13 @@ build() { # patch local _webenginefileoverride="${_srcdir}/qtwebengine/tools/qmake/mkspecs/features/functions.prf" - sed -i "s/linux-clang/linux*/" ${_webenginefileoverride} + sed -i "s/linux-clang/linux*/" ${_webenginefileoverride} || exit 1 local _reducerelocations="${_srcdir}/qtbase/config.tests/unix/bsymbolic_functions.test" - sed -i "s/error/warning/" ${_reducerelocations} + sed -i "s/error/warning/" ${_reducerelocations} || exit 1 + + # No longer required as we explicitly set CFLAGS = foo in the mkspec + # Work around our embarresing propensity to stomp on your own tailored build configuration + sed -i "s/O[23]/Os/" ${_srcdir}/qtbase/mkspecs/common/gcc-base.conf || exit 1 # end patch @@ -115,41 +166,37 @@ build() { -no-xcb \ \ -skip qtscript \ - -skip qtwayland \ - -skip qtquickcontrols2 \ + -skip qtenginio \ \ -sysroot ${_sysroot} \ -device ${_mkspec} \ -device-option CROSS_COMPILE=/opt/arm-sirspuddarch-linux-gnueabihf/bin/arm-sirspuddarch-linux-gnueabihf- \ - ${_device_configure_flags} + ${_device_configure_flags} || exit 1 - make + make || exit 1 +if $_wayland_compositor; then # regrettably required, as qtwayland barfs on shadow builds # as private header paths not included: no clue how to fix, bypassing - cp -r "${_srcdir}/qtwayland" "${_bindir}" + cp -r "${_srcdir}/qtwayland" "${_bindir}" || exit 1 cd "${_bindir}/qtwayland" - ${_bindir}/qtbase/bin/qmake CONFIG+=wayland-compositor - make + ${_bindir}/qtbase/bin/qmake CONFIG+=wayland-compositor || exit 1 + make || exit 1 +fi } create_install_script() { - local _fully_qualified_install_script_template="${startdir}/_${install}" - - rm ${_fully_qualified_install_script} + local _install_script_location="${startdir}/${install}" - # populate vars - echo "piver=\"${_piver}\"" >> ${_fully_qualified_install_script} - echo "_qmakepath=\"${_installprefix}/bin/qmake\"" >> ${_fully_qualified_install_script} - echo "_sysroot=\"${_sysroot}\"" >> ${_fully_qualified_install_script} - - cat ${_fully_qualified_install_script_template} >> ${_fully_qualified_install_script} + sed -i "s/libspiver/${_piver}/" ${_install_script_location} || exit 1 + sed -i "s,libsqmakepath,${_installprefix}/bin/qmake," ${_install_script_location} || exit 1 + sed -i "s,libssysroot,${_sysroot}," ${_install_script_location} || exit 1 } package() { - local _srcdir="${srcdir}/${_pipkgname}" + local _srcdir="${srcdir}/${_source_package_name}" local _bindir="${_srcdir}-build" create_install_script @@ -159,11 +206,13 @@ package() { mkdir -p ${pkgdir} cd "${_bindir}" - INSTALL_ROOT="$pkgdir" make install + INSTALL_ROOT="$pkgdir" make install || exit 1 +if $_wayland_compositor; then # regrettably required cd "${_bindir}/qtwayland" - INSTALL_ROOT="$pkgdir" make install + INSTALL_ROOT="$pkgdir" make install || exit 1 +fi # Qt is now installed to $pkgdir/$sysroot/$prefix # manually generate/decompose host/target @@ -177,19 +226,21 @@ package() { cp ${startdir}/PKGBUILD.libs ${_libspkgbuild} mv "${pkgdir}/${_sysroot}/${_baseprefix}" ${_libspkgdir} # set correct libs version - sed -i "s/libspackagename/${_libspkgname}/" ${_libspkgbuild} - sed -i "s/libspiversion/${_piver}/" ${_libspkgbuild} - - sed -i "s/6.6.6/${pkgver}/" ${_libspkgbuild} + sed -i "s/libspkgrel/${pkgrel}/" ${_libspkgbuild} || exit 1 + sed -i "s/libspkgver/${pkgver}/" ${_libspkgbuild} || exit 1 + sed -i "s/libspkgname/${_libspkgname}/" ${_libspkgbuild} || exit 1 + sed -i "s/libspiver/${_piver}/" ${_libspkgbuild} || exit 1 - mkdir -p ${_pkgprofiled} - cp ${startdir}/qpi.sh ${_pkgprofiled} - sed -i "s,localpiprefix,${_installprefix}," ${_pkgprofiled}/qpi.sh + if ! ${_static_build}; then + mkdir -p ${_pkgprofiled} + cp ${startdir}/qpi.sh ${_pkgprofiled} || exit 1 + sed -i "s,localpiprefix,${_installprefix}," ${_pkgprofiled}/qpi.sh || exit 1 + fi cd ${_libsdir} - runuser -l ${_packaginguser} -c 'makepkg -f' + runuser -l ${_packaginguser} -c 'makepkg -d -f' || exit 1 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} + mv ${_libsdir}/${_libspkgname}-${pkgver}-${pkgrel}-any.pkg.tar.xz ${startdir} } diff --git a/PKGBUILD.libs b/PKGBUILD.libs index f6240f53016a..5cbf068a82db 100644 --- a/PKGBUILD.libs +++ b/PKGBUILD.libs @@ -1,16 +1,21 @@ # Maintainer: Donald Carr <sirspudd@gmail.com> -pkgname=libspackagename -pkgver=6.6.6 -pkgrel=1 +pkgname=libspkgname +provides=("${pkgname}") +conflicts=("${pkgname}") +replaces=("${pkgname}") +pkgver=libspkgver +pkgrel=libspkgrel pkgdesc="Qt ${pkgver} libs cross compiled for the Raspberry Pi libspiversion" # I don't know how to set this correct for cross architecture builds arch=("any") url="http://www.qt.io" -license=("LGPL3") +license=("LGPL3" "GPL3") source=() sha256sums=() options=('!strip') +# qtwebengine flac snappy libsrtp jsoncpp libvpx speex opus libxml2 libwebp icu +depends=("ttf-croscore" "ttf-dejavu" "fontconfig" "wayland" "libxkbcommon" "gstreamer" "flac" "snappy" "libsrtp" "jsoncpp" "libvpx" "speex" "opus" "libxml2" "libwebp" "icu") package() { mv ${startdir}/topkg/* ${pkgdir} diff --git a/_qpi.install b/_qpi.install deleted file mode 100644 index ce73b32cf718..000000000000 --- a/_qpi.install +++ /dev/null @@ -1,119 +0,0 @@ -# will be injected by toplevel PKGBUILD -#_piver="1" -#_qmakepath="/opt/qt-5.6.0-beta-rpi${_piver}/bin/qmake" -#_sysroot="/mnt/pi" - -_sdktool="/usr/libexec/qtcreator/sdktool" -_devicefamily="raspberrypi" -_devicename="${_devicefamily}${_piver}" -_familytext="Raspberry Pi" -_devicetext="${_familytext} ${_piver}" - -setup_toolchain() { - echo "Registering toolchain with Qt Creator" -${_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 - - echo "Registering debugger with Qt Creator" -${_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 - - echo "Registering device with Qt Creator" -${_sdktool} addDev \ - --id "${_devicename}_device" \ - --name "${_devicetext}" \ - --host "qpi${_piver}.local" \ - --uname "root" \ - --password "root" \ - --osType "GenericLinuxOsType" \ - --type 0 \ - --sshPort 22 \ - --freePorts "10000-10100" - - echo "Registering Qt install with Qt Creator" -${_sdktool} addQt \ - --id "${_devicename}_qt" \ - --name "${_devicetext} Qt" \ - --qmake ${_qmakepath} \ - --type RemoteLinux.EmbeddedLinuxQt - - echo "Creating Qt Creator Kit" -${_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.install b/qpi.install index b78a688b70ed..cc174752cc28 100644 --- a/qpi.install +++ b/qpi.install @@ -1,2 +1,118 @@ -# This is a dummy file; pkgman insists on its existence -# despite the fact I want it to contain variables defined once, in the PKGBUILD +_piver="libspiver" +_qmakepath="libsqmakepath" +_sysroot="libssysroot" + +_sdktool="/usr/libexec/qtcreator/sdktool" +_devicefamily="raspberrypi" +_devicename="${_devicefamily}${_piver}" +_familytext="Raspberry Pi" +_devicetext="${_familytext} ${_piver}" + +setup_toolchain() { + echo "Registering toolchain with Qt Creator" +${_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 + + echo "Registering debugger with Qt Creator" +${_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 + + echo "Registering device with Qt Creator" +${_sdktool} addDev \ + --id "${_devicename}_device" \ + --name "${_devicetext}" \ + --host "qpi${_piver}.local" \ + --uname "root" \ + --password "root" \ + --osType "GenericLinuxOsType" \ + --type 0 \ + --sshPort 22 \ + --freePorts "10000-10100" + + echo "Registering Qt install with Qt Creator" +${_sdktool} addQt \ + --id "${_devicename}_qt" \ + --name "${_devicetext} Qt" \ + --qmake ${_qmakepath} \ + --type RemoteLinux.EmbeddedLinuxQt + + echo "Creating Qt Creator Kit" +${_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 +} @@ -1,5 +1,5 @@ export QT_QPA_PLATFORM=wayland export QT_WAYLAND_CLIENT_BUFFER_INTEGRATION=brcm -PATH="localpiprefix:${PATH}" +PATH="localpiprefix/bin:${PATH}" export PATH |