#!/usr/bin/bash
# JOBoRun		: Jwm OpenBox Obarun RUNit
# Maintainer	: Joe Bo Run <joborun@disroot.org>
# PkgSource		: url="https://gittea.disroot.org/joborun-pkg/jobextra/$pkgname"
# Website		: https://pozol.eu
#-----------------------------------------| DESCRIPTION |---------------------------------------

pkgname=libdrm
pkgver=2.4.114
pkgrel=01
pkgdesc="Userspace interface to kernel DRM services"
url="https://dri.freedesktop.org/"
arch=(x86_64)
depends=('libpciaccess')
makedepends=('python-docutils' 'meson')
checkdepends=('cairo') # 'valgrind') 2.4.113-2 built without valgrind
replaces=('libdrm-new' 'libdrm-nouveau')
# options=('debug')  ### uncomment this to have the debug pkg produced 
source=(https://dri.freedesktop.org/$pkgname/$pkgname-$pkgver.tar.xz{,.sig}
        COPYING)

build() {
  arch-meson $pkgname-$pkgver build \
    -D udev=false \
    -D etnaviv=disabled \
    -D freedreno=disabled \
    -D valgrind=disabled \
    -D install-test-programs=true \
    -D vc4=disabled
  meson compile -C build
}

check() {
  meson test -C build --print-errorlogs
}

package() {
  meson install -C build --destdir "$pkgdir"
  install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 COPYING
}

#---- license gpg-key sha256sums ----

license=('custom')

#validpgpkeys=('10A6D91DA1B05BD29F6DEBAC0C74F35979C486BE') # David Airlie <airlied@redhat.com>
validpgpkeys=('34FF9526CFEF0E97A340E2E40FDE7BE0E88F5E48') # emersion <contact@emersion.fr>
#validpgpkeys=('E9E246A89E65374EB8355796B8B5FA0EFC1EC2FE') # "Leo Liu <leo.liu@amd.com>"
#validpgpkeys=('899A810900B815807742E6D895A677A230AC4AA9') # Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
#validpgpkeys=('2617F6F8DEBB0A7A15C405C983FD600E340FB5FF') # Samuel Pitoiset <samuel.pitoiset@gmail.com>

sha256sums=(3049cf843a47d12e5eeefbc3be3496d782fa09f42346bf0b7defe3d1e598d026  # libdrm-2.4.114.tar.xz
	d582c38cef9e63aa7a96508c6bbbd8945d7e99dcd2145bacfddfa65c01e1567e  # libdrm-2.4.114.tar.xz.sig
	9631d4f694952e3e6ae5a05534c2e93e994e47d3413677a3a00e45c8cef6db93) # COPYING
 
 
 
