libcec: workaround wrong choice of PYTHON_PKG_DIR when building on Debian
PATCH 1/4 libcec: workaround wrong choice of PYTHON_PKG_DIR when building on Debian
From: Yann Dirson <[email protected]>
As described in https://github.com/Pulse-Eight/libcec/issues/530 the cmake code looks at the host to make decisions about the target, and we can't even override this with a flag.
--- ...buggy-test-confusing-host-and-target.patch | 31 +++++++++++++++++++ .../recipes-extended/libcec/libcec_6.0.2.bb | 1 + 2 files changed, 32 insertions(+) create mode 100644 meta-oe/recipes-extended/libcec/libcec/0001-Remove-buggy-test-confusing-host-and-target.patch
meta-oe/recipes-extended/libcec/libcec/0001-Remove-buggy-test-confusing-host-and-target.patch new file +31 -0
@@ -0,0 +1,31 @@ +From 8ce50bf569ec2d931735180079bbe507730626c8 Mon Sep 17 00:00:00 2001 +From: Yann Dirson <[email protected]> +Date: Mon, 7 Sep 2020 18:17:21 +0200 +Subject: [PATCH] Remove buggy test confusing host and target + +--- + 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 +
meta-oe/recipes-extended/libcec/libcec_6.0.2.bb +1 -0
@@ -13,6 +13,7 @@ SRCREV = "29d82c80bcc62be2878a9ac080de7eb286c4beb9" SRC_URI = "git://github.com/Pulse-Eight/libcec.git;branch=release \ 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 \ " S = "${WORKDIR}/git"
Signature · 1 line
2.28.0
PATCH 1/1 New terminal emulator: st 0.8.4
From: Yann Dirson <[email protected]>
Can be used as a replacement for matchbox-terminal, with much less dependencies (does not need gtk and vte), and supports "-e" flag.
--- meta-oe/recipes-graphics/suckless/st_0.8.4.bb | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 meta-oe/recipes-graphics/suckless/st_0.8.4.bb
meta-oe/recipes-graphics/suckless/st_0.8.4.bb new file +28 -0
@@ -0,0 +1,28 @@ +SECTION = "shadow" +LICENSE = "MIT-X" +LIC_FILES_CHKSUM = "file://LICENSE;md5=04c3ca13a702147c62db90f556c5b3ca" +SRC_URI = " \ + http://dl.suckless.org/${BPN}/${BPN}-${PV}.tar.gz \ +" + +inherit pkgconfig + +SRC_URI[sha256sum] = "d42d3ceceb4d6a65e32e90a5336e3d446db612c3fbd9ebc1780bc6c9a03346a6" + +DEPENDS += "libx11 libxft fontconfig" + +RDEPENDS_${PN} += "libx11-locale" + +do_compile() { + make INCS='-I. `pkg-config --cflags x11 fontconfig xft`' LIBS='-lm -lutil `pkg-config --libs x11 fontconfig xft`' +} + +# don't use "make install" which builds terminfo, already in +# ncurses-terminfo (and requires ncurses-native for "tic") + +do_install() { + mkdir -p ${D}${bindir} + install -m755 ${B}/st ${D}${bindir}/ +} + +RRECOMMENDS_${PN} += "ncurses-terminfo"
Signature · 1 line
2.28.0
PATCH 2/4 libcec: build with Linux CEC API
In reply to Yann DirsonFrom: Yann Dirson <[email protected]>
The Linux CEC API is available in linux-kernel-headers 4.10 and newer, and supported since libcec 5.0.0, though they still default to the legacy Raspberry Pi API.
--- meta-oe/recipes-extended/libcec/libcec_6.0.2.bb | 4 ++++ 1 file changed, 4 insertions(+)
meta-oe/recipes-extended/libcec/libcec_6.0.2.bb +4 -0
@@ -20,6 +20,10 @@ 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 tools into a separate package PACKAGE_BEFORE_PN += "${PN}-tools" FILES_${PN}-tools = "${bindir}"
Signature · 1 line
2.28.0
PATCH 3/4 libcec: rename libcec-tools to libcec-examples
In reply to Yann DirsonFrom: Yann Dirson <[email protected]>
Those are really not general-usage tools, just examples of the API usage. Let's use a more explicit package name.
--- meta-oe/recipes-extended/libcec/libcec_6.0.2.bb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
meta-oe/recipes-extended/libcec/libcec_6.0.2.bb +4 -4
@@ -24,10 +24,10 @@ inherit cmake pkgconfig PLATFORM_CMAKE_FLAGS ?= "-DHAVE_LINUX_API=1 -DHAVE_RPI_API=0" EXTRA_OECMAKE += "${PLATFORM_CMAKE_FLAGS}" -# Put client tools into a separate package -PACKAGE_BEFORE_PN += "${PN}-tools" -FILES_${PN}-tools = "${bindir}" -RDEPENDS_${PN}-tools = "python3-${BPN} python3-core" +# Put client examples into a separate package +PACKAGE_BEFORE_PN += "${PN}-examples" +FILES_${PN}-examples = "${bindir}" +RDEPENDS_${PN}-examples = "python3-${BPN} python3-core" # Create the wrapper for python3 PACKAGES += "python3-${BPN}"
Signature · 1 line
2.28.0
PATCH 4/4 libcec: split the python example into a separate package
In reply to Yann DirsonFrom: Yann Dirson <[email protected]>
It does not provide more functionality than the C-based examples, so is of little value on a target except for checking the python module is working.
--- meta-oe/recipes-extended/libcec/libcec_6.0.2.bb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
meta-oe/recipes-extended/libcec/libcec_6.0.2.bb +4 -3
@@ -24,10 +24,11 @@ inherit cmake pkgconfig PLATFORM_CMAKE_FLAGS ?= "-DHAVE_LINUX_API=1 -DHAVE_RPI_API=0" EXTRA_OECMAKE += "${PLATFORM_CMAKE_FLAGS}" -# Put client examples into a separate package -PACKAGE_BEFORE_PN += "${PN}-examples" +# Put client examples into separate packages +PACKAGE_BEFORE_PN += "${PN}-examples-python ${PN}-examples" +FILES_${PN}-examples-python = "${bindir}/py*" FILES_${PN}-examples = "${bindir}" -RDEPENDS_${PN}-examples = "python3-${BPN} python3-core" +RDEPENDS_${PN}-examples-python = "python3-${BPN} python3-core" # Create the wrapper for python3 PACKAGES += "python3-${BPN}"
Signature · 1 line
2.28.0
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: [oe] [meta-oe][patch] New terminal emulator: st 0.8.4
Sorry this patch should not be in this series, resending
Quoted 53 lines · Yann Dirson via lists.openembedded.org
From: Yann Dirson <[email protected]>
Can be used as a replacement for matchbox-terminal, with much less dependencies (does not need gtk and vte), and supports "-e" flag.
Signed-off-by Yann Dirson <[email protected]>--- meta-oe/recipes-graphics/suckless/st_0.8.4.bb | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 meta-oe/recipes-graphics/suckless/st_0.8.4.bbmeta-oe/recipes-graphics/suckless/st_0.8.4.bb new file +10
-0@@ -0,0 +1,28 @@ +SECTION = "shadow" +LICENSE = "MIT-X" +LIC_FILES_CHKSUM = "file://LICENSE;md5=04c3ca13a702147c62db90f556c5b3ca" +SRC_URI = " \ + http://dl.suckless.org/${BPN}/${BPN}-${PV}.tar.gz \ +" + +inherit pkgconfig + +SRC_URI[sha256sum] ="
d42d3ceceb4d6a65e32e90a5336e3d446db612c3fbd9ebc1780bc6c9a03346a6"meta-oe/recipes-graphics/suckless/st_0.8.4.bb new file +18
-2+ +DEPENDS += "libx11 libxft fontconfig" + +RDEPENDS_${PN} += "libx11-locale" + +do_compile() { + make INCS='-I. `pkg-config --cflags x11 fontconfig xft`' LIBS='-lm -lutil `pkg-config --libs x11 fontconfig xft`' +} + +# don't use "make install" which builds terminfo, already in +# ncurses-terminfo (and requires ncurses-native for "tic") + +do_install() { + mkdir -p ${D}${bindir} + install -m755 ${B}/st ${D}${bindir}/ +} + +RRECOMMENDS_${PN} += "ncurses-terminfo" --2.28.0
Signature · 2 lines
Yann Dirson <[email protected]> Blade / Shadow -- http://shadow.tech