Closed Wolftronics-SBC closed 7 years ago
Sorry, but I do not see the commits mentioned in your comment. Can you check ?
This pull request want to merge our devel with our master without any changes by the creator. Also I don't understand what all the code in the description is good for.
`diff -Naur a/packages/drivers/eventlircd/meta b/packages/drivers/eventlircd/meta --- a/packages/drivers/eventlircd/meta 2016-11-05 14:44:14.000000000 +0100 +++ b/packages/drivers/eventlircd/meta 2016-10-28 22:36:07.000000000 +0200 @@ -1,9 +1,14 @@ PKG_NAME=eventlircd -PKG_URL_REV=44 -PKG_URL_PROTO=svn -PKG_URL="http://eventlircd.googlecode.com/svn/trunk" +#PKG_URL_REV=44 +#PKG_URL_PROTO=svn +#PKG_URL="http://eventlircd.googlecode.com/svn/trunk" +#PKG_VERSION="r${PKG_URL_REV}" +#PKG_REV="7" +PKG_URL_REV=7faaf9d +PKG_URL_PROTO=git PKG_VERSION="r${PKG_URL_REV}" -PKG_REV="7" +PKG_URL="https://github.com/OpenELEC/eventlircd.git" +PKG_REV=1 PKG_DEPENDS="systemd" PKG_BUILD_DEPENDS="toolchain" PKG_RUNTIME_DEPENDS="lirc v4l-utils" @@ -11,4 +16,3 @@ PKG_SECTION=drivers PKG_SHORTDESC="A GNU/Linux daemon for simplifying udev based hotplugging of remote control devices." PKG_LONGDESC="The eventlircd daemon provides four functions for LIRC devices: converting multiple Linux input event devices into an lircd socket, separating keyboard and mouse/joystick functionality, mapping keyboard shortcut key code sequences to single key codes, and hotplugging using udev." -PKG_MD5="56cbf3dca627cbb7c2d32b17c9143fce" diff -Naur a/packages/drivers/eventlircd/patches/05_add-backslash-on-wrapped-lines.diff b/packages/drivers/eventlircd/patches/05_add-backslash-on-wrapped-lines.diff --- a/packages/drivers/eventlircd/patches/05_add-backslash-on-wrapped-lines.diff 2016-10-27 15:45:12.000000000 +0200 +++ b/packages/drivers/eventlircd/patches/05_add-backslash-on-wrapped-lines.diff 1970-01-01 01:00:00.000000000 +0100 @@ -1,21 +0,0 @@ -diff -Naur a/udev/rules.d/98-eventlircd.rules.disabled.in b/udev/rules.d/98-eventlircd.rules.disabled.in ---- a/udev/rules.d/98-eventlircd.rules.disabled.in 2011-10-23 10:13:04.000000000 +0200 -+++ b/udev/rules.d/98-eventlircd.rules.disabled.in 2013-11-11 12:37:08.998439128 +0100 -@@ -54,7 +54,7 @@
Ask eventlircd to handle input event devices created by ir-core (kernel).
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-@@ -69,7 +69,7 @@
+@@ -123,6 +118,7 @@
+- while((opt = getopt_long(argc, argv, "hVvfe:s:m:Rr:", longopts, NULL)) != -1) ++ while((opt = getopt_long(argc, argv, "hVvfe:s:m:r:", longopts, NULL)) != -1)
as well as receiver, then we still need lircd running.
++logger -t "lircd_helper" ACTION ${ACTION} ++logger -t "lircd_helper" lircd_driver ${lircd_driver} ++logger -t "lircd_helper" DEVNAME ${DEVNAME}
echo ${DEVNAME} | sed -e 's/\/\+/~/g' -e 's/^~dev~//'
+- if test ! -e "@localstatedir@/run/lirc/lircd-${devname_instance}.pid" ; then +- daemon='@sbindir@/lircd' ++ if test "x${lircd_driver}" = "xatilibusb" ; then ++ devname_instance="atilibusb" ++ fi ++ logger -t "lircd_helper" add/change devname_instance ${devname_instance} ++ if test -e "/var/run/lirc/lircd-${devname_instance}.pid"; then ++ process=$(ps -p $(cat /var/run/lirc/lircd-${devname_instance}.pid) -o comm=) ++ if test ! "x${process}" = "xlircd" ; then ++ logger -t "lircd_helper" removing stale pid "/var/run/lirc/lircd-${devname_instance}.pid" ++ rm -rf "/var/run/lirc/lircd-${devname_instance}.pid" ++ fi ++ fi ++ if test ! -e "/var/run/lirc/lircd-${devname_instance}.pid" ; then ++ daemon='/usr/sbin/lircd'echo ${devlink} | /bin/sed -e 's/\/\+/~/g' -e 's/^~dev~//'
+- rm -f "@localstatedir@/run/lirc/lircd-${devlink_instance}" +- ln -s "lircd-${devname_instance}" "@localstatedir@/run/lirc/lircd-${devlink_instance}" ++ if test ! "x${devlink_instance}" = "x" ; then ++ logger -t "lircd_helper" add/change devlink_instance ${devlink_instance} ++ rm -f "/var/run/lirc/lircd-${devlink_instance}" ++ ln -s "lircd-${devname_instance}" "/var/run/lirc/lircd-${devlink_instance}" ++ fiecho $DEVNAME | sed -e 's/\/\+/~/g' -e 's/^~dev~//'
+- if test -e "@localstatedir@/run/lirc/lircd-${instance}.pid" ; then +- pid=cat @localstatedir@/run/lirc/lircd-${instance}.pid
++ if test "x${lircd_driver}" = "xatilibusb" ; then ++ instance="atilibusb" ++ fi ++ if test -e "/var/run/lirc/lircd-${instance}.pid" ; then ++ pid=cat /var/run/lirc/lircd-${instance}.pid
echo ${devlink} | sed -e 's/\/\+/~/g' -e 's/^~dev~//'
+- rm -f "@localstatedir@/run/lirc/lircd-${devlink_instance}" ++ rm -f "/var/run/lirc/lircd-${devlink_instance}"+diff -ru a/udev/rules.d/98-eventlircd.rules.disabled.in b/udev/rules.d/98-eventlircd.rules.disabled.in +--- a/udev/rules.d/98-eventlircd.rules.disabled.in 2016-03-15 20:27:42.000000000 +0100 ++++ b/udev/rules.d/98-eventlircd.rules.disabled.in 2015-10-16 17:39:34.000000000 +0200 +@@ -54,7 +54,7 @@
Ask eventlircd to handle input event devices created by ir-core (kernel).
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
+@@ -69,7 +69,7 @@
readlink -f "/sys/${DEVPATH}"
+-while echo "${devpath}" | grep -q '^/sys/devices/' > /dev/null 2>&1 ; do ++while echo "${devpath}" | /bin/grep -q '^/sys/devices/' > /dev/null 2>&1 ; docat "${devpath}/power/wakeup"
if test "x${state}" = "xdisabled" ; then diff -Naur a/packages/drivers/lirc/build b/packages/drivers/lirc/build --- a/packages/drivers/lirc/build 2016-10-27 15:45:12.000000000 +0200 +++ b/packages/drivers/lirc/build 2016-10-28 22:04:04.000000000 +0200 @@ -14,12 +14,21 @@
get_meta $1 cd $PKG_BUILD_DIR
+./autogen.sh do_configure \
make make_install diff -Naur a/packages/drivers/lirc/install b/packages/drivers/lirc/install --- a/packages/drivers/lirc/install 2016-10-27 15:45:12.000000000 +0200 +++ b/packages/drivers/lirc/install 2016-11-07 18:19:56.000000000 +0100 @@ -15,7 +15,7 @@ fi
mkdir -p $INSTALL/etc/lirc -cp -R remotes $INSTALL/etc/lirc +#cp -R remotes $INSTALL/etc/lirc cp $ROOT/$PACKAGES/$PKG_SECTION/$1/config/* $INSTALL/etc/lirc
-ln -sf remotes/mceusb/lircd.conf.mceusb $INSTALL/etc/lirc/lircd.conf +#ln -sf remotes/mceusb/lircd.conf.mceusb $INSTALL/etc/lirc/lircd.conf diff -Naur a/packages/drivers/lirc/meta b/packages/drivers/lirc/meta --- a/packages/drivers/lirc/meta 2016-11-05 14:44:14.000000000 +0100 +++ b/packages/drivers/lirc/meta 2016-11-07 18:00:54.000000000 +0100 @@ -1,7 +1,11 @@ PKG_NAME=lirc -PKG_VERSION=0.9.0 -PKG_URL="$SFNET_SRCS/lirc/lirc-${PKG_VERSION}.tar.bz2" -PKG_REV="5" +#PKG_VERSION=0.9.0 +#PKG_URL="$SFNET_SRCS/lirc/lirc-${PKG_VERSION}.tar.bz2" +PKG_URL_PROTO=git +PKG_URL_REV="1~fab0de" +PKG_VERSION="0.9.5+${PKG_URL_REV}" +PKG_URL="git://git.code.sf.net/p/lirc/git" +PKG_REV="1" PKG_DEPENDS="libusb libftdi" PKG_BUILD_DEPENDS="toolchain libirman" PKG_RUN_DEPENDS="$TARGET_LIBC" @@ -10,4 +14,3 @@ PKG_SECTION=drivers PKG_SHORTDESC="infra-red remote control support" PKG_LONGDESC="LIRC stands for 'Linux Infra-red Remote Control'. This package provides the daemons and some utilities to support infra-red remote controls under Linux." -PKG_MD5="b232aef26f23fe33ea8305d276637086" diff -Naur a/packages/drivers/lirc/patches/0.9.0/30_kerneldir.diff b/packages/drivers/lirc/patches/0.9.0/30_kerneldir.diff --- a/packages/drivers/lirc/patches/0.9.0/30_kerneldir.diff 1970-01-01 01:00:00.000000000 +0100 +++ b/packages/drivers/lirc/patches/0.9.0/30_kerneldir.diff 2016-10-27 15:45:12.000000000 +0200 @@ -0,0 +1,21 @@ +diff -Nur lirc-0.7.2pre3.orig/configure lirc-0.7.2pre3/configure +--- lirc-0.7.2pre3.orig/configure Mon Aug 8 14:43:04 2005 ++++ lirc-0.7.2pre3/configure Mon Aug 8 14:42:32 2005 +@@ -7870,16 +7870,12 @@
+- if test
uname
!= "Linux"; then +- kerneldir="not running Linux" +- else +- for dir in /usr/src/kernel-source-uname -r
/usr/src/linux-uname -r
/usr/src/linux /lib/modules/uname -r
/source /lib/modules/uname -r
/build ${ac_kerneldir}; do ++ for dir in ${ac_kerneldir}; dodirname $dir/Makefile
/+-install-data-hook: +- rm -f $(DESTDIR)/$(pkgpythondir)/configs +- $(srcdir)/make_rel_symlink.py \ +- $(DESTDIR)$(pkgdatadir)/configs \ +- $(DESTDIR)$(pkgpythondir)/configs +-
+--- a/lib/lirc_client.c ++++ b/lib/lirc_client.c +@@ -2050,28 +2050,25 @@
+- for (key = KEY_RESERVED; key <= KEY_UNKNOWN; key++) +- if (ioctl(fd, UI_SET_KEYBIT, key) != 0) +- goto setup_error; ++ for (i = 0; get_input_code_by_index(i, &code) >= 0; i++) { ++ key = (int)code; ++ if (((key >= KEY_ESC) && (key <= KEY_RFKILL)) || ++ ((key >= KEY_OK ) && (key <= KEY_WPS_BUTTON))) { ++ if (ioctl(fd, UI_SET_KEYBIT, key) != 0) ++ goto setup_error; ++ } ++ }
if defined(linux)
+- for (key = KEY_RESERVED; key <= KEY_UNKNOWN; key++) +- if (ioctl(fd, UI_SET_KEYBIT, key) != 0) +- goto setup_error; ++ for (i = 0; get_input_code_by_index(i, &code) >= 0; i++) { ++ key = (int)code; ++ if (((key >= KEY_ESC) && (key <= KEY_RFKILL)) || ++ ((key >= KEY_OK ) && (key <= KEY_WPS_BUTTON))) { ++ if (ioctl(fd, UI_SET_KEYBIT, key) != 0) ++ goto setup_error; ++ } ++ }
++int get_input_code_by_index(int index, linux_input_code code) ++{ ++ int i; ++ ++ for (i = 0; input_map[i].name != NULL; i++) { ++ if (i == index) { ++ code = input_map[i].code; ++ return i; ++ } ++ } ++ return -1; ++} ++
endif
++int get_input_code_by_index(int index, linux_input_code * code);
endif
++int get_input_code_by_index(int index, linux_input_code * code);
+From 4.8.0 the kernel no longer supports LIRC_NOTIFY_DECODE, +LIRC_SETUP_START/LIRC_SETUP_END and several constants related +to initiating filters. Remove corresponding calls from lircd. +---
+diff --git a/daemons/lircd.cpp b/daemons/lircd.cpp +index a7dbc94..a50d11f 100644 +--- a/daemons/lircd.cpp ++++ b/daemons/lircd.cpp +@@ -464,50 +464,6 @@ static int setup_timeout(void)
+-static int setup_filter(void) +-{ +- int ret1, ret2; +- lirc_t min_pulse_supported = 0, max_pulse_supported = 0; +- lirc_t min_space_supported = 0, max_space_supported = 0; +- +- if (!(curr_driver->features & LIRC_CAN_SET_REC_FILTER)) +- return 1; +- if (curr_driver->drvctl_func(LIRC_GET_MIN_FILTER_PULSE, +- &min_pulse_supported) == -1 || +- curr_driver->drvctl_func(LIRC_GET_MAX_FILTER_PULSE, &max_pulse_supported) == -1 +- || curr_driver->drvctl_func(LIRC_GET_MIN_FILTER_SPACE, &min_space_supported) == -1 +- || curr_driver->drvctl_func(LIRC_GET_MAX_FILTER_SPACE, &max_space_supported) == -1) { +- log_error("could not get filter range"); +- log_perror_err(func); +- } +- +- if (setup_min_pulse > max_pulse_supported) +- setup_min_pulse = max_pulse_supported; +- else if (setup_min_pulse < min_pulse_supported) +- setup_min_pulse = 0; / disable filtering / +- +- if (setup_min_space > max_space_supported) +- setup_min_space = max_space_supported; +- else if (setup_min_space < min_space_supported) +- setup_min_space = 0; / disable filtering / +- +- ret1 = curr_driver->drvctl_func(LIRC_SET_REC_FILTER_PULSE, &setup_min_pulse); +- ret2 = curr_driver->drvctl_func(LIRC_SET_REC_FILTER_SPACE, &setup_min_space); +- if (ret1 == -1 || ret2 == -1) { +- if (curr_driver-> +- drvctl_func(LIRC_SET_REC_FILTER, +- setup_min_pulse < setup_min_space ? &setup_min_pulse : &setup_min_space) == -1) { +- log_error("could not set filter"); +- log_perror_err(func); +- return 0; +- } +- } +- return 1; +-} +- +- +- +-
+diff --git a/lib/driver.h b/lib/driver.h +index c7c4a6a..fc7318e 100644 +--- a/lib/driver.h ++++ b/lib/driver.h +@@ -97,6 +97,13 @@ int drv_handle_options(const char* options);
define DRVCTL_FREE_DEVICES 6
++/* ++ The former LIRC_NOTIFY_DECODE, informs drier that signal is successfully ++ decoded e. g., to initiate some visual feedback through a LED. ++ / ++ ++#define DRVCTL_NOTIFY_DECODE 7 ++
define DRVCTL_MAX 128
+-- +2.7.4
+From 55cd30e16a46bde49ccbbce1dea8bc734362170d Mon Sep 17 00:00:00 2001 +From: MilhouseVH milhouseVH.github@nmacleod.com +Date: Fri, 30 Sep 2016 01:53:50 +0100 +Subject: [PATCH 2/2] build hack
+Hack to build with 4.8 backport above. Including "driver.h" +isn't enough, but this works. Can all be dropped once lirc +0.9.5 is released. +---
+diff --git a/daemons/lircd.cpp b/daemons/lircd.cpp +index a50d11f..8b46bc0 100644 +--- a/daemons/lircd.cpp ++++ b/daemons/lircd.cpp +@@ -71,6 +71,7 @@
endif
include "lirc_private.h"
++#define DRVCTL_NOTIFY_DECODE 7
ifdef HAVE_INT_GETGROUPLIST_GROUPS
define lirc_gid int
+-- +2.7.4
diff -Naur a/packages/drivers/lirc/patches/0.9.4/lirc-0007-disable-python-yaml-mod.patch b/packages/drivers/lirc/patches/0.9.4/lirc-0007-disable-python-yaml-mod.patch --- a/packages/drivers/lirc/patches/0.9.4/lirc-0007-disable-python-yaml-mod.patch 1970-01-01 01:00:00.000000000 +0100 +++ b/packages/drivers/lirc/patches/0.9.4/lirc-0007-disable-python-yaml-mod.patch 2016-10-22 11:08:24.000000000 +0200 @@ -0,0 +1,11 @@ +--- a/configure.ac.orig 2016-10-17 22:23:59.484494213 +0200 ++++ b/configure.ac 2016-10-17 22:25:08.045520993 +0200 +@@ -76,7 +76,7 @@
+-install-data-hook: +- rm -f $(DESTDIR)/$(pkgpythondir)/configs +- $(srcdir)/make_rel_symlink.py \ +- $(DESTDIR)$(pkgdatadir)/configs \ +- $(DESTDIR)$(pkgpythondir)/configs +-
+-install-data-hook: +- rm -f $(DESTDIR)/$(pkgpythondir)/configs +- $(srcdir)/make_rel_symlink.py \ +- $(DESTDIR)$(pkgdatadir)/configs \ +- $(DESTDIR)$(pkgpythondir)/configs +-
-- if test
uname
!= "Linux"; then -- kerneldir="not running Linux" -- else -- for dir in /usr/src/kernel-source-uname -r
/usr/src/linux-uname -r
/usr/src/linux /lib/modules/uname -r
/source /lib/modules/uname -r
/build ${ac_kerneldir}; do -+ for dir in ${ac_kerneldir}; dodirname $dir/Makefile
/