summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-multimedia
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2019-11-30 18:54:16 -0800
committerKhem Raj <raj.khem@gmail.com>2019-12-01 11:24:26 -0800
commit94a8836eee25a644f69d5e1ffac387eb390b9a2d (patch)
tree5420eb00395b8ccdc2712578ef4ad89883e3b3b7 /meta-oe/recipes-multimedia
parent049a2a371fd29e61a4ae1a79a6bd4064f12120dd (diff)
downloadmeta-openembedded-94a8836eee25a644f69d5e1ffac387eb390b9a2d.tar.gz
v4l-utils: Update to 1.18.0
- Fix build on 32bit arches with 64bit time_t - Forward port patches Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-multimedia')
-rw-r--r--meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0005-Define-error_t-and-include-sys-types.h.patch45
-rw-r--r--meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0006-Fix-build-on-32bit-arches-with-64bit-time_t.patch41
-rw-r--r--meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0007-Do-not-use-getsubopt.patch (renamed from meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0003-v4l2-ctl-Do-not-use-getsubopt.patch)25
-rw-r--r--meta-oe/recipes-multimedia/v4l2apps/v4l-utils_1.18.0.bb (renamed from meta-oe/recipes-multimedia/v4l2apps/v4l-utils_1.16.5.bb)8
4 files changed, 104 insertions, 15 deletions
diff --git a/meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0005-Define-error_t-and-include-sys-types.h.patch b/meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0005-Define-error_t-and-include-sys-types.h.patch
new file mode 100644
index 000000000..57948add6
--- /dev/null
+++ b/meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0005-Define-error_t-and-include-sys-types.h.patch
@@ -0,0 +1,45 @@
1From 137ce23ae677b11e5483ef810751edae7bf96bb9 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 30 Nov 2019 18:40:06 -0800
4Subject: [PATCH] Define error_t and include sys/types.h
5
6Fix 'unknown type name' for error_t and u_int32_t.
7u_int32_t is defined in sys/type.h
8
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10---
11 utils/ir-ctl/keymap.h | 4 ++++
12 utils/keytable/keymap.h | 5 +++++
13 2 files changed, 9 insertions(+)
14
15diff --git a/utils/ir-ctl/keymap.h b/utils/ir-ctl/keymap.h
16index f2b2963..1f8a3f8 100644
17--- a/utils/ir-ctl/keymap.h
18+++ b/utils/ir-ctl/keymap.h
19@@ -2,6 +2,10 @@
20 #ifndef __KEYMAP_H
21 #define __KEYMAP_H
22
23+#include <sys/types.h>
24+#ifndef error_t
25+typedef int error_t;
26+#endif
27 struct keymap {
28 struct keymap *next;
29 char *name;
30diff --git a/utils/keytable/keymap.h b/utils/keytable/keymap.h
31index f2b2963..345d55d 100644
32--- a/utils/keytable/keymap.h
33+++ b/utils/keytable/keymap.h
34@@ -2,6 +2,11 @@
35 #ifndef __KEYMAP_H
36 #define __KEYMAP_H
37
38+#include <sys/types.h>
39+#ifndef error_t
40+typedef int error_t;
41+#endif
42+
43 struct keymap {
44 struct keymap *next;
45 char *name;
diff --git a/meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0006-Fix-build-on-32bit-arches-with-64bit-time_t.patch b/meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0006-Fix-build-on-32bit-arches-with-64bit-time_t.patch
new file mode 100644
index 000000000..a8926762e
--- /dev/null
+++ b/meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0006-Fix-build-on-32bit-arches-with-64bit-time_t.patch
@@ -0,0 +1,41 @@
1From b213da2d5fcc93cd24fc880c71c717d8e2ce2968 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 30 Nov 2019 18:43:21 -0800
4Subject: [PATCH] Fix build on 32bit arches with 64bit time_t
5
6time element is deprecated on new input_event structure in kernel's
7input.h [1]
8
9[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=152194fe9c3f
10
11Upstream-Status: Pending
12Signed-off-by: Khem Raj <raj.khem@gmail.com>
13---
14 utils/keytable/keytable.c | 7 ++++++-
15 1 file changed, 6 insertions(+), 1 deletion(-)
16
17diff --git a/utils/keytable/keytable.c b/utils/keytable/keytable.c
18index 6cb0217..59ff1ee 100644
19--- a/utils/keytable/keytable.c
20+++ b/utils/keytable/keytable.c
21@@ -53,6 +53,11 @@
22
23 # define N_(string) string
24
25+#ifndef input_event_sec
26+#define input_event_sec time.tv_sec
27+#define input_event_usec time.tv_usec
28+#endif
29+
30 struct input_keymap_entry_v2 {
31 #define KEYMAP_BY_INDEX (1 << 0)
32 u_int8_t flags;
33@@ -1533,7 +1538,7 @@ static void test_event(struct rc_device *rc_dev, int fd)
34
35 for (i = 0; i < rd / sizeof(struct input_event); i++) {
36 printf(_("%ld.%06ld: event type %s(0x%02x)"),
37- ev[i].time.tv_sec, ev[i].time.tv_usec,
38+ ev[i].input_event_sec, ev[i].input_event_usec,
39 get_event_name(events_type, ev[i].type), ev[i].type);
40
41 switch (ev[i].type) {
diff --git a/meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0003-v4l2-ctl-Do-not-use-getsubopt.patch b/meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0007-Do-not-use-getsubopt.patch
index 5b84af2c3..ac704c72d 100644
--- a/meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0003-v4l2-ctl-Do-not-use-getsubopt.patch
+++ b/meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0007-Do-not-use-getsubopt.patch
@@ -1,24 +1,26 @@
1From f7a4b79b3323534460a63b3e6c58ebaf06adf207 Mon Sep 17 00:00:00 2001 1From 4a10eab0e31d69948161241b1801c41201a5d081 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 14 Jul 2017 13:20:05 -0700 3Date: Sat, 30 Nov 2019 18:50:34 -0800
4Subject: [PATCH] v4l2-ctl: Do not use getsubopt 4Subject: [PATCH] Do not use getsubopt
5 5
6POSIX says that behavior when subopts list is empty is undefined. 6POSIX says that behavior when subopts list is empty is undefined.
7musl libs will set value to NULL which leads to crash. 7musl libs will set value to NULL which leads to crash.
8 8
9Taken from AlpineLinux 9Simply avoid getsubopt, since we cannot rely on it.
10 10
11Signed-off-by: Khem Raj <raj.khem@gmail.com> 11Imported from Alpine Linux
12 12
13Upstream-Status: Pending
14Signed-off-by: Khem Raj <raj.khem@gmail.com>
13--- 15---
14 utils/v4l2-ctl/v4l2-ctl-common.cpp | 19 ++++++++++--------- 16 utils/v4l2-ctl/v4l2-ctl-common.cpp | 18 ++++++++++--------
15 1 file changed, 10 insertions(+), 9 deletions(-) 17 1 file changed, 10 insertions(+), 8 deletions(-)
16 18
17diff --git a/utils/v4l2-ctl/v4l2-ctl-common.cpp b/utils/v4l2-ctl/v4l2-ctl-common.cpp 19diff --git a/utils/v4l2-ctl/v4l2-ctl-common.cpp b/utils/v4l2-ctl/v4l2-ctl-common.cpp
18index 3ea6cd3..291fb3e 100644 20index 651917e..cea57b7 100644
19--- a/utils/v4l2-ctl/v4l2-ctl-common.cpp 21--- a/utils/v4l2-ctl/v4l2-ctl-common.cpp
20+++ b/utils/v4l2-ctl/v4l2-ctl-common.cpp 22+++ b/utils/v4l2-ctl/v4l2-ctl-common.cpp
21@@ -692,16 +692,17 @@ static bool parse_subset(char *optarg) 23@@ -782,15 +782,17 @@ static bool parse_subset(char *optarg)
22 24
23 static bool parse_next_subopt(char **subs, char **value) 25 static bool parse_next_subopt(char **subs, char **value)
24 { 26 {
@@ -31,8 +33,7 @@ index 3ea6cd3..291fb3e 100644
31 33
32- if (opt < 0 || *value) 34- if (opt < 0 || *value)
33- return false; 35- return false;
34- fprintf(stderr, "No value given to suboption <%s>\n", 36- fprintf(stderr, "Missing suboption value\n");
35- subopts[opt]);
36- return true; 37- return true;
37+ while (*p && *p != ',') 38+ while (*p && *p != ',')
38+ p++; 39+ p++;
@@ -44,4 +45,4 @@ index 3ea6cd3..291fb3e 100644
44+ return false; 45+ return false;
45 } 46 }
46 47
47 void common_cmd(int ch, char *optarg) 48 void common_cmd(const std::string &media_bus_info, int ch, char *optarg)
diff --git a/meta-oe/recipes-multimedia/v4l2apps/v4l-utils_1.16.5.bb b/meta-oe/recipes-multimedia/v4l2apps/v4l-utils_1.18.0.bb
index 415446844..9cc2a8e5b 100644
--- a/meta-oe/recipes-multimedia/v4l2apps/v4l-utils_1.16.5.bb
+++ b/meta-oe/recipes-multimedia/v4l2apps/v4l-utils_1.18.0.bb
@@ -20,10 +20,12 @@ SRC_URI = "http://linuxtv.org/downloads/v4l-utils/v4l-utils-${PV}.tar.bz2 \
20 file://mediactl-pkgconfig.patch \ 20 file://mediactl-pkgconfig.patch \
21 file://export-mediactl-headers.patch \ 21 file://export-mediactl-headers.patch \
22 file://0002-contrib-test-Link-mc_nextgen_test-with-libargp-if-ne.patch \ 22 file://0002-contrib-test-Link-mc_nextgen_test-with-libargp-if-ne.patch \
23 file://0003-v4l2-ctl-Do-not-use-getsubopt.patch \ 23 file://0005-Define-error_t-and-include-sys-types.h.patch \
24 file://0006-Fix-build-on-32bit-arches-with-64bit-time_t.patch \
25 file://0007-Do-not-use-getsubopt.patch \
24 " 26 "
25SRC_URI[md5sum] = "de272817133c0dca000a78a5c8c8ec8b" 27SRC_URI[md5sum] = "18996bd5e9d83d47055c05de376708cd"
26SRC_URI[sha256sum] = "ed80242510385017a1dc566e17a285a77222bb301f5bc19386badfcc2c19df1b" 28SRC_URI[sha256sum] = "6cb60d822eeed20486a03cc23e0fc65956fbc1e85e0c1a7477f68bbd9802880d"
27 29
28EXTRA_OECONF = "--disable-qv4l2 --enable-shared --with-udevdir=${base_libdir}/udev" 30EXTRA_OECONF = "--disable-qv4l2 --enable-shared --with-udevdir=${base_libdir}/udev"
29 31