1 |
commit: d9f6a167bf1e31a756ba9b89809291a66d29f216 |
2 |
Author: Haelwenn (lanodan) Monnier <contact <AT> hacktivis <DOT> me> |
3 |
AuthorDate: Thu Jan 28 10:09:28 2021 +0000 |
4 |
Commit: Haelwenn Monnier <contact <AT> hacktivis <DOT> me> |
5 |
CommitDate: Thu Jan 28 10:09:50 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=d9f6a167 |
7 |
|
8 |
sys-apps/drm_info: Apply patch for drm_fourcc.h issue |
9 |
|
10 |
Signed-off-by: Haelwenn (lanodan) Monnier <contact <AT> hacktivis.me> |
11 |
|
12 |
sys-apps/drm_info/drm_info-2.2.0.ebuild | 4 +++ |
13 |
.../files/drm_info-2.2.0-drm_fourcc-fix.patch | 29 ++++++++++++++++++++++ |
14 |
2 files changed, 33 insertions(+) |
15 |
|
16 |
diff --git a/sys-apps/drm_info/drm_info-2.2.0.ebuild b/sys-apps/drm_info/drm_info-2.2.0.ebuild |
17 |
index bd5c1a2e..6b3f11e4 100644 |
18 |
--- a/sys-apps/drm_info/drm_info-2.2.0.ebuild |
19 |
+++ b/sys-apps/drm_info/drm_info-2.2.0.ebuild |
20 |
@@ -19,6 +19,10 @@ HOMEPAGE="https://github.com/ascent12/drm_info" |
21 |
LICENSE="MIT" |
22 |
SLOT="0" |
23 |
|
24 |
+PATCHES=( |
25 |
+ "${FILESDIR}/${P}-drm_fourcc-fix.patch" |
26 |
+) |
27 |
+ |
28 |
DEPEND=" |
29 |
x11-libs/libdrm |
30 |
dev-libs/json-c:= |
31 |
|
32 |
diff --git a/sys-apps/drm_info/files/drm_info-2.2.0-drm_fourcc-fix.patch b/sys-apps/drm_info/files/drm_info-2.2.0-drm_fourcc-fix.patch |
33 |
new file mode 100644 |
34 |
index 00000000..d5592fd8 |
35 |
--- /dev/null |
36 |
+++ b/sys-apps/drm_info/files/drm_info-2.2.0-drm_fourcc-fix.patch |
37 |
@@ -0,0 +1,29 @@ |
38 |
+From 42dad741607d8889f93b2a12725af362c09732a2 Mon Sep 17 00:00:00 2001 |
39 |
+From: Simon Ser <contact@××××××××.fr> |
40 |
+Date: Sun, 10 Jan 2021 12:24:04 +0100 |
41 |
+Subject: [PATCH] Match #define when extracting DRM modifiers |
42 |
+ |
43 |
+Newer drm_fourcc.h headers have comments which refer to |
44 |
+DRM_FORMAT_MOD_*. These were matched by the regex. |
45 |
+ |
46 |
+Fix the regex by requiring a "#define" prefix. I checked that only the |
47 |
+duplicate values were removed using diff. |
48 |
+--- |
49 |
+ fourcc.py | 4 ++-- |
50 |
+ 1 file changed, 2 insertions(+), 2 deletions(-) |
51 |
+ |
52 |
+diff --git a/fourcc.py b/fourcc.py |
53 |
+index 23f7be6..ebee1d9 100755 |
54 |
+--- a/fourcc.py |
55 |
++++ b/fourcc.py |
56 |
+@@ -22,8 +22,8 @@ def afbc_print(f, l): |
57 |
+ |
58 |
+ info = { |
59 |
+ 'fmt': r'^#define (\w+)\s*(?:\\$\s*)?fourcc_code', |
60 |
+- 'basic_pre': r'\bI915_FORMAT_MOD_\w+\b', |
61 |
+- 'basic_post': r'\b(DRM_FORMAT_MOD_(?:INVALID|LINEAR|SAMSUNG|QCOM|VIVANTE|NVIDIA|BROADCOM|ALLWINNER)\w*)\s', |
62 |
++ 'basic_pre': r'^#define (I915_FORMAT_MOD_\w+)\b', |
63 |
++ 'basic_post': r'^#define (DRM_FORMAT_MOD_(?:INVALID|LINEAR|SAMSUNG|QCOM|VIVANTE|NVIDIA|BROADCOM|ALLWINNER)\w*)\s', |
64 |
+ 'afbc_block': r'\bAFBC_FORMAT_MOD_BLOCK_SIZE(?:_\d+x\d+)+\b', |
65 |
+ 'afbc_bitmask': r'\bAFBC_FORMAT_MOD_[A-Z]+\b', |
66 |
+ } |