# Maintainer: Timo Teräs pkgname=raspberrypi pkgver=0.20160202 _commitid=2a4af2192c0e161555fdb2a12e902b587166c4a6 pkgrel=0 pkgdesc="Raspberry Pi support tools" url="https://github.com/raspberrypi/userland" arch="armhf" license="BSD" depends="" depends_dev="linux-headers raspberrypi-libs" makedepends="cmake $depends_dev" install="" options="!fhs" subpackages="$pkgname-dev $pkgname-libs" source="raspberrypi-$pkgver.tar.gz::https://github.com/raspberrypi/userland/archive/$_commitid.tar.gz fix-build.patch " _sourcedir="$srcdir"/userland-$_commitid _builddir="$srcdir"/build prepare() { local i cd "$_sourcedir" for i in $source; do case $i in *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; esac done } build() { mkdir -p "$_builddir" cd "$_builddir" # -Wno-error=array-bounds is workaround for gcc bug 59124 cmake -DCMAKE_C_FLAGS="$CFLAGS -D_GNU_SOURCE -Wno-error=array-bounds" \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_RPATH=/opt/vc/lib \ $_sourcedir || return 1 make } package() { cd "$_builddir" make install DESTDIR="$pkgdir" || return 1 # nuke the unwanted stuff rm -rf "$pkgdir"/opt/vc/src rm -rf "$pkgdir"/opt/vc/lib/*.a } libs() { pkgdesc="Raspberry Pi support libraries" mkdir -p "$subpkgdir"/opt/vc/lib mv "$pkgdir"/opt/vc/lib/* "$subpkgdir"/opt/vc/lib } md5sums="dd863d22e4d6e9b018ad0d4a888658df raspberrypi-0.20160202.tar.gz 71e462b752fbf710bb025c5ac056ab2c fix-build.patch" sha256sums="5c25eb4de5feb11fdf74d58779f4cc615cda6623b81648ae15ae5e4ddf94c5ce raspberrypi-0.20160202.tar.gz c65cefe64f39456166701f8c0e6fbaa3e617b935929397df5f87b6238f73feba fix-build.patch" sha512sums="e0ccf4c71b802c98358df16eb62fbbaf6dcd567cb5b0b6938c463624e4034debaf0d3aa20f3275dea9d313574c5ce6e004e7aebef976aad3bd49cf5e136a4b78 raspberrypi-0.20160202.tar.gz f0780bfe1dd8b2fb3a78e5c8a9f22f36c15f2d1e703b83f4dae7908159ccc59a51502a90d26a5faa7e05ac539f15651fa0d60d4d4728d7d26f963174e406e646 fix-build.patch"