Gentoo Archives: gentoo-commits

From: Thomas Deutschmann <whissi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/strace/files/, dev-util/strace/
Date: Sun, 13 Oct 2019 03:27:26
Message-Id: 1570937233.ddc29801908fdacdbcc17df0d1e7d124479ae610.whissi@gentoo
1 commit: ddc29801908fdacdbcc17df0d1e7d124479ae610
2 Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
3 AuthorDate: Sun Oct 13 03:26:31 2019 +0000
4 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
5 CommitDate: Sun Oct 13 03:27:13 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ddc29801
7
8 dev-util/strace: add linux-5.3 compatibility
9
10 Closes: https://bugs.gentoo.org/695260
11 Package-Manager: Portage-2.3.76, Repoman-2.3.17
12 Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
13
14 .../strace/files/strace-5.2-linux-5.3-compat.patch | 75 ++++++++++++++++++++++
15 dev-util/strace/strace-5.2.ebuild | 2 +
16 2 files changed, 77 insertions(+)
17
18 diff --git a/dev-util/strace/files/strace-5.2-linux-5.3-compat.patch b/dev-util/strace/files/strace-5.2-linux-5.3-compat.patch
19 new file mode 100644
20 index 00000000000..254326f0457
21 --- /dev/null
22 +++ b/dev-util/strace/files/strace-5.2-linux-5.3-compat.patch
23 @@ -0,0 +1,75 @@
24 +https://github.com/strace/strace/commit/60da39553ff92cf741bf7f54daff636bb28cbb3c
25 +https://bugs.gentoo.org/695260
26 +
27 +--- a/xlat/v4l2_pix_fmts.h
28 ++++ b/xlat/v4l2_pix_fmts.h
29 +@@ -269,19 +269,23 @@ DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
30 + #else
31 + # define V4L2_PIX_FMT_MPEG1 v4l2_fourcc('M', 'P', 'G', '1')
32 + #endif
33 +-#if defined(V4L2_PIX_FMT_BGRA444) || (defined(HAVE_DECL_V4L2_PIX_FMT_BGRA444) && HAVE_DECL_V4L2_PIX_FMT_BGRA444)
34 ++#if defined(V4L2_PIX_FMT_SGRBG12) || (defined(HAVE_DECL_V4L2_PIX_FMT_SGRBG12) && HAVE_DECL_V4L2_PIX_FMT_SGRBG12)
35 + DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
36 +-static_assert((V4L2_PIX_FMT_BGRA444) == (v4l2_fourcc('B', 'A', '1', '2')), "V4L2_PIX_FMT_BGRA444 != v4l2_fourcc('B', 'A', '1', '2')");
37 ++static_assert((V4L2_PIX_FMT_SGRBG12) == (v4l2_fourcc('B', 'A', '1', '2')), "V4L2_PIX_FMT_SGRBG12 != v4l2_fourcc('B', 'A', '1', '2')");
38 + DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
39 + #else
40 +-# define V4L2_PIX_FMT_BGRA444 v4l2_fourcc('B', 'A', '1', '2')
41 ++# define V4L2_PIX_FMT_SGRBG12 v4l2_fourcc('B', 'A', '1', '2')
42 + #endif
43 +-#if defined(V4L2_PIX_FMT_SGRBG12) || (defined(HAVE_DECL_V4L2_PIX_FMT_SGRBG12) && HAVE_DECL_V4L2_PIX_FMT_SGRBG12)
44 ++#ifndef STRACE_WORKAROUND_FOR_V4L2_PIX_FMT_BGRA444
45 ++# define STRACE_WORKAROUND_FOR_V4L2_PIX_FMT_BGRA444
46 ++# undef V4L2_PIX_FMT_BGRA444
47 ++#endif
48 ++#if defined(V4L2_PIX_FMT_BGRA444) || (defined(HAVE_DECL_V4L2_PIX_FMT_BGRA444) && HAVE_DECL_V4L2_PIX_FMT_BGRA444)
49 + DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
50 +-static_assert((V4L2_PIX_FMT_SGRBG12) == (v4l2_fourcc('B', 'A', '1', '2')), "V4L2_PIX_FMT_SGRBG12 != v4l2_fourcc('B', 'A', '1', '2')");
51 ++static_assert((V4L2_PIX_FMT_BGRA444) == (v4l2_fourcc('G', 'A', '1', '2')), "V4L2_PIX_FMT_BGRA444 != v4l2_fourcc('G', 'A', '1', '2')");
52 + DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
53 + #else
54 +-# define V4L2_PIX_FMT_SGRBG12 v4l2_fourcc('B', 'A', '1', '2')
55 ++# define V4L2_PIX_FMT_BGRA444 v4l2_fourcc('G', 'A', '1', '2')
56 + #endif
57 + #if defined(V4L2_PIX_FMT_RGBA444) || (defined(HAVE_DECL_V4L2_PIX_FMT_RGBA444) && HAVE_DECL_V4L2_PIX_FMT_RGBA444)
58 + DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
59 +@@ -1343,8 +1347,17 @@ const struct xlat v4l2_pix_fmts[] = {
60 + XLAT(V4L2_PIX_FMT_H264_NO_SC),
61 + XLAT(V4L2_PIX_FMT_PWC1),
62 + XLAT(V4L2_PIX_FMT_MPEG1),
63 +- XLAT(V4L2_PIX_FMT_BGRA444),
64 + XLAT(V4L2_PIX_FMT_SGRBG12),
65 ++#ifndef STRACE_WORKAROUND_FOR_V4L2_PIX_FMT_BGRA444
66 ++# define STRACE_WORKAROUND_FOR_V4L2_PIX_FMT_BGRA444
67 ++/*
68 ++* V4L2_PIX_FMT_BGRA444 was introduced in Linux commit v5.2-rc1~33^2~24 with
69 ++* the value of v4l2_fourcc('B', 'A', '1', '2') and changed in commit
70 ++* v5.2-rc5-403-g22be8233b34f as it clashed with V4L2_PIX_FMT_SGRBG12.
71 ++*/
72 ++# undef V4L2_PIX_FMT_BGRA444
73 ++#endif
74 ++ XLAT(V4L2_PIX_FMT_BGRA444),
75 + XLAT(V4L2_PIX_FMT_RGBA444),
76 + XLAT(V4L2_PIX_FMT_ABGR444),
77 + XLAT(V4L2_PIX_FMT_SGBRG12),
78 +--- a/xlat/v4l2_pix_fmts.in
79 ++++ b/xlat/v4l2_pix_fmts.in
80 +@@ -37,8 +37,17 @@ V4L2_PIX_FMT_RGB332 v4l2_fourcc('R', 'G', 'B', '1') /* 8 RGB-3-3-2 */
81 + V4L2_PIX_FMT_H264_NO_SC v4l2_fourcc('A', 'V', 'C', '1') /* H264 without start codes */
82 + V4L2_PIX_FMT_PWC1 v4l2_fourcc('P', 'W', 'C', '1') /* pwc older webcam */
83 + V4L2_PIX_FMT_MPEG1 v4l2_fourcc('M', 'P', 'G', '1') /* MPEG-1 ES */
84 +-V4L2_PIX_FMT_BGRA444 v4l2_fourcc('B', 'A', '1', '2') /* 16 bbbbgggg rrrraaaa */
85 + V4L2_PIX_FMT_SGRBG12 v4l2_fourcc('B', 'A', '1', '2') /* 12 GRGR.. BGBG.. */
86 ++#ifndef STRACE_WORKAROUND_FOR_V4L2_PIX_FMT_BGRA444
87 ++# define STRACE_WORKAROUND_FOR_V4L2_PIX_FMT_BGRA444
88 ++/*
89 ++ * V4L2_PIX_FMT_BGRA444 was introduced in Linux commit v5.2-rc1~33^2~24 with
90 ++ * the value of v4l2_fourcc('B', 'A', '1', '2') and changed in commit
91 ++ * v5.2-rc5-403-g22be8233b34f as it clashed with V4L2_PIX_FMT_SGRBG12.
92 ++ */
93 ++# undef V4L2_PIX_FMT_BGRA444
94 ++#endif
95 ++V4L2_PIX_FMT_BGRA444 v4l2_fourcc('G', 'A', '1', '2') /* 16 bbbbgggg rrrraaaa */
96 + V4L2_PIX_FMT_RGBA444 v4l2_fourcc('R', 'A', '1', '2') /* 16 rrrrgggg bbbbaaaa */
97 + V4L2_PIX_FMT_ABGR444 v4l2_fourcc('A', 'B', '1', '2') /* 16 aaaabbbb ggggrrrr */
98 + V4L2_PIX_FMT_SGBRG12 v4l2_fourcc('G', 'B', '1', '2') /* 12 GBGB.. RGRG.. */
99
100 diff --git a/dev-util/strace/strace-5.2.ebuild b/dev-util/strace/strace-5.2.ebuild
101 index db378889c0d..88a2db590c1 100644
102 --- a/dev-util/strace/strace-5.2.ebuild
103 +++ b/dev-util/strace/strace-5.2.ebuild
104 @@ -37,6 +37,8 @@ RDEPEND="
105 perl? ( dev-lang/perl )
106 "
107
108 +PATCHES=( "${FILESDIR}"/${P}-linux-5.3-compat.patch )
109 +
110 src_prepare() {
111 default