diff options
3 files changed, 93 insertions, 5 deletions
diff --git a/meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0008-configure.ac-autodetect-availability-of-systemd.patch b/meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0008-configure.ac-autodetect-availability-of-systemd.patch new file mode 100644 index 0000000000..5aec3c5747 --- /dev/null +++ b/meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0008-configure.ac-autodetect-availability-of-systemd.patch | |||
@@ -0,0 +1,47 @@ | |||
1 | From 3f61e353424fb9ea3dce742022b94dfd7ea1ed9f Mon Sep 17 00:00:00 2001 | ||
2 | From: =?UTF-8?q?Ulrich=20=C3=96lmann?= <u.oelmann@pengutronix.de> | ||
3 | Date: Thu, 4 Mar 2021 14:23:39 +0100 | ||
4 | Subject: [PATCH] configure.ac: autodetect availability of systemd | ||
5 | MIME-Version: 1.0 | ||
6 | Content-Type: text/plain; charset=UTF-8 | ||
7 | Content-Transfer-Encoding: 8bit | ||
8 | |||
9 | Import systemd's official suggestion [1] how this should be handled in packages | ||
10 | using autoconf. A side effect of this is the removal of the hardcoded fallback | ||
11 | path "/lib/systemd/system" which leaks build host information when cross | ||
12 | compiling v4l-utils and therefore defeats reproducible builds. | ||
13 | |||
14 | [1] https://www.freedesktop.org/software/systemd/man/daemon.html#Installing%20systemd%20Service%20Files | ||
15 | |||
16 | Upstream-Status: Backport [https://git.linuxtv.org/v4l-utils.git/commit/?id=3f61e353424fb9ea3dce742022b94dfd7ea1ed9f] | ||
17 | |||
18 | Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de> | ||
19 | Signed-off-by: Sean Young <sean@mess.org> | ||
20 | --- | ||
21 | configure.ac | 10 +++++++++- | ||
22 | 1 file changed, 9 insertions(+), 1 deletion(-) | ||
23 | |||
24 | diff --git a/configure.ac b/configure.ac | ||
25 | index 727730c5ccf4..8470116df4b1 100644 | ||
26 | --- a/configure.ac | ||
27 | +++ b/configure.ac | ||
28 | @@ -388,7 +388,15 @@ AC_ARG_WITH(udevdir, | ||
29 | AC_ARG_WITH(systemdsystemunitdir, | ||
30 | AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [set systemd system unit directory]), | ||
31 | [], | ||
32 | - [with_systemdsystemunitdir=`$PKG_CONFIG --variable=systemdsystemunitdir systemd || echo /lib/systemd/system`]) | ||
33 | + [with_systemdsystemunitdir=auto]) | ||
34 | +AS_IF([test "x$with_systemdsystemunitdir" = "xyes" -o "x$with_systemdsystemunitdir" = "xauto"], | ||
35 | + [def_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd) | ||
36 | + AS_IF([test "x$def_systemdsystemunitdir" = "x"], | ||
37 | + [AS_IF([test "x$with_systemdsystemunitdir" = "xyes"], | ||
38 | + [AC_MSG_ERROR([systemd support requested but pkg-config unable to query systemd package])]) | ||
39 | + with_systemdsystemunitdir=no], | ||
40 | + [with_systemdsystemunitdir="$def_systemdsystemunitdir"])]) | ||
41 | +AM_CONDITIONAL([HAVE_SYSTEMD], [test "x$with_systemdsystemunitdir" != "xno"]) | ||
42 | |||
43 | # Generic check: works with most distributions | ||
44 | def_gconv_dir=`for i in /lib64 /usr/lib64 /usr/local/lib64 /lib /usr/lib /usr/local/lib; do if @<:@ -d \$i/gconv @:>@; then echo \$i/gconv; break; fi; done` | ||
45 | -- | ||
46 | 2.29.2 | ||
47 | |||
diff --git a/meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0009-keytable-restrict-installation-of-50-rc_keymap.conf.patch b/meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0009-keytable-restrict-installation-of-50-rc_keymap.conf.patch new file mode 100644 index 0000000000..63a695f8f9 --- /dev/null +++ b/meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0009-keytable-restrict-installation-of-50-rc_keymap.conf.patch | |||
@@ -0,0 +1,40 @@ | |||
1 | From 01f2c6c58e6f4441df7df8e27eb7919f1f01e310 Mon Sep 17 00:00:00 2001 | ||
2 | From: =?UTF-8?q?Ulrich=20=C3=96lmann?= <u.oelmann@pengutronix.de> | ||
3 | Date: Thu, 4 Mar 2021 14:23:40 +0100 | ||
4 | Subject: [PATCH] keytable: restrict installation of 50-rc_keymap.conf | ||
5 | MIME-Version: 1.0 | ||
6 | Content-Type: text/plain; charset=UTF-8 | ||
7 | Content-Transfer-Encoding: 8bit | ||
8 | |||
9 | It is only needed if BPF is effectively used and the package is compiled for a | ||
10 | systemd based target. | ||
11 | |||
12 | Upstream-Status: Backport [https://git.linuxtv.org/v4l-utils.git/commit/?id=01f2c6c58e6f4441df7df8e27eb7919f1f01e310] | ||
13 | |||
14 | Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de> | ||
15 | Signed-off-by: Sean Young <sean@mess.org> | ||
16 | --- | ||
17 | utils/keytable/Makefile.am | 4 ++++ | ||
18 | 1 file changed, 4 insertions(+) | ||
19 | |||
20 | diff --git a/utils/keytable/Makefile.am b/utils/keytable/Makefile.am | ||
21 | index c5eb414acf2f..eee61f0e0551 100644 | ||
22 | --- a/utils/keytable/Makefile.am | ||
23 | +++ b/utils/keytable/Makefile.am | ||
24 | @@ -3,9 +3,13 @@ man_MANS = ir-keytable.1 rc_keymap.5 | ||
25 | sysconf_DATA = rc_maps.cfg | ||
26 | keytablesystem_DATA = $(srcdir)/rc_keymaps/* | ||
27 | udevrules_DATA = 70-infrared.rules | ||
28 | +if WITH_BPF | ||
29 | +if HAVE_SYSTEMD | ||
30 | if HAVE_UDEVDSYSCALLFILTER | ||
31 | systemdsystemunit_DATA = 50-rc_keymap.conf | ||
32 | endif | ||
33 | +endif | ||
34 | +endif | ||
35 | |||
36 | ir_keytable_SOURCES = keytable.c parse.h ir-encode.c ir-encode.h toml.c toml.h keymap.c keymap.h | ||
37 | |||
38 | -- | ||
39 | 2.29.2 | ||
40 | |||
diff --git a/meta-oe/recipes-multimedia/v4l2apps/v4l-utils_1.20.0.bb b/meta-oe/recipes-multimedia/v4l2apps/v4l-utils_1.20.0.bb index 3e92d49b4f..2261feb56c 100644 --- a/meta-oe/recipes-multimedia/v4l2apps/v4l-utils_1.20.0.bb +++ b/meta-oe/recipes-multimedia/v4l2apps/v4l-utils_1.20.0.bb | |||
@@ -5,7 +5,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=48da9957849056017dc568bbc43d8975 \ | |||
5 | PROVIDES = "libv4l media-ctl" | 5 | PROVIDES = "libv4l media-ctl" |
6 | 6 | ||
7 | DEPENDS = "jpeg \ | 7 | DEPENDS = "jpeg \ |
8 | ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'virtual/libx11', '', d)}" | 8 | ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'virtual/libx11', '', d)} \ |
9 | ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}" | ||
9 | DEPENDS_append_libc-musl = " argp-standalone" | 10 | DEPENDS_append_libc-musl = " argp-standalone" |
10 | DEPENDS_append_class-target = " udev" | 11 | DEPENDS_append_class-target = " udev" |
11 | LDFLAGS_append = " -pthread" | 12 | LDFLAGS_append = " -pthread" |
@@ -21,13 +22,14 @@ SRC_URI = "http://linuxtv.org/downloads/v4l-utils/v4l-utils-${PV}.tar.bz2 \ | |||
21 | file://export-mediactl-headers.patch \ | 22 | file://export-mediactl-headers.patch \ |
22 | file://0002-contrib-test-Link-mc_nextgen_test-with-libargp-if-ne.patch \ | 23 | file://0002-contrib-test-Link-mc_nextgen_test-with-libargp-if-ne.patch \ |
23 | file://0007-Do-not-use-getsubopt.patch \ | 24 | file://0007-Do-not-use-getsubopt.patch \ |
25 | file://0008-configure.ac-autodetect-availability-of-systemd.patch \ | ||
26 | file://0009-keytable-restrict-installation-of-50-rc_keymap.conf.patch \ | ||
24 | " | 27 | " |
25 | SRC_URI[md5sum] = "46f9e2c0b2fdccd009da2f7e1aa87894" | 28 | SRC_URI[md5sum] = "46f9e2c0b2fdccd009da2f7e1aa87894" |
26 | SRC_URI[sha256sum] = "956118713f7ccb405c55c7088a6a2490c32d54300dd9a30d8d5008c28d3726f7" | 29 | SRC_URI[sha256sum] = "956118713f7ccb405c55c7088a6a2490c32d54300dd9a30d8d5008c28d3726f7" |
27 | 30 | ||
28 | EXTRA_OECONF = "--disable-qv4l2 --enable-shared --with-udevdir=${base_libdir}/udev \ | 31 | EXTRA_OECONF = "--disable-qv4l2 --enable-shared --with-udevdir=${base_libdir}/udev \ |
29 | --disable-v4l2-compliance-32 --disable-v4l2-ctl-32 \ | 32 | --disable-v4l2-compliance-32 --disable-v4l2-ctl-32" |
30 | --with-systemdsystemunitdir=${systemd_system_unitdir}" | ||
31 | 33 | ||
32 | VIRTUAL-RUNTIME_ir-keytable-keymaps ?= "rc-keymaps" | 34 | VIRTUAL-RUNTIME_ir-keytable-keymaps ?= "rc-keymaps" |
33 | 35 | ||
@@ -37,8 +39,7 @@ RPROVIDES_${PN}-dbg += "libv4l-dbg" | |||
37 | 39 | ||
38 | FILES_media-ctl = "${bindir}/media-ctl ${libdir}/libmediactl.so.*" | 40 | FILES_media-ctl = "${bindir}/media-ctl ${libdir}/libmediactl.so.*" |
39 | 41 | ||
40 | FILES_ir-keytable = "${bindir}/ir-keytable ${base_libdir}/udev/rules.d/*-infrared.rules \ | 42 | FILES_ir-keytable = "${bindir}/ir-keytable ${base_libdir}/udev/rules.d/*-infrared.rules" |
41 | ${systemd_system_unitdir}/systemd-udevd.service.d/50-rc_keymap.conf" | ||
42 | RDEPENDS_ir-keytable += "${VIRTUAL-RUNTIME_ir-keytable-keymaps}" | 43 | RDEPENDS_ir-keytable += "${VIRTUAL-RUNTIME_ir-keytable-keymaps}" |
43 | 44 | ||
44 | FILES_rc-keymaps = "${sysconfdir}/rc* ${base_libdir}/udev/rc*" | 45 | FILES_rc-keymaps = "${sysconfdir}/rc* ${base_libdir}/udev/rc*" |