aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-extended/libcec
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-extended/libcec')
-rw-r--r--meta-oe/recipes-extended/libcec/libcec/0001-CheckPlatformSupport.cmake-Do-not-hardcode-lib-path.patch42
-rw-r--r--meta-oe/recipes-extended/libcec/libcec/0001-Enhance-reproducibility.patch33
-rw-r--r--meta-oe/recipes-extended/libcec/libcec/0001-Remove-buggy-test-confusing-host-and-target.patch33
-rw-r--r--meta-oe/recipes-extended/libcec/libcec/0001-cecloader-Match-return-type-of-function-LibCecBootlo.patch41
-rw-r--r--meta-oe/recipes-extended/libcec/libcec_6.0.2.bb47
-rw-r--r--meta-oe/recipes-extended/libcec/libcec_git.bb37
6 files changed, 196 insertions, 37 deletions
diff --git a/meta-oe/recipes-extended/libcec/libcec/0001-CheckPlatformSupport.cmake-Do-not-hardcode-lib-path.patch b/meta-oe/recipes-extended/libcec/libcec/0001-CheckPlatformSupport.cmake-Do-not-hardcode-lib-path.patch
new file mode 100644
index 0000000000..3ecbfce250
--- /dev/null
+++ b/meta-oe/recipes-extended/libcec/libcec/0001-CheckPlatformSupport.cmake-Do-not-hardcode-lib-path.patch
@@ -0,0 +1,42 @@
+From 95d4df3b713925e2c4894a2e4d50b06df861d9ef Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 18 Dec 2019 23:37:40 -0800
+Subject: [PATCH] CheckPlatformSupport.cmake: Do not hardcode lib path
+
+Using CMAKE_INSTALL_LIBDIR ensures that we can build for multilib env
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/libcec/cmake/CheckPlatformSupport.cmake | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/src/libcec/cmake/CheckPlatformSupport.cmake b/src/libcec/cmake/CheckPlatformSupport.cmake
+index 2d7102f..55e78f8 100644
+--- a/src/libcec/cmake/CheckPlatformSupport.cmake
++++ b/src/libcec/cmake/CheckPlatformSupport.cmake
+@@ -224,16 +224,16 @@ else()
+
+ if (${PYTHON_MAJOR_VERSION} EQUAL 2)
+ install(TARGETS ${SWIG_MODULE_cec_REAL_NAME}
+- DESTINATION lib/python${PYTHON_VERSION}/${PYTHON_PKG_DIR}/${PYTHON_LIB_INSTALL_PATH}/cec)
++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/python${PYTHON_VERSION}/${PYTHON_PKG_DIR}/${PYTHON_LIB_INSTALL_PATH}/cec)
+ install(FILES ${CMAKE_BINARY_DIR}/src/libcec/cec.py
+- DESTINATION lib/python${PYTHON_VERSION}/${PYTHON_PKG_DIR})
++ DESTINATION l${CMAKE_INSTALL_LIBDIR}/python${PYTHON_VERSION}/${PYTHON_PKG_DIR})
+ install(FILES ${CMAKE_SOURCE_DIR}/src/libcec/cmake/__init__.py
+- DESTINATION lib/python${PYTHON_VERSION}/${PYTHON_PKG_DIR}/cec)
++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/python${PYTHON_VERSION}/${PYTHON_PKG_DIR}/cec)
+ else()
+ install(TARGETS ${SWIG_MODULE_cec_REAL_NAME}
+- DESTINATION lib/python${PYTHON_VERSION}/${PYTHON_PKG_DIR}/${PYTHON_LIB_INSTALL_PATH})
++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/python${PYTHON_VERSION}/${PYTHON_PKG_DIR}/${PYTHON_LIB_INSTALL_PATH})
+ install(FILES ${CMAKE_BINARY_DIR}/src/libcec/cec.py
+- DESTINATION lib/python${PYTHON_VERSION}/${PYTHON_PKG_DIR})
++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/python${PYTHON_VERSION}/${PYTHON_PKG_DIR})
+ endif()
+ endif()
+ endif()
+--
+2.24.1
+
diff --git a/meta-oe/recipes-extended/libcec/libcec/0001-Enhance-reproducibility.patch b/meta-oe/recipes-extended/libcec/libcec/0001-Enhance-reproducibility.patch
new file mode 100644
index 0000000000..f08887b884
--- /dev/null
+++ b/meta-oe/recipes-extended/libcec/libcec/0001-Enhance-reproducibility.patch
@@ -0,0 +1,33 @@
+From 240727d3142700af779ca6f5c4677419787bca28 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 28 Apr 2020 16:15:20 -0700
+Subject: [PATCH] Enhance reproducibility
+
+SetBuildInfo.cmake groks information from build system and emits that
+into sourcecode ( header file ) which is then compiled into binary, this
+string is build system dependent, therefore can cause reproducibility
+issues, here we set static string for LIB_INFO
+
+Upstream-Status: Inappropriate [OE-specific]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/libcec/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/libcec/CMakeLists.txt b/src/libcec/CMakeLists.txt
+index 19a070b..4b3c827 100644
+--- a/src/libcec/CMakeLists.txt
++++ b/src/libcec/CMakeLists.txt
+@@ -133,7 +133,7 @@ set(CEC_HEADERS devices/CECRecordingDevice.h
+ source_group("Header Files" FILES ${CEC_HEADERS})
+
+ # platform and device specific
+-include(cmake/SetBuildInfo.cmake)
++set(LIB_INFO "compiled on ${CMAKE_SYSTEM} ... ")
+ include(cmake/CheckPlatformSupport.cmake)
+
+ ## create project groups
+--
+2.26.2
+
diff --git a/meta-oe/recipes-extended/libcec/libcec/0001-Remove-buggy-test-confusing-host-and-target.patch b/meta-oe/recipes-extended/libcec/libcec/0001-Remove-buggy-test-confusing-host-and-target.patch
new file mode 100644
index 0000000000..07277f7064
--- /dev/null
+++ b/meta-oe/recipes-extended/libcec/libcec/0001-Remove-buggy-test-confusing-host-and-target.patch
@@ -0,0 +1,33 @@
+From 8ce50bf569ec2d931735180079bbe507730626c8 Mon Sep 17 00:00:00 2001
+From: Yann Dirson <yann@blade-group.com>
+Date: Mon, 7 Sep 2020 18:17:21 +0200
+Subject: [PATCH] Remove buggy test confusing host and target
+
+---
+Upstream-Status: Pending
+
+ src/libcec/cmake/CheckPlatformSupport.cmake | 8 --------
+ 1 file changed, 8 deletions(-)
+
+diff --git a/src/libcec/cmake/CheckPlatformSupport.cmake b/src/libcec/cmake/CheckPlatformSupport.cmake
+index 1d99bd8..31dac4f 100644
+--- a/src/libcec/cmake/CheckPlatformSupport.cmake
++++ b/src/libcec/cmake/CheckPlatformSupport.cmake
+@@ -266,14 +266,6 @@ else()
+ DESTINATION python/cec)
+ endif()
+ else()
+- if(EXISTS "/etc/os-release")
+- file(READ "/etc/os-release" OS_RELEASE)
+- string(REGEX MATCH "ID(_LIKE)?=debian" IS_DEBIAN ${OS_RELEASE})
+- if (IS_DEBIAN)
+- SET(PYTHON_PKG_DIR "dist-packages")
+- endif()
+- endif()
+-
+ if (NOT PYTHON_PKG_DIR)
+ SET(PYTHON_PKG_DIR "site-packages")
+ endif()
+--
+2.28.0
+
diff --git a/meta-oe/recipes-extended/libcec/libcec/0001-cecloader-Match-return-type-of-function-LibCecBootlo.patch b/meta-oe/recipes-extended/libcec/libcec/0001-cecloader-Match-return-type-of-function-LibCecBootlo.patch
new file mode 100644
index 0000000000..ab1ab5b8eb
--- /dev/null
+++ b/meta-oe/recipes-extended/libcec/libcec/0001-cecloader-Match-return-type-of-function-LibCecBootlo.patch
@@ -0,0 +1,41 @@
+From 2241edc8b70c2a54d109ac9c0e821889ac138d40 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 27 Jan 2022 22:49:52 -0800
+Subject: [PATCH] cecloader: Match return type of function LibCecBootloader
+
+Fixes
+include/cecloader.h:175:14: error: cannot initialize return object of type 'bool' with an rvalue of type 'nullptr_t'
+ return NULL;
+ ^~~~
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ include/cecloader.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/include/cecloader.h b/include/cecloader.h
+index be76468f..550f598e 100644
+--- a/include/cecloader.h
++++ b/include/cecloader.h
+@@ -172,7 +172,7 @@ bool LibCecBootloader(const char *strLib = NULL)
+ if (!g_libCEC)
+ {
+ std::cout << dlerror() << std::endl;
+- return NULL;
++ return false;
+ }
+ }
+
+@@ -181,7 +181,7 @@ bool LibCecBootloader(const char *strLib = NULL)
+ if (!LibCecBootloader)
+ {
+ std::cout << "cannot find CECStartBootloader" << std::endl;
+- return NULL;
++ return false;
+ }
+
+ bool bReturn = LibCecBootloader();
+--
+2.35.0
+
diff --git a/meta-oe/recipes-extended/libcec/libcec_6.0.2.bb b/meta-oe/recipes-extended/libcec/libcec_6.0.2.bb
new file mode 100644
index 0000000000..599416cb2a
--- /dev/null
+++ b/meta-oe/recipes-extended/libcec/libcec_6.0.2.bb
@@ -0,0 +1,47 @@
+SUMMARY = "USB CEC Adaptor communication Library"
+HOMEPAGE = "http://libcec.pulse-eight.com/"
+
+LICENSE = "GPL-2.0-or-later"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b3a719e97f49e4841e90573f9b1a98ac"
+
+DEPENDS = "p8platform udev ncurses swig-native python3"
+
+DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'libx11 libxrandr', '', d)}"
+DEPENDS:append:rpi = "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '', ' userland', d)}"
+
+SRCREV = "29d82c80bcc62be2878a9ac080de7eb286c4beb9"
+SRC_URI = "git://github.com/Pulse-Eight/libcec.git;branch=release;protocol=https \
+ file://0001-CheckPlatformSupport.cmake-Do-not-hardcode-lib-path.patch \
+ file://0001-Enhance-reproducibility.patch \
+ file://0001-Remove-buggy-test-confusing-host-and-target.patch \
+ file://0001-cecloader-Match-return-type-of-function-LibCecBootlo.patch \
+ "
+
+S = "${WORKDIR}/git"
+
+inherit cmake pkgconfig
+
+# default config is for RaspberryPi API, use the Linux 4.10+ API by default
+PLATFORM_CMAKE_FLAGS ?= "-DHAVE_LINUX_API=1 -DHAVE_RPI_API=0"
+EXTRA_OECMAKE += "${PLATFORM_CMAKE_FLAGS}"
+
+# Put client examples into separate packages
+PACKAGE_BEFORE_PN += "${PN}-examples-python ${PN}-examples"
+FILES:${PN}-examples-python = "${bindir}/py*"
+FILES:${PN}-examples = "${bindir}"
+# cec-client doesn't link with libcec, but uses LibCecInitialise to dlopen libcec, so do_package
+# cannot add the runtime dependency automatically
+RDEPENDS:${PN}-examples = "${PN}"
+RDEPENDS:${PN}-examples-python = "python3-${BPN} python3-core"
+
+# Create the wrapper for python3
+PACKAGES += "python3-${BPN}"
+FILES:python3-${BPN} = "${libdir}/python3* ${bindir}/py*"
+RDEPENDS:${PN} = "python3-core"
+
+# cec-client and xbmc need the .so present to work :(
+FILES:${PN} += "${libdir}/*.so"
+INSANE_SKIP:${PN} = "dev-so"
+
+# Adapter shows up as a CDC-ACM device
+RRECOMMENDS:${PN} = "kernel-module-cdc-acm"
diff --git a/meta-oe/recipes-extended/libcec/libcec_git.bb b/meta-oe/recipes-extended/libcec/libcec_git.bb
deleted file mode 100644
index 26664255d2..0000000000
--- a/meta-oe/recipes-extended/libcec/libcec_git.bb
+++ /dev/null
@@ -1,37 +0,0 @@
-SUMMARY = "USB CEC Adaptor communication Library"
-HOMEPAGE = "http://libcec.pulse-eight.com/"
-
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=e61fd86f9c947b430126181da2c6c715"
-
-DEPENDS = "p8platform udev ncurses swig-native python3"
-
-DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'libx11 libxrandr', '', d)}"
-DEPENDS_append_rpi = "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '', ' userland', d)}"
-
-PV = "4.0.4"
-
-SRCREV = "3bbd4321618503d14008387a72fabb6743878831"
-SRC_URI = "git://github.com/Pulse-Eight/libcec.git \
-"
-
-S = "${WORKDIR}/git"
-
-inherit cmake pkgconfig
-
-# Put client tools into a separate package
-PACKAGE_BEFORE_PN += "${PN}-tools"
-FILES_${PN}-tools = "${bindir}"
-RDEPENDS_${PN}-tools = "python3-${BPN}"
-
-# Create the wrapper for python3
-PACKAGES += "python3-${BPN}"
-FILES_python3-${BPN} = "${libdir}/python3* ${bindir}/py*"
-RDEPENDS_${PN} = "python3-core"
-
-# cec-client and xbmc need the .so present to work :(
-FILES_${PN} += "${libdir}/*.so"
-INSANE_SKIP_${PN} = "dev-so"
-
-# Adapter shows up as a CDC-ACM device
-RRECOMMENDS_${PN} = "kernel-module-cdc-acm"