unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
blob 6468c7cbf33e538807e3700aaca8eba4996ce53c 1216 bytes (raw)
name: gnu/packages/patches/wlroots-hwdata-fallback.patch 	 # note: path name is non-authoritative(*)

 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
 
backend/drm: add hardcoded hwdata path fallback

Add hardcoded fallback "/usr/share/hwdata/pnp.ids" as a
temporary solution to get things working in Guix until
hwdata ships with pkg-config file.

diff --git a/backend/drm/meson.build b/backend/drm/meson.build
index 6fcb2c15..ed95360a 100644
--- a/backend/drm/meson.build
+++ b/backend/drm/meson.build
@@ -1,8 +1,7 @@
 hwdata = dependency(
 	'hwdata',
-	required: 'drm' in backends,
+	required: false,
 	native: true,
-	not_found_message: 'Required for the DRM backend.',
 )
 
 libdisplay_info = dependency(
@@ -19,15 +18,21 @@ libliftoff = dependency(
 	required: false,
 )
 
-if not (hwdata.found() and libdisplay_info.found() and features['session'])
+if hwdata.found()
+	hwdata_dir = hwdata.get_variable(pkgconfig: 'pkgdatadir')
+	pnp_ids = files(hwdata_dir / 'pnp.ids')
+else
+	pnp_ids = files('/usr/share/hwdata/pnp.ids')
+endif
+
+if not (libdisplay_info.found() and features['session'])
 	subdir_done()
 endif
 
-hwdata_dir = hwdata.get_variable(pkgconfig: 'pkgdatadir')
 pnpids_c = custom_target(
 	'pnpids.c',
 	output: 'pnpids.c',
-	input: files(hwdata_dir / 'pnp.ids'),
+	input: pnp_ids,
 	feed: true,
 	capture: true,
 	command: files('gen_pnpids.sh'),


debug log:

solving 6468c7cbf3 ...
found 6468c7cbf3 in https://git.savannah.gnu.org/cgit/guix.git

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).