diff options
Diffstat (limited to 'patches/xserver-meson/0001-meson-Require-libdrm-for-dri1-2-3-when-configured-au.patch')
-rw-r--r-- | patches/xserver-meson/0001-meson-Require-libdrm-for-dri1-2-3-when-configured-au.patch | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/patches/xserver-meson/0001-meson-Require-libdrm-for-dri1-2-3-when-configured-au.patch b/patches/xserver-meson/0001-meson-Require-libdrm-for-dri1-2-3-when-configured-au.patch new file mode 100644 index 0000000..f48ec78 --- /dev/null +++ b/patches/xserver-meson/0001-meson-Require-libdrm-for-dri1-2-3-when-configured-au.patch @@ -0,0 +1,62 @@ +From 3a36386e634d75041a2d151bbb9f8f19de7ae233 Mon Sep 17 00:00:00 2001 +From: Jon Turney <jon.turney@dronecode.org.uk> +Date: Wed, 28 Feb 2018 14:21:14 +0000 +Subject: [PATCH xserver] meson: Require libdrm for dri1/2/3 when configured + 'auto' as well as 'true' + +If dri1/2/3 are configured for auto-detection, libdrm is required, as well +as the corresponding proto. (Practically we will always have the +corresponding protos now, as they are part of xorgproto). + +Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk> +--- + meson.build | 15 ++++++++++----- + 1 file changed, 10 insertions(+), 5 deletions(-) + +diff --git a/meson.build b/meson.build +index 77d3c9def..b87cb9be5 100644 +--- a/meson.build ++++ b/meson.build +@@ -277,20 +277,22 @@ endif + + build_glx = get_option('glx') + ++libdrm_dep = dependency('libdrm', version: '>= 2.3.1', required: false) ++ + if get_option('dri1') == 'auto' +- build_dri1 = xf86driproto_dep.found() ++ build_dri1 = xf86driproto_dep.found() and libdrm_dep.found() + else + build_dri1 = get_option('dri1') == 'true' + endif + + if get_option('dri2') == 'auto' +- build_dri2 = dri2proto_dep.found() ++ build_dri2 = dri2proto_dep.found() and libdrm_dep.found() + else + build_dri2 = get_option('dri2') == 'true' + endif + + if get_option('dri3') == 'auto' +- build_dri3 = dri3proto_dep.found() and xshmfence_dep.found() ++ build_dri3 = dri3proto_dep.found() and xshmfence_dep.found() and libdrm_dep.found() + else + build_dri3 = get_option('dri3') == 'true' + if build_dri3 +@@ -300,8 +302,11 @@ else + endif + endif + +-libdrm_required = (get_option('dri1') == 'true') or (get_option('dri2') == 'true') or (get_option('dri3') == 'true') +-libdrm_dep = dependency('libdrm', version: '>= 2.3.1', required: libdrm_required) ++libdrm_required = build_dri1 or build_dri2 or build_dri3 ++if not libdrm_dep.found() and libdrm_required ++ error('DRI requested, but LIBDRM not found') ++endif ++ + build_modesetting = false + if libdrm_dep.found() + if build_dri2 +-- +2.16.2 + |