All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-oe][PATCH 1/2] jack2: Fix build errors found with gcc7
@ 2017-04-22  0:00 Khem Raj
  2017-04-22  0:00 ` [meta-oe][PATCH V2 2/2] lirc: update to 0.9.4d Khem Raj
  0 siblings, 1 reply; 2+ messages in thread
From: Khem Raj @ 2017-04-22  0:00 UTC (permalink / raw)
  To: openembedded-devel

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ...1-typecast-input-parameter-to-int-for-abs.patch | 32 ++++++++++++++++++++++
 meta-oe/recipes-multimedia/jack/jack_git.bb        |  4 ++-
 2 files changed, 35 insertions(+), 1 deletion(-)
 create mode 100644 meta-oe/recipes-multimedia/jack/jack/0001-typecast-input-parameter-to-int-for-abs.patch

diff --git a/meta-oe/recipes-multimedia/jack/jack/0001-typecast-input-parameter-to-int-for-abs.patch b/meta-oe/recipes-multimedia/jack/jack/0001-typecast-input-parameter-to-int-for-abs.patch
new file mode 100644
index 000000000..c119f1981
--- /dev/null
+++ b/meta-oe/recipes-multimedia/jack/jack/0001-typecast-input-parameter-to-int-for-abs.patch
@@ -0,0 +1,32 @@
+From 8ec6f75bf7a318a3a1e352df7c97630cfaba537a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 21 Apr 2017 16:18:39 -0700
+Subject: [PATCH] typecast input parameter to int for abs()
+
+Fixes
+../tests/test.cpp:482:73: error: call of overloaded 'abs(jack_nframes_t)' is ambiguous
+
+because the signature is int abs(int) and its passing
+unsigned int to it.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ tests/test.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/test.cpp b/tests/test.cpp
+index 8a8a8117..9655742e 100644
+--- a/tests/test.cpp
++++ b/tests/test.cpp
+@@ -479,7 +479,7 @@ int process4(jack_nframes_t nframes, void *arg)
+ 	jack_nframes_t delta_time = cur_time - last_time;
+ 
+ 	Log("calling process4 callback : jack_frame_time = %ld delta_time = %ld\n", cur_time, delta_time);
+-	if (delta_time > 0  && (jack_nframes_t)abs(delta_time - cur_buffer_size) > tolerance) {
++	if (delta_time > 0  && (jack_nframes_t)abs(int(delta_time - cur_buffer_size)) > tolerance) {
+ 		printf("!!! ERROR !!! jack_frame_time seems to return incorrect values cur_buffer_size = %d, delta_time = %d tolerance %d\n", cur_buffer_size, delta_time, tolerance);
+ 	}
+ 
+-- 
+2.12.2
+
diff --git a/meta-oe/recipes-multimedia/jack/jack_git.bb b/meta-oe/recipes-multimedia/jack/jack_git.bb
index ba52691d3..b85ba8a02 100644
--- a/meta-oe/recipes-multimedia/jack/jack_git.bb
+++ b/meta-oe/recipes-multimedia/jack/jack_git.bb
@@ -14,7 +14,9 @@ LIC_FILES_CHKSUM = " \
 
 DEPENDS = "libsamplerate0 libsndfile1 readline"
 
-SRC_URI = "git://github.com/jackaudio/jack2.git"
+SRC_URI = "git://github.com/jackaudio/jack2.git \
+           file://0001-typecast-input-parameter-to-int-for-abs.patch \
+          "
 SRCREV = "2d1d323505585d406a7e64fb932953baefc5945e"
 PV = "1.9.10+git${SRCPV}"
 S = "${WORKDIR}/git"
-- 
2.12.2



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [meta-oe][PATCH V2 2/2] lirc: update to 0.9.4d
  2017-04-22  0:00 [meta-oe][PATCH 1/2] jack2: Fix build errors found with gcc7 Khem Raj
@ 2017-04-22  0:00 ` Khem Raj
  0 siblings, 0 replies; 2+ messages in thread
From: Khem Raj @ 2017-04-22  0:00 UTC (permalink / raw)
  To: openembedded-devel

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
v2:
- Merge lirc.inc
- Package extra systemd service files
- Correct perms for contrib/ dir
- Set security flags to not have pie flags

 meta-oe/recipes-connectivity/lirc/lirc.inc         |  13 ---
 ...crcd-Mark-local-inline-funtions-as-static.patch |  49 ----------
 .../recipes-connectivity/lirc/lirc/pollfd.patch    | 101 +++++++++++++++++++++
 .../lirc/{lirc_0.9.2.bb => lirc_0.9.4d.bb}         |  35 +++++--
 4 files changed, 126 insertions(+), 72 deletions(-)
 delete mode 100644 meta-oe/recipes-connectivity/lirc/lirc.inc
 delete mode 100644 meta-oe/recipes-connectivity/lirc/lirc/0001-lircrcd-Mark-local-inline-funtions-as-static.patch
 create mode 100644 meta-oe/recipes-connectivity/lirc/lirc/pollfd.patch
 rename meta-oe/recipes-connectivity/lirc/{lirc_0.9.2.bb => lirc_0.9.4d.bb} (60%)

diff --git a/meta-oe/recipes-connectivity/lirc/lirc.inc b/meta-oe/recipes-connectivity/lirc/lirc.inc
deleted file mode 100644
index 6ff8e0160..000000000
--- a/meta-oe/recipes-connectivity/lirc/lirc.inc
+++ /dev/null
@@ -1,13 +0,0 @@
-DESCRIPTION = "LIRC is a package that allows you to decode and send infra-red signals of many commonly used remote controls."
-DESCRIPTION_append_lirc = " This package contains the lirc daemon, libraries and tools."
-DESCRIPTION_append_lirc-exec = " This package contains a daemon that runs programs on IR signals."
-DESCRIPTION_append_lirc-remotes = " This package contains some config files for remotes."
-DESCRIPTION_append_lirc-nslu2example = " This package contains a working config for RC5 remotes and a modified NSLU2."
-HOMEPAGE = "http://www.lirc.org"
-SECTION = "console/network"
-LICENSE = "GPLv2"
-DEPENDS = "alsa-lib libftdi libusb1 libusb-compat jack portaudio-v19"
-
-SRC_URI = "http://prdownloads.sourceforge.net/lirc/lirc-${PV}.tar.bz2"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
diff --git a/meta-oe/recipes-connectivity/lirc/lirc/0001-lircrcd-Mark-local-inline-funtions-as-static.patch b/meta-oe/recipes-connectivity/lirc/lirc/0001-lircrcd-Mark-local-inline-funtions-as-static.patch
deleted file mode 100644
index e19d27671..000000000
--- a/meta-oe/recipes-connectivity/lirc/lirc/0001-lircrcd-Mark-local-inline-funtions-as-static.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From c2be4543e4777c9e3d74b30326ba37b01917b0a9 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Thu, 25 Aug 2016 03:02:37 +0000
-Subject: [PATCH] lircrcd: Mark local inline funtions as static
-
-These functions are not used anywhere outside
-this file, so they should be converted into static
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- daemons/lircrcd.c | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/daemons/lircrcd.c b/daemons/lircrcd.c
-index 55777cd..5ddc94d 100644
---- a/daemons/lircrcd.c
-+++ b/daemons/lircrcd.c
-@@ -153,7 +153,7 @@ char *s;
- /* A safer write(), since sockets might not write all but only some of the
-    bytes requested */
- 
--inline int write_socket(int fd, char *buf, int len)
-+static inline int write_socket(int fd, char *buf, int len)
- {
- 	int done, todo = len;
- 
-@@ -167,7 +167,7 @@ inline int write_socket(int fd, char *buf, int len)
- 	return (len);
- }
- 
--inline int write_socket_len(int fd, char *buf)
-+static inline int write_socket_len(int fd, char *buf)
- {
- 	int len;
- 
-@@ -177,7 +177,7 @@ inline int write_socket_len(int fd, char *buf)
- 	return (1);
- }
- 
--inline int read_timeout(int fd, char *buf, int len, int timeout)
-+static inline int read_timeout(int fd, char *buf, int len, int timeout)
- {
- 	fd_set fds;
- 	struct timeval tv;
--- 
-1.9.1
-
diff --git a/meta-oe/recipes-connectivity/lirc/lirc/pollfd.patch b/meta-oe/recipes-connectivity/lirc/lirc/pollfd.patch
new file mode 100644
index 000000000..4feea8034
--- /dev/null
+++ b/meta-oe/recipes-connectivity/lirc/lirc/pollfd.patch
@@ -0,0 +1,101 @@
+Index: lirc-0.9.4d/daemons/lircrcd.cpp
+===================================================================
+--- lirc-0.9.4d.orig/daemons/lircrcd.cpp
++++ lirc-0.9.4d/daemons/lircrcd.cpp
+@@ -29,10 +29,12 @@
+ #include <sys/un.h>
+ #include <sys/stat.h>
+ #include <sys/types.h>
++#include <poll.h>
+ #include <syslog.h>
+ 
+ #include "lirc_client.h"
+ #include "lirc/lirc_log.h"
++#include "lirc/curl_poll.h"
+ 
+ #define MAX_CLIENTS 100
+ #define WHITE_SPACE " \t"
+Index: lirc-0.9.4d/lib/curl_poll.c
+===================================================================
+--- lirc-0.9.4d.orig/lib/curl_poll.c
++++ lirc-0.9.4d/lib/curl_poll.c
+@@ -36,6 +36,7 @@
+ #include <stdlib.h>
+ #include <sys/time.h>
+ #include <sys/types.h>
++#include <sys/poll.h>
+ 
+ #include "lirc_log.h"
+ #include "curl_poll.h"
+@@ -67,7 +68,7 @@ static const logchannel_t logchannel = L
+ 
+ #ifdef HAVE_POLL_FINE
+ 
+-int curl_poll(struct pollfd ufds[], unsigned int nfds, int timeout_ms)
++int curl_poll(struct pollfd *ufds, unsigned int nfds, int timeout_ms)
+ {
+ 	return poll(ufds, nfds, timeout_ms);
+ }
+@@ -112,7 +113,7 @@ static int verify_sock(int s)
+ }
+ 
+ 
+-int curl_poll(struct pollfd ufds[], unsigned int nfds, int timeout_ms)
++int curl_poll(struct pollfd *ufds, unsigned int nfds, int timeout_ms)
+ {
+ 	struct timeval pending_tv;
+ 	struct timeval* ptimeout;
+Index: lirc-0.9.4d/lib/curl_poll.h
+===================================================================
+--- lirc-0.9.4d.orig/lib/curl_poll.h
++++ lirc-0.9.4d/lib/curl_poll.h
+@@ -1,5 +1,5 @@
+-#ifndef _POLL_H
+-#define _POLL_H
++#ifndef _LIB_CURL_POLL_H
++#define _LIB_CURL_POLL_H
+ /***************************************************************************
+  *                                  _   _ ____  _
+  *  Project                     ___| | | |  _ \| |
+@@ -29,13 +29,9 @@
+ extern "C" {
+ #endif
+ 
+-#ifdef HAVE_SYS_POLL_H
+-#include <sys/poll.h>
+-#else
+ #include <poll.h>
+-#endif
+ 
+-int curl_poll(struct pollfd ufds[], unsigned int nfds, int timeout_ms);
++int curl_poll(struct pollfd *ufds, unsigned int nfds, int timeout_ms);
+ 
+ #ifdef __cplusplus
+ }
+Index: lirc-0.9.4d/lib/lirc/curl_poll.h
+===================================================================
+--- lirc-0.9.4d.orig/lib/lirc/curl_poll.h
++++ lirc-0.9.4d/lib/lirc/curl_poll.h
+@@ -1,5 +1,5 @@
+-#ifndef _POLL_H
+-#define _POLL_H
++#ifndef _LIRC_CURL_POLL_H
++#define _LIRC_CURL_POLL_H
+ /***************************************************************************
+  *                                  _   _ ____  _
+  *  Project                     ___| | | |  _ \| |
+@@ -29,13 +29,9 @@
+ extern "C" {
+ #endif
+ 
+-#ifdef HAVE_SYS_POLL_H
+-#include <sys/poll.h>
+-#else
+ #include <poll.h>
+-#endif
+ 
+-int curl_poll(struct pollfd ufds[], unsigned int nfds, int timeout_ms);
++int curl_poll(struct pollfd *ufds, unsigned int nfds, int timeout_ms);
+ 
+ #ifdef __cplusplus
+ }
diff --git a/meta-oe/recipes-connectivity/lirc/lirc_0.9.2.bb b/meta-oe/recipes-connectivity/lirc/lirc_0.9.4d.bb
similarity index 60%
rename from meta-oe/recipes-connectivity/lirc/lirc_0.9.2.bb
rename to meta-oe/recipes-connectivity/lirc/lirc_0.9.4d.bb
index 17261921f..b13163deb 100644
--- a/meta-oe/recipes-connectivity/lirc/lirc_0.9.2.bb
+++ b/meta-oe/recipes-connectivity/lirc/lirc_0.9.4d.bb
@@ -1,7 +1,18 @@
-require lirc.inc
+DESCRIPTION = "LIRC is a package that allows you to decode and send infra-red signals of many commonly used remote controls."
+DESCRIPTION_append_lirc = " This package contains the lirc daemon, libraries and tools."
+DESCRIPTION_append_lirc-exec = " This package contains a daemon that runs programs on IR signals."
+DESCRIPTION_append_lirc-remotes = " This package contains some config files for remotes."
+DESCRIPTION_append_lirc-nslu2example = " This package contains a working config for RC5 remotes and a modified NSLU2."
+HOMEPAGE = "http://www.lirc.org"
+SECTION = "console/network"
+LICENSE = "GPLv2"
+DEPENDS = "libxslt-native alsa-lib libftdi libusb1 libusb-compat jack portaudio-v19"
 
-SRC_URI += " \
-    file://0001-lircrcd-Mark-local-inline-funtions-as-static.patch \
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+SRC_URI = "http://prdownloads.sourceforge.net/lirc/lirc-${PV}.tar.bz2 \
+    file://pollfd.patch \
     file://lircd.service \
     file://lircd.init \
     file://lircexec.init \
@@ -9,14 +20,14 @@ SRC_URI += " \
     file://lirc_options.conf \
     file://lirc.tmpfiles \
 "
-#file://0001-Adaptation-for-STM-configuration.patch \
-#
-SRC_URI[md5sum] = "3afc84e79c0839823cc20e7a710dd06d"
-SRC_URI[sha256sum] = "4e3f948fcdee6dce009171143f0cb7cd7be48593dd58138db4101a41f651a1dd"
+SRC_URI[md5sum] = "0d11679cbdd94a5a6da00a8e7231b4bf"
+SRC_URI[sha256sum] = "c68f18c35b489b865c0a741d119b136e8702191538cd3551b977a7af6c4e41ab"
 
-SYSTEMD_PACKAGES = "lirc"
-SYSTEMD_SERVICE_${PN} = "lircd.service lircmd.service"
+SYSTEMD_PACKAGES = "lirc lirc-exec"
+SYSTEMD_SERVICE_${PN} = "lircd.service lircmd.service lircd-setup.service lircd-uinput.service"
+SYSTEMD_SERVICE_${PN}-exec = "irexec.service"
 SYSTEMD_AUTO_ENABLE_lirc = "enable"
+SYSTEMD_AUTO_ENABLE_lirc-exec = "enable"
 
 inherit autotools pkgconfig systemd python3native
 
@@ -27,6 +38,7 @@ PACKAGECONFIG ?= " \
     ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', ' systemd', '', d)} \
     ${@bb.utils.contains('DISTRO_FEATURES', 'x11', ' x11', '', d)} \
 "
+CACHED_CONFIGUREVARS = "HAVE_WORKING_POLL=yes"
 
 #EXTRA_OEMAKE = 'SUBDIRS="lib daemons tools"'
 do_install_append() {
@@ -41,6 +53,7 @@ do_install_append() {
     install -m 0644 ${WORKDIR}/lirc.tmpfiles ${D}${libdir}/tmpfiles.d/lirc.conf
     rm -rf ${D}${libdir}/lirc/plugins/*.la
     rmdir ${D}/var/run/lirc ${D}/var/run
+    chown -R root:root ${D}${datadir}/lirc/contrib
 }
 
 PACKAGES =+ "${PN}-contrib ${PN}-exec ${PN}-plugins ${PN}-python"
@@ -53,7 +66,7 @@ RRECOMMENDS_lirc = "${PN}-exec ${PN}-plugins"
 
 FILES_${PN}-plugins = "${libdir}/lirc/plugins/*.so ${datadir}/lirc/configs"
 FILES_${PN}-contrib = "${datadir}/lirc/contrib"
-FILES_${PN}-exec = "${bindir}/irexec ${sysconfdir}/lircexec"
+FILES_${PN}-exec = "${bindir}/irexec ${sysconfdir}/lircexec ${systemd_unitdir}/system/irexec.service"
 FILES_${PN} += "${systemd_unitdir}/system/lircexec.init"
 FILES_${PN} += "${systemd_unitdir}/system/lircd.service"
 FILES_${PN} += "${systemd_unitdir}/system/lircd.socket"
@@ -70,3 +83,5 @@ INITSCRIPT_PARAMS_lirc-exec = "defaults 21"
 pkg_postinst_${PN}_append() {
     if [ ! -c $D/dev/lirc -a ! -f /sbin/udevd ]; then mknod $D/dev/lirc c 61 0; fi
 }
+
+SECURITY_CFLAGS = "${SECURITY_NO_PIE_CFLAGS}"
-- 
2.12.2



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-04-22  0:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-22  0:00 [meta-oe][PATCH 1/2] jack2: Fix build errors found with gcc7 Khem Raj
2017-04-22  0:00 ` [meta-oe][PATCH V2 2/2] lirc: update to 0.9.4d Khem Raj

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.