# Template file for 'drm_info'
pkgname=drm_info
version=2.10.0
revision=1
build_style=meson
hostmakedepends="pkg-config scdoc"
makedepends="libdrm-devel json-c-devel"
short_desc="Small utility to dump info about DRM devices"
maintainer="RunningDroid <runningdroid@zoho.com>"
license="MIT"
homepage="https://gitlab.freedesktop.org/emersion/drm_info"
changelog="https://gitlab.freedesktop.org/emersion/drm_info/-/tags"
distfiles="https://gitlab.freedesktop.org/emersion/drm_info/-/archive/v${version}/drm_info-v${version}.tar.bz2"
checksum=bec22a3836da30cb00a23fde80b816b7753dbf4103edf5b68fd0dbe37818f842

post_patch() {
	# pkg-config variables are not sysroot-prefixed, so the
	# drm_fourcc.h lookup breaks when cross compiling
	vsed -i meson.build \
		-e "s|libdrm.get_variable(pkgconfig: 'includedir')|'${XBPS_CROSS_BASE}/usr/include'|"
}

post_install() {
	vlicense LICENSE
}
