Module: Mesa
Branch: main
Commit: 40b87cde2ac6824d9827d897b9971c004c6c6586
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=40b87cde2ac6824d9827d897b9971c004c6c6586

Author: Dylan Baker <[email protected]>
Date:   Thu Apr 26 09:34:07 2018 -0700

meson: add wrap for libdrm

Sometimes as a developer when a new version of libdrm is required, it's
nice to not have to install it somewhere and set up pkg-confing, and
just let Meson do it for us.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10364>

---

 meson.build             | 10 ++++++++--
 subprojects/libdrm.wrap | 18 ++++++++++++++++++
 2 files changed, 26 insertions(+), 2 deletions(-)

diff --git a/meson.build b/meson.build
index bb984adc7bf..dd59bfd962b 100644
--- a/meson.build
+++ b/meson.build
@@ -1657,7 +1657,11 @@ foreach d : _libdrm_checks
   if d[1]
     set_variable(
       'dep_libdrm_' + d[0],
-      dependency('libdrm_' + d[0], version : '>=' + _drm_ver)
+      dependency(
+        'libdrm_' + d[0],
+        version : '>=' + _drm_ver,
+        allow_fallback: true,
+      )
     )
   endif
 endforeach
@@ -1665,7 +1669,9 @@ endforeach
 with_gallium_drisw_kms = false
 if system_has_kms_drm
   dep_libdrm = dependency(
-    'libdrm', version : '>=' + _drm_ver,
+    'libdrm',
+    version : '>=' + _drm_ver,
+    allow_fallback: true,
     # GNU/Hurd includes egl_dri2, without drm.
     required : (with_dri2 and host_machine.system() != 'gnu') or with_dri3
   )
diff --git a/subprojects/libdrm.wrap b/subprojects/libdrm.wrap
new file mode 100644
index 00000000000..7f8fe0f1a35
--- /dev/null
+++ b/subprojects/libdrm.wrap
@@ -0,0 +1,18 @@
+[wrap-file]
+directory = libdrm-2.4.114
+source_url = https://dri.freedesktop.org/libdrm/libdrm-2.4.114.tar.xz
+source_filename = libdrm-2.4.114.tar.xz
+source_hash = 3049cf843a47d12e5eeefbc3be3496d782fa09f42346bf0b7defe3d1e598d026
+wrapdb_version = 2.4.114-1
+
+[provide]
+libdrm = ext_libdrm
+libdrm_amdgpu = ext_libdrm_amdgpu
+libdrm_etnaviv = ext_libdrm_etnaviv
+libdrm_exynos = ext_libdrm_exynos
+libdrm_freedreno = ext_libdrm_freedreno
+libdrm_intel = ext_libdrm_intel
+libdrm_nouveau = ext_libdrm_nouveau
+libdrm_omap = ext_libdrm_omap
+libdrm_radeon = ext_libdrm_radeon
+libdrm_tegra = ext_libdrm_tegra

Reply via email to