# Maintainer: Robert Yang pkgname=libdrm-grate pkgver=2.4.91 pkgrel=1 pkgdesc="Userspace interface to kernel DRM services" url="https://github.com/grate-driver/libdrm" arch="armhf armv7" # Requires a computer with gfx, no X running, build user in 'video' group.. options="!check !tracedeps" license="MIT" depends="ldpath" depends_dev="linux-headers" makedepends="$depends_dev libpthread-stubs eudev-dev libpciaccess-dev xmlto autoconf automake libtool m4 util-macros" checkdepends="cunit-dev bash" subpackages="$pkgname-dev $pkgname-doc" install="$pkgname.post-install $pkgname.pre-deinstall" _commit="004e90d68c72b020765184484cbef47ea47225a8" source="https://github.com/grate-driver/libdrm/archive/$_commit.tar.gz ioctl.patch " replaces_doc="libdrm-doc" _pkgname=libdrm builddir="$srcdir/$_pkgname-$_commit" build() { cd "$builddir" export VALGRIND_CFLAGS="$VALGRIND_CFLAGS -I/usr/include/valgrind/" ./autogen.sh \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/share/man \ --localstatedir=/var \ --disable-radeon \ --disable-amdgpu \ --disable-nouveau \ --disable-vmwgfx \ --disable-freedreno \ --disable-vc4 \ --enable-tegra-experimental-api \ --enable-udev \ --disable-valgrind make } check() { cd "$builddir" make check } package() { cd "$builddir" make DESTDIR="$pkgdir" install cd "$pkgdir"/usr/lib install -d libdrm-grate/ mv lib*.so.* libdrm-grate/ mv lib*.la libdrm-grate/ } dev() { default_dev cd "$subpkgdir"/usr/lib install -d libdrm-grate/ mv lib*.so libdrm-grate/ install -d pkgconfig/libdrm-grate/ mv pkgconfig/*.pc pkgconfig/libdrm-grate/ # Move headers (to /usr/include/libdrm-grate) cd "$subpkgdir"/usr mv include include_ mkdir include mv include_ include/libdrm-grate # Redirect pkgconfig to alternate lib/header directory local pc cd "$subpkgdir"/usr/lib/pkgconfig/libdrm-grate for pc in *; do sed -i "s./include$./include/libdrm-grate.g" $pc sed -i "s./lib$./lib/libdrm-grate.g" $pc done } doc() { default_doc replaces="libdrm-doc" } sha512sums="43833572f015e0ec228f96b0727c0ac0a722c1fc629de30b3ed05ef51bb34dc7a8246e42257ac82ec511d9f2ff62a2b79e62293ee9fd6ab6a6fa8dd23f8b6be6 004e90d68c72b020765184484cbef47ea47225a8.tar.gz af52fef51aaa05a4dd17919371cb9d92a77480402730bf53ba223e54df52f3825be05a7f28e6aef8c904db5ee59fe38a6c15bc6aafa7f8d31a719e80399dd51f ioctl.patch"