Merge pull request #3642 from HiassofT/le92-lirc

[le92] lirc: fix missing irman driver, include Debian patches
This commit is contained in:
MilhouseVH 2019-07-05 22:56:01 +01:00 committed by GitHub
commit 973b437725
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 108 additions and 7 deletions

View File

@ -8,6 +8,7 @@ PKG_LICENSE="GPL"
PKG_SITE="http://sourceforge.net/projects/lirc"
PKG_URL="http://downloads.sourceforge.net/project/libirman/$PKG_VERSION/$PKG_NAME-$PKG_VERSION.tar.gz"
PKG_DEPENDS_TARGET="toolchain systemd lirc"
PKG_NEED_UNPACK="$(get_pkg_directory lirc)"
PKG_LONGDESC="libirman library for lircd"
PKG_TOOLCHAIN="autotools"
PKG_BUILD_FLAGS="+pic"

View File

@ -17,6 +17,7 @@ PKG_PYTHON_WANTED=Python2
PKG_CONFIGURE_OPTS_TARGET="ac_cv_header_alsa_asoundlib_h=no \
ac_cv_lib_asound_snd_async_del_handler=no \
--enable-devinput \
--enable-uinput \
--with-gnu-ld \
--without-x \
--runstatedir=/run"

View File

@ -0,0 +1,24 @@
From: Alec Leamas <leamas.alec@gmail.com>
Date: Fri, 23 Nov 2018 23:04:35 -0500
Subject: [PATCH] logging: Don't use broken LOG_CONS syslog flag.
---
lib/lirc_log.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/lirc_log.c b/lib/lirc_log.c
index bea357b..900beb3 100644
--- a/lib/lirc_log.c
+++ b/lib/lirc_log.c
@@ -102,9 +102,9 @@ int lirc_log_open(const char* _progname, int _nodaemon, loglevel_t level)
if (use_syslog) {
if (nodaemon)
- openlog(syslogident, LOG_CONS | LOG_PID | LOG_PERROR, LOG_LOCAL0);
+ openlog(syslogident, LOG_PID | LOG_PERROR, LOG_LOCAL0);
else
- openlog(syslogident, LOG_CONS | LOG_PID, LOG_LOCAL0);
+ openlog(syslogident, LOG_PID, LOG_LOCAL0);
} else {
lf = fopen(logfile, "a");
if (lf == NULL) {

View File

@ -0,0 +1,22 @@
From: Alec Leamas <leamas.alec@gmail.com>
Date: Sun, 30 Dec 2018 21:26:15 +0100
Subject: [PATCH] lircd: Fix --connect option parsing error (#343).
Bug: https://sourceforge.net/p/lirc/tickets/343/
---
daemons/lircd.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/daemons/lircd.cpp b/daemons/lircd.cpp
index d5be708..ad8dde9 100644
--- a/daemons/lircd.cpp
+++ b/daemons/lircd.cpp
@@ -790,7 +790,7 @@ int add_peer_connection(const char* server_arg)
struct servent* service;
char server[strlen(server_arg) + 1];
- strncpy(server, server_arg, sizeof(server) - 1);
+ strncpy(server, server_arg, sizeof(server));
if (peern < MAX_PEERS) {
peers[peern] = (struct peer_connection*) malloc(sizeof(

View File

@ -0,0 +1,43 @@
From: William Manley <will@williammanley.net>
Date: Thu, 9 Aug 2018 18:26:44 +0100
Subject: [PATCH] systemd support: Notify systemd on successful startup
This allows systemd to detect the case where we've failed to startup
due to a failure to parse our config files.
Origin: upstream, https://sourceforge.net/p/lirc/git/ci/b78df9b2950cf4
Applied-Upstream: 0.11.0
---
daemons/lircd.cpp | 5 +++++
systemd/lircd.service | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/daemons/lircd.cpp b/daemons/lircd.cpp
index ad8dde9..f559b62 100644
--- a/daemons/lircd.cpp
+++ b/daemons/lircd.cpp
@@ -2469,6 +2469,11 @@ int main(int argc, char** argv)
if (!nodaemon)
daemonize();
+#ifdef HAVE_SYSTEMD
+ /* Tell systemd that we started up correctly */
+ sd_notify(0, "READY=1");
+#endif
+
loop();
/* never reached */
diff --git a/systemd/lircd.service b/systemd/lircd.service
index 7f75805..6af049b 100644
--- a/systemd/lircd.service
+++ b/systemd/lircd.service
@@ -6,7 +6,7 @@ Wants=lircd-setup.service
After=network.target lircd-setup.service
[Service]
-Type=simple
+Type=notify
ExecStart=/usr/sbin/lircd --nodaemon
; User=lirc
; Group=lirc

View File

@ -1,5 +1,5 @@
diff --git a/Makefile.am b/Makefile.am
index aafb4e8c..f33a0c19 100644
index 9f3dd143..9619a6eb 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -5,7 +5,9 @@ ACLOCAL_AMFLAGS = -I m4
@ -31,15 +31,25 @@ index aafb4e8c..f33a0c19 100644
if INSTALL_ETC
@@ -61,6 +67,7 @@ endif
@@ -61,7 +67,9 @@ endif
dist_doc_DATA = VERSION
+if HAVE_PYTHON
nodist_pkgdata_DATA = $(PYTHON_TARBALL)
+endif
pkgconfigdir = $(libdir)/pkgconfig
@@ -134,6 +141,8 @@ all-local:
dist_pkgconfig_DATA = lirc.pc lirc-driver.pc
@@ -71,6 +79,7 @@ nobase_header_HEADERS = include/media/lirc.h \
include/linux/input-event-codes.h
header_HEADERS = drivers/irpipe/irpipe.h
+if HAVE_PYTHON
py_pkgdir = $(pkgdatadir)/python-pkg
dist_py_pkg_DATA = python-pkg/setup.py \
python-pkg/README.rst
@@ -134,6 +143,8 @@ all-local:
$(if $(VERBOSE),,-q) build
endif
@ -48,7 +58,7 @@ index aafb4e8c..f33a0c19 100644
install-data-hook:
$(SED) -i -e '/^plugindir/s|/usr/lib|$(libdir)|' \
$(DESTDIR)$(lirc_confdir)/lirc_options.conf
@@ -167,6 +176,7 @@ fix-version: .phony
@@ -170,6 +181,7 @@ fix-version: .phony
$(SED) -i '/DATE/s/=.*/="$(GIT_DATE)"/' $(distdir)/VERSION
$(SED) -i '/REFS/s|=.*|="$(GIT_REFS)"|' $(distdir)/VERSION
@ -56,7 +66,7 @@ index aafb4e8c..f33a0c19 100644
$(abs_builddir)/python-pkg/setup.py:
cp -ar $(top_srcdir)/python-pkg $(abs_builddir)
chmod -R u+w python-pkg
@@ -190,6 +200,7 @@ python-pkg/lirc/config.py: Makefile $(abs_builddir)/python-pkg/setup.py
@@ -193,6 +205,7 @@ python-pkg/lirc/config.py: Makefile $(abs_builddir)/python-pkg/setup.py
@echo 'DOCDIR = "$(docdir)"' >>$@
@echo 'MODINFO = "$(MODINFO)"' >>$@
@echo 'VERSION = "$(VERSION)"' >>$@
@ -65,7 +75,7 @@ index aafb4e8c..f33a0c19 100644
paths.h: Makefile
@echo "#ifndef PATHS_H" >paths.h
diff --git a/configure.ac b/configure.ac
index 321a61f7..016813c1 100644
index 58347d88..48ce5629 100644
--- a/configure.ac
+++ b/configure.ac
@@ -43,7 +43,8 @@ AC_CHECK_PROG([DOXYGEN],[doxygen],[yes],[no])
@ -78,7 +88,7 @@ index 321a61f7..016813c1 100644
PKG_CHECK_MODULES([PYTHON],[python-${PYTHON_VERSION}m],,[true])
test -z "$PYTHON_LIBS" && \
PKG_CHECK_MODULES([PYTHON], [python-$PYTHON_VERSION],,[true])
@@ -577,6 +578,7 @@ AX_REPORT_CONDITIONAL([DEVEL])
@@ -580,6 +581,7 @@ AX_REPORT_CONDITIONAL([DEVEL])
AX_REPORT_CONDITIONAL([LINUX_KERNEL])
AX_REPORT_CONDITIONAL([HAVE_DEVINPUT])
AX_REPORT_CONDITIONAL([WITH_SYSTEMDSYSTEMUNITDIR])