summarylogtreecommitdiffstats
path: root/0011-wayland-drm-install-wayland-drm.xml-to-the-configure.patch
blob: b66dee9aaaa2b00d26817dd20915881c5464e96f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
From fae108178b762f188109471f50cecdaada7362d7 Mon Sep 17 00:00:00 2001
From: Frank Binns <frank.binns@imgtec.com>
Date: Thu, 18 Aug 2016 15:52:28 +0100
Subject: [PATCH] wayland-drm: install wayland-drm.xml to the configured
 pkgdatadir

Add a pkg-config file as well so that it can be located without hardcoding the
path.

---
 src/egl/wayland/wayland-drm/meson.build       | 15 +++++++++++++++
 src/egl/wayland/wayland-drm/wayland-drm.pc.in |  7 +++++++
 2 files changed, 22 insertions(+)
 create mode 100644 src/egl/wayland/wayland-drm/wayland-drm.pc.in

diff --git a/src/egl/wayland/wayland-drm/meson.build b/src/egl/wayland/wayland-drm/meson.build
index b4782a0..f291ef9 100644
--- a/src/egl/wayland/wayland-drm/meson.build
+++ b/src/egl/wayland/wayland-drm/meson.build
@@ -49,6 +49,21 @@ libwayland_drm = static_library(
   build_by_default : false,
 )
 
+install_data('wayland-drm.xml')
+
+pkg.generate(
+  filebase : 'wayland-drm',
+  name : 'Mesa Wayland Protocols',
+  description : 'Mesa Wayland protocol files',
+  version : meson.project_version(),
+  variables : [
+     'datarootdir=${prefix}/' + get_option('datadir'),
+     'pkgdatadir=${pc_sysrootdir}${datarootdir}/' + meson.project_name(),
+  ],
+  install_dir : '@0@/@1@/pkgconfig'.format(get_option('prefix'),
+                get_option('datadir')),
+)
+
 # linux-dmabuf isn't part of wayland-drm, but this happens to be the only
 # place which is a) guaranteed to be built when building either or both
 # of EGL and Vulkan WSI, and b) guaranteed to be included before both,
diff --git a/src/egl/wayland/wayland-drm/wayland-drm.pc.in b/src/egl/wayland/wayland-drm/wayland-drm.pc.in
new file mode 100644
index 0000000..d08ccda
--- /dev/null
+++ b/src/egl/wayland/wayland-drm/wayland-drm.pc.in
@@ -0,0 +1,7 @@
+prefix=@prefix@
+datarootdir=@datarootdir@
+pkgdatadir=${pc_sysrootdir}@datadir@/@PACKAGE@
+
+Name: @PACKAGE_NAME@ Wayland Protocols
+Description: @PACKAGE_NAME@ Wayland protocol files
+Version: @PACKAGE_VERSION@
\ No newline at end of file