summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorDonald Carr2016-02-02 18:07:27 -0800
committerDonald Carr2016-02-02 18:18:13 -0800
commitdc3268273f54137e88c66c1f57a239705d2fddab (patch)
tree84d96abef19391d04cec44788ba3a545797074bb /PKGBUILD
parent0bf662edbdecc45574b11b6d73fb8fab0b274d55 (diff)
downloadaur-dc3268273f54137e88c66c1f57a239705d2fddab.tar.gz
Remove mandatory sysroot edit; introduce sanity check
Have wasted time on numerous occasions as/when egl/glesv2.pc have been reintroduced by updates Change-Id: I7a0209c1762457ffbf5fa0cf3214614d512b5d35
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD27
1 files changed, 20 insertions, 7 deletions
diff --git a/PKGBUILD b/PKGBUILD
index ac6178d904c6..d3d921ac6f95 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -10,19 +10,15 @@
# * rm /usr/lib/pkgconfig/glesv2.pc
# * rm /usr/lib/pkgconfig/egl.pc
-# NB! Mount/copy this prepped rasp rootfs somewhere and set this path as the sysroot below
-# I use NFS personally: sudo mount qpi2.local:/ /mnt/pi
-# comment this turkey out in any circumstance when you need to regenate .SRCINFO
+# I use NFS to develop against my sysroot personally: sudo mount qpi2.local:/ /mnt/pi
-# Mandatory edit
-
-echo "Set your sysroot below prior to build then delete this line" && exit 1
+# NB: Mandatory edit: set this variable to point to your raspberry pi's sysroot
_sysroot=/mnt/pi
# Options
-
_skip_web_engine=true
+# PKGBUILD
_piver=2
_pkgname=qt-sdk-raspberry-pi
provides=("${_pkgname}")
@@ -51,6 +47,23 @@ install=qpi.install
_fully_qualified_install_script="${startdir}/${install}"
_device_configure_flags=""
+#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 $_skip_web_engine || [[ ${_piver} = "1" ]]; then
_device_configure_flags="-skip qtwebengine"
fi