diff --git a/DEVELOPERS b/DEVELOPERS index 8c9b89c249..6f5008ab89 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -2103,6 +2103,7 @@ F: board/octavo/osd32mp1-brk/ F: board/octavo/osd32mp1-red/ F: configs/octavo_osd32mp1_brk_defconfig F: configs/octavo_osd32mp1_red_defconfig +F: package/drm-info/ N: Kris Bahnsen F: package/wilc-firmware/ diff --git a/package/Config.in b/package/Config.in index 49ff5e957c..d7791bdd3d 100644 --- a/package/Config.in +++ b/package/Config.in @@ -306,6 +306,7 @@ menu "Graphic libraries and applications (graphic/text)" comment "Graphic applications" source "package/cage/Config.in" source "package/cog/Config.in" + source "package/drm-info/Config.in" source "package/flutter-packages/Config.in" source "package/flutter-pi/Config.in" source "package/foot/Config.in" diff --git a/package/drm-info/0001-Revert-Find-drm_fourcc.h-in-sysroot.patch b/package/drm-info/0001-Revert-Find-drm_fourcc.h-in-sysroot.patch new file mode 100644 index 0000000000..3e70f3d1cf --- /dev/null +++ b/package/drm-info/0001-Revert-Find-drm_fourcc.h-in-sysroot.patch @@ -0,0 +1,47 @@ +From c94d00730d0c25a4a4c46abfcf27823919ac9854 Mon Sep 17 00:00:00 2001 +From: Kory Maincent +Date: Mon, 16 Mar 2026 18:50:09 +0100 +Subject: [PATCH] Revert "Find drm_fourcc.h in sysroot" + +This reverts commit cde94140f08775dc4df7eaac766556218d9e1321 + +When cross-compiling, pkg-config's includedir variable already returns +an absolute path that includes the sysroot prefix (e.g. +/sysroot/usr/include). Prepending pc_sysrootdir to it duplicates the +prefix and produces a broken path. + +The reverted commit introduced the double-prefix issue. Drop pc_sysrootdir +and use includedir directly, which already carries the correct absolute +path. + +The workaround was only needed for the legacy pkg-config 0.29 (2017) +project, which did not apply PKG_CONFIG_SYSROOT_DIR to includedir. +The actively maintained pkgconf project handles this correctly, and +the legacy tool is no longer in widespread use. + +You can verify the behavior with: + $ PKG_CONFIG_SYSROOT_DIR="/bla" pkg-config --variable=includedir libdrm + /bla/usr/include + +Upstream: https://gitlab.freedesktop.org/emersion/drm_info/-/merge_requests/114 +Signed-off-by: Kory Maincent +--- + meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index 1f80024..e4ce03e 100644 +--- a/meson.build ++++ b/meson.build +@@ -68,7 +68,7 @@ if libdrm.version().version_compare('<2.4.130') + elif libdrm.type_name() == 'internal' + fourcc_h = meson.current_source_dir() / 'subprojects/libdrm/include/drm/drm_fourcc.h' + else +- fourcc_h = libdrm.get_variable(pkgconfig: 'pc_sysrootdir') + libdrm.get_variable(pkgconfig: 'includedir') / 'libdrm/drm_fourcc.h' ++ fourcc_h = libdrm.get_variable(pkgconfig: 'includedir') / 'libdrm/drm_fourcc.h' + endif + + # The DRM_BUS_FAUX bus and its information is included in libdrm v2.4.127 +-- +2.43.0 + diff --git a/package/drm-info/Config.in b/package/drm-info/Config.in new file mode 100644 index 0000000000..49b8fd6f2c --- /dev/null +++ b/package/drm-info/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_DRM_INFO + bool "drm_info" + depends on BR2_TOOLCHAIN_HAS_THREADS # libdrm + select BR2_PACKAGE_JSON_C + select BR2_PACKAGE_LIBDRM + help + Small utility to dump info about DRM devices. + + https://gitlab.freedesktop.org/emersion/drm_info + +comment "drm_info needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/drm-info/drm-info.hash b/package/drm-info/drm-info.hash new file mode 100644 index 0000000000..de852cb5eb --- /dev/null +++ b/package/drm-info/drm-info.hash @@ -0,0 +1,3 @@ +# Locally computed: +sha256 53ef974ac657a0b4b9d7424a65b7f92e6ca26c15e8356f4146ae8bb9cae2db44 drm_info-2.9.0.tar.gz +sha256 05a54b690d8851143a8b923cfe8ac48f49050f9d2166e7eb0c1d340242d7f46a LICENSE diff --git a/package/drm-info/drm-info.mk b/package/drm-info/drm-info.mk new file mode 100644 index 0000000000..25deb18f00 --- /dev/null +++ b/package/drm-info/drm-info.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# drm-info +# +################################################################################ + +DRM_INFO_VERSION = 2.9.0 +DRM_INFO_SITE = https://gitlab.freedesktop.org/emersion/drm_info/-/releases/v$(DRM_INFO_VERSION)/downloads +DRM_INFO_SOURCE = drm_info-$(DRM_INFO_VERSION).tar.gz +DRM_INFO_LICENSE = MIT +DRM_INFO_LICENSE_FILES = LICENSE +DRM_INFO_DEPENDENCIES = \ + json-c \ + libdrm + +$(eval $(meson-package))