From 9b7ca96f7ecc4a444c2472366bdefdceeac3b897 Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sun, 9 Feb 2020 01:38:09 +0100 Subject: [PATCH] v4l-utils: enable bpf support in ir-keytable note: building bpf decoders is disabled as that would require clang in the toolchain. Signed-off-by: Matthias Reichl --- .../config/rc_keymaps/protocols/README | 3 ++ packages/sysutils/v4l-utils/package.mk | 4 +- ...l-utils-002-enable-bpf-without-clang.patch | 40 +++++++++++++++++++ 3 files changed, 45 insertions(+), 2 deletions(-) create mode 100644 packages/sysutils/v4l-utils/config/rc_keymaps/protocols/README create mode 100644 packages/sysutils/v4l-utils/patches/v4l-utils-002-enable-bpf-without-clang.patch diff --git a/packages/sysutils/v4l-utils/config/rc_keymaps/protocols/README b/packages/sysutils/v4l-utils/config/rc_keymaps/protocols/README new file mode 100644 index 0000000000..ee1f0a3b50 --- /dev/null +++ b/packages/sysutils/v4l-utils/config/rc_keymaps/protocols/README @@ -0,0 +1,3 @@ +BPF protocol decoders user config dir + +put your BPF protocol decoders for ir-keytable in this directory diff --git a/packages/sysutils/v4l-utils/package.mk b/packages/sysutils/v4l-utils/package.mk index d646c4f200..8636769fad 100644 --- a/packages/sysutils/v4l-utils/package.mk +++ b/packages/sysutils/v4l-utils/package.mk @@ -10,12 +10,12 @@ PKG_SHA256="6cb60d822eeed20486a03cc23e0fc65956fbc1e85e0c1a7477f68bbd9802880d" PKG_LICENSE="GPL" PKG_SITE="http://linuxtv.org/" PKG_URL="http://linuxtv.org/downloads/v4l-utils/$PKG_NAME-$PKG_VERSION.tar.bz2" -PKG_DEPENDS_TARGET="toolchain alsa-lib systemd" +PKG_DEPENDS_TARGET="toolchain alsa-lib systemd elfutils" PKG_LONGDESC="Linux V4L2 and DVB API utilities and v4l libraries (libv4l)." PKG_TOOLCHAIN="autotools" PKG_CONFIGURE_OPTS_TARGET="--without-jpeg \ - --disable-bpf \ + --enable-bpf \ --enable-static \ --disable-shared \ --disable-doxygen-doc" diff --git a/packages/sysutils/v4l-utils/patches/v4l-utils-002-enable-bpf-without-clang.patch b/packages/sysutils/v4l-utils/patches/v4l-utils-002-enable-bpf-without-clang.patch new file mode 100644 index 0000000000..37e156dd17 --- /dev/null +++ b/packages/sysutils/v4l-utils/patches/v4l-utils-002-enable-bpf-without-clang.patch @@ -0,0 +1,40 @@ +From 6aafb490b7c352b04f036ea6f9cbc33be8383ddf Mon Sep 17 00:00:00 2001 +From: Matthias Reichl +Date: Sat, 8 Feb 2020 21:42:06 +0100 +Subject: [PATCH] disable bpf decoder build and drop bpf dependency on clang + +Signed-off-by: Matthias Reichl +--- + configure.ac | 2 +- + utils/keytable/Makefile.am | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 6ff26093..1efa7879 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -508,7 +508,7 @@ AM_CONDITIONAL([WITH_V4L2_CTL_LIBV4L], [test x${enable_v4l2_ctl_libv4l} != xno]) + AM_CONDITIONAL([WITH_V4L2_CTL_STREAM_TO], [test x${enable_v4l2_ctl_stream_to} != xno]) + AM_CONDITIONAL([WITH_V4L2_COMPLIANCE], [test x$ac_cv_func_fork = xyes]) + AM_CONDITIONAL([WITH_V4L2_COMPLIANCE_LIBV4L], [test x$ac_cv_func_fork = xyes -a x${enable_v4l2_compliance_libv4l} != xno]) +-AM_CONDITIONAL([WITH_BPF], [test x$enable_bpf != xno -a x$libelf_pkgconfig = xyes -a x$CLANG = xclang]) ++AM_CONDITIONAL([WITH_BPF], [test x$enable_bpf != xno -a x$libelf_pkgconfig = xyes]) + + # append -static to libtool compile and link command to enforce static libs + AS_IF([test x$enable_libdvbv5 = xno], [AC_SUBST([ENFORCE_LIBDVBV5_STATIC], ["-static"])]) +diff --git a/utils/keytable/Makefile.am b/utils/keytable/Makefile.am +index d7b30e2c..a2c8df8d 100644 +--- a/utils/keytable/Makefile.am ++++ b/utils/keytable/Makefile.am +@@ -15,7 +15,7 @@ ir_keytable_LDFLAGS = $(ARGP_LIBS) + + if WITH_BPF + ir_keytable_LDFLAGS += $(LIBELF_LIBS) +-SUBDIRS = bpf_protocols ++# SUBDIRS = bpf_protocols + endif + + EXTRA_DIST = 70-infrared.rules rc_keymaps rc_keymaps_userspace gen_input_events.pl gen_keytables.pl ir-keytable.1 rc_maps.cfg rc_keymap.5 +-- +2.20.1 +