diff options
| -rw-r--r-- | meta-oe/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc/fix_build_errors.patch | 30 | ||||
| -rw-r--r-- | meta-oe/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc/pollfd.patch | 101 | ||||
| -rw-r--r-- | meta-oe/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc_0.10.1.bb (renamed from meta-oe/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc_0.9.4d.bb) | 32 |
3 files changed, 58 insertions, 105 deletions
diff --git a/meta-oe/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc/fix_build_errors.patch b/meta-oe/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc/fix_build_errors.patch new file mode 100644 index 0000000000..41353dbbdc --- /dev/null +++ b/meta-oe/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc/fix_build_errors.patch | |||
| @@ -0,0 +1,30 @@ | |||
| 1 | diff --git a/configure.ac b/configure.ac | ||
| 2 | index 58347d8..8c7fca2 100644 | ||
| 3 | --- a/configure.ac | ||
| 4 | +++ b/configure.ac | ||
| 5 | @@ -77,15 +77,10 @@ AC_TYPE_UINT64_T | ||
| 6 | |||
| 7 | dnl AC_TYPE_GETGROUPS seems broken on recent MacOS, so: | ||
| 8 | AC_MSG_CHECKING([Figure out if getgrouplist() needs gid_t or int]) | ||
| 9 | -oldcflags="$CFLAGS" | ||
| 10 | -export CFLAGS=-Werror | ||
| 11 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ | ||
| 12 | #include <unistd.h> | ||
| 13 | -#include <grp.h> | ||
| 14 | - ]], [[ | ||
| 15 | -gid_t groups[32]; int ngroups; const char* user = "root"; | ||
| 16 | -getgrouplist(user, 1, groups, &ngroups); | ||
| 17 | - ]])],[ | ||
| 18 | +int getgroups(int gidsetsize, gid_t grouplist[]); | ||
| 19 | + ]], [[ ]])],[ | ||
| 20 | AC_MSG_RESULT(gid_t) | ||
| 21 | AC_DEFINE(GETGROUPS_T,[gid_t]) | ||
| 22 | ],[ | ||
| 23 | @@ -93,7 +88,6 @@ getgrouplist(user, 1, groups, &ngroups); | ||
| 24 | AC_DEFINE(GETGROUPS_T,[int]) | ||
| 25 | ] | ||
| 26 | ) | ||
| 27 | -export CFLAGS="$oldcflags" | ||
| 28 | |||
| 29 | dnl Checks for library functions. | ||
| 30 | AC_CHECK_FUNCS(gethostname gettimeofday mkfifo select socket strdup \ | ||
diff --git a/meta-oe/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc/pollfd.patch b/meta-oe/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc/pollfd.patch deleted file mode 100644 index 4feea80346..0000000000 --- a/meta-oe/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc/pollfd.patch +++ /dev/null | |||
| @@ -1,101 +0,0 @@ | |||
| 1 | Index: lirc-0.9.4d/daemons/lircrcd.cpp | ||
| 2 | =================================================================== | ||
| 3 | --- lirc-0.9.4d.orig/daemons/lircrcd.cpp | ||
| 4 | +++ lirc-0.9.4d/daemons/lircrcd.cpp | ||
| 5 | @@ -29,10 +29,12 @@ | ||
| 6 | #include <sys/un.h> | ||
| 7 | #include <sys/stat.h> | ||
| 8 | #include <sys/types.h> | ||
| 9 | +#include <poll.h> | ||
| 10 | #include <syslog.h> | ||
| 11 | |||
| 12 | #include "lirc_client.h" | ||
| 13 | #include "lirc/lirc_log.h" | ||
| 14 | +#include "lirc/curl_poll.h" | ||
| 15 | |||
| 16 | #define MAX_CLIENTS 100 | ||
| 17 | #define WHITE_SPACE " \t" | ||
| 18 | Index: lirc-0.9.4d/lib/curl_poll.c | ||
| 19 | =================================================================== | ||
| 20 | --- lirc-0.9.4d.orig/lib/curl_poll.c | ||
| 21 | +++ lirc-0.9.4d/lib/curl_poll.c | ||
| 22 | @@ -36,6 +36,7 @@ | ||
| 23 | #include <stdlib.h> | ||
| 24 | #include <sys/time.h> | ||
| 25 | #include <sys/types.h> | ||
| 26 | +#include <sys/poll.h> | ||
| 27 | |||
| 28 | #include "lirc_log.h" | ||
| 29 | #include "curl_poll.h" | ||
| 30 | @@ -67,7 +68,7 @@ static const logchannel_t logchannel = L | ||
| 31 | |||
| 32 | #ifdef HAVE_POLL_FINE | ||
| 33 | |||
| 34 | -int curl_poll(struct pollfd ufds[], unsigned int nfds, int timeout_ms) | ||
| 35 | +int curl_poll(struct pollfd *ufds, unsigned int nfds, int timeout_ms) | ||
| 36 | { | ||
| 37 | return poll(ufds, nfds, timeout_ms); | ||
| 38 | } | ||
| 39 | @@ -112,7 +113,7 @@ static int verify_sock(int s) | ||
| 40 | } | ||
| 41 | |||
| 42 | |||
| 43 | -int curl_poll(struct pollfd ufds[], unsigned int nfds, int timeout_ms) | ||
| 44 | +int curl_poll(struct pollfd *ufds, unsigned int nfds, int timeout_ms) | ||
| 45 | { | ||
| 46 | struct timeval pending_tv; | ||
| 47 | struct timeval* ptimeout; | ||
| 48 | Index: lirc-0.9.4d/lib/curl_poll.h | ||
| 49 | =================================================================== | ||
| 50 | --- lirc-0.9.4d.orig/lib/curl_poll.h | ||
| 51 | +++ lirc-0.9.4d/lib/curl_poll.h | ||
| 52 | @@ -1,5 +1,5 @@ | ||
| 53 | -#ifndef _POLL_H | ||
| 54 | -#define _POLL_H | ||
| 55 | +#ifndef _LIB_CURL_POLL_H | ||
| 56 | +#define _LIB_CURL_POLL_H | ||
| 57 | /*************************************************************************** | ||
| 58 | * _ _ ____ _ | ||
| 59 | * Project ___| | | | _ \| | | ||
| 60 | @@ -29,13 +29,9 @@ | ||
| 61 | extern "C" { | ||
| 62 | #endif | ||
| 63 | |||
| 64 | -#ifdef HAVE_SYS_POLL_H | ||
| 65 | -#include <sys/poll.h> | ||
| 66 | -#else | ||
| 67 | #include <poll.h> | ||
| 68 | -#endif | ||
| 69 | |||
| 70 | -int curl_poll(struct pollfd ufds[], unsigned int nfds, int timeout_ms); | ||
| 71 | +int curl_poll(struct pollfd *ufds, unsigned int nfds, int timeout_ms); | ||
| 72 | |||
| 73 | #ifdef __cplusplus | ||
| 74 | } | ||
| 75 | Index: lirc-0.9.4d/lib/lirc/curl_poll.h | ||
| 76 | =================================================================== | ||
| 77 | --- lirc-0.9.4d.orig/lib/lirc/curl_poll.h | ||
| 78 | +++ lirc-0.9.4d/lib/lirc/curl_poll.h | ||
| 79 | @@ -1,5 +1,5 @@ | ||
| 80 | -#ifndef _POLL_H | ||
| 81 | -#define _POLL_H | ||
| 82 | +#ifndef _LIRC_CURL_POLL_H | ||
| 83 | +#define _LIRC_CURL_POLL_H | ||
| 84 | /*************************************************************************** | ||
| 85 | * _ _ ____ _ | ||
| 86 | * Project ___| | | | _ \| | | ||
| 87 | @@ -29,13 +29,9 @@ | ||
| 88 | extern "C" { | ||
| 89 | #endif | ||
| 90 | |||
| 91 | -#ifdef HAVE_SYS_POLL_H | ||
| 92 | -#include <sys/poll.h> | ||
| 93 | -#else | ||
| 94 | #include <poll.h> | ||
| 95 | -#endif | ||
| 96 | |||
| 97 | -int curl_poll(struct pollfd ufds[], unsigned int nfds, int timeout_ms); | ||
| 98 | +int curl_poll(struct pollfd *ufds, unsigned int nfds, int timeout_ms); | ||
| 99 | |||
| 100 | #ifdef __cplusplus | ||
| 101 | } | ||
diff --git a/meta-oe/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc_0.9.4d.bb b/meta-oe/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc_0.10.1.bb index f599696737..52d6adb567 100644 --- a/meta-oe/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc_0.9.4d.bb +++ b/meta-oe/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc_0.10.1.bb | |||
| @@ -6,13 +6,13 @@ DESCRIPTION_append_lirc-nslu2example = " This package contains a working config | |||
| 6 | HOMEPAGE = "http://www.lirc.org" | 6 | HOMEPAGE = "http://www.lirc.org" |
| 7 | SECTION = "console/network" | 7 | SECTION = "console/network" |
| 8 | LICENSE = "GPLv2" | 8 | LICENSE = "GPLv2" |
| 9 | DEPENDS = "libxslt-native alsa-lib libftdi libusb1 libusb-compat jack portaudio-v19 python3-pyyaml" | 9 | DEPENDS = "libxslt-native alsa-lib libftdi libusb1 libusb-compat jack portaudio-v19 python3-pyyaml python3-setuptools-native" |
| 10 | 10 | ||
| 11 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" | 11 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" |
| 12 | 12 | ||
| 13 | SRC_URI = "http://prdownloads.sourceforge.net/lirc/lirc-${PV}.tar.bz2 \ | 13 | SRC_URI = "http://prdownloads.sourceforge.net/lirc/lirc-${PV}.tar.bz2 \ |
| 14 | file://pollfd.patch \ | ||
| 15 | file://0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch \ | 14 | file://0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch \ |
| 15 | file://fix_build_errors.patch \ | ||
| 16 | file://lircd.service \ | 16 | file://lircd.service \ |
| 17 | file://lircd.init \ | 17 | file://lircd.init \ |
| 18 | file://lircexec.init \ | 18 | file://lircexec.init \ |
| @@ -20,8 +20,8 @@ SRC_URI = "http://prdownloads.sourceforge.net/lirc/lirc-${PV}.tar.bz2 \ | |||
| 20 | file://lirc_options.conf \ | 20 | file://lirc_options.conf \ |
| 21 | file://lirc.tmpfiles \ | 21 | file://lirc.tmpfiles \ |
| 22 | " | 22 | " |
| 23 | SRC_URI[md5sum] = "0d11679cbdd94a5a6da00a8e7231b4bf" | 23 | SRC_URI[md5sum] = "86c3f8e4efaba10571addb8313d1e040" |
| 24 | SRC_URI[sha256sum] = "c68f18c35b489b865c0a741d119b136e8702191538cd3551b977a7af6c4e41ab" | 24 | SRC_URI[sha256sum] = "8b753c60df2a7f5dcda2db72c38e448ca300c3b4f6000c1501fcb0bd5df414f2" |
| 25 | 25 | ||
| 26 | SYSTEMD_PACKAGES = "lirc lirc-exec" | 26 | SYSTEMD_PACKAGES = "lirc lirc-exec" |
| 27 | SYSTEMD_SERVICE_${PN} = "lircd.service lircmd.service lircd-setup.service lircd-uinput.service" | 27 | SYSTEMD_SERVICE_${PN} = "lircd.service lircmd.service lircd-setup.service lircd-uinput.service" |
| @@ -41,7 +41,31 @@ PACKAGECONFIG ?= " \ | |||
| 41 | CACHED_CONFIGUREVARS = "HAVE_WORKING_POLL=yes" | 41 | CACHED_CONFIGUREVARS = "HAVE_WORKING_POLL=yes" |
| 42 | 42 | ||
| 43 | #EXTRA_OEMAKE = 'SUBDIRS="lib daemons tools"' | 43 | #EXTRA_OEMAKE = 'SUBDIRS="lib daemons tools"' |
| 44 | |||
| 45 | # Ensure python-pkg/VERSION exists | ||
| 46 | do_configure_append() { | ||
| 47 | cp ${S}/VERSION ${S}/python-pkg/ | ||
| 48 | } | ||
| 49 | |||
| 50 | # Create PYTHON_TARBALL which LIRC needs for install-nodist_pkgdataDATA | ||
| 51 | do_install_prepend() { | ||
| 52 | rm -rf ${WORKDIR}/${PN}-${PV}/python-pkg/dist/ | ||
| 53 | mkdir ${WORKDIR}/${PN}-${PV}/python-pkg/dist/ | ||
| 54 | tar --exclude='${WORKDIR}/${PN}-${PV}/python-pkg/*' -czf ${WORKDIR}/${PN}-${PV}/python-pkg/dist/${PN}-${PV}.tar.gz ${S} | ||
| 55 | } | ||
| 56 | |||
| 57 | # In code, path to python is a variable that is replaced with path to native version of it | ||
| 58 | # during the configure stage, e.g ../recipe-sysroot-native/usr/bin/python3-native/python3. | ||
| 59 | # Replace it with #!/usr/bin/env python3 | ||
| 44 | do_install_append() { | 60 | do_install_append() { |
| 61 | sed -i '1c#!/usr/bin/env python3' ${D}${bindir}/lirc-setup \ | ||
| 62 | ${D}${PYTHON_SITEPACKAGES_DIR}/lirc-setup/lirc-setup \ | ||
| 63 | ${D}${bindir}/irtext2udp \ | ||
| 64 | ${D}${bindir}/lirc-init-db \ | ||
| 65 | ${D}${bindir}/irdb-get \ | ||
| 66 | ${D}${bindir}/pronto2lirc \ | ||
| 67 | ${D}${sbindir}/lircd-setup | ||
| 68 | |||
| 45 | install -m 0755 -d ${D}${sysconfdir} | 69 | install -m 0755 -d ${D}${sysconfdir} |
| 46 | install -m 0755 -d ${D}${sysconfdir}/lirc | 70 | install -m 0755 -d ${D}${sysconfdir}/lirc |
| 47 | install -m 0755 -d ${D}${systemd_unitdir}/system | 71 | install -m 0755 -d ${D}${systemd_unitdir}/system |
