diff --git a/recipes-graphics/libegt/libegt/0001-check-for-reallocarray-before-using-it.patch b/recipes-graphics/libegt/libegt/0001-check-for-reallocarray-before-using-it.patch new file mode 100644 index 00000000..43884470 --- /dev/null +++ b/recipes-graphics/libegt/libegt/0001-check-for-reallocarray-before-using-it.patch @@ -0,0 +1,54 @@ +From 6f0aafeccb99b6c92a48ee1c775afdc0f16a1ce6 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 13 Dec 2019 08:46:39 -0800 +Subject: [PATCH] check for reallocarray before using it + +in kplot there is a runtime check for reallocarray which actually wont +work in cross compile mode, luckily it does check for HAVE_REALLOCARRAY +before usng the results of runtime check. So here add a configure time +check for presense of reallocarray + +Fixes + +TOPDIR/build/tmp/work/core2-32-yoe-linux/libegt/0.8-r0/recipe-sysroot/usr/include/stdlib.h:559:14: error: exception specification in declaration does not match previous declaration +extern void *reallocarray (void *__ptr, size_t __nmemb, size_t __size) + ^ +../external/kplot/compat.h:24:7: note: previous declaration is here +void *reallocarray(void *optr, size_t nmemb, size_t size); + ^ + +Upstream-Status: Submitted [https://github.com/linux4sam/egt/pull/2] +Signed-off-by: Khem Raj +--- + configure.ac | 2 +- + src/chart.cpp | 1 + + 2 files changed, 2 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 81410c78..65873d8b 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -210,7 +210,7 @@ AC_TYPE_UINT8_T + + # Checks for library functions. + AC_FUNC_MMAP +-AC_CHECK_FUNCS([floor memmove memset munmap select setlocale sqrt strerror]) ++AC_CHECK_FUNCS([floor memmove memset munmap reallocarray select setlocale sqrt strerror]) + + AX_PTHREAD([LIBS="$PTHREAD_LIBS $LIBS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS"], AC_MSG_ERROR(Can not find pthreads. This is required.)) +diff --git a/src/chart.cpp b/src/chart.cpp +index 7578ea29..0faf65e8 100644 +--- a/src/chart.cpp ++++ b/src/chart.cpp +@@ -3,6 +3,7 @@ + * + * SPDX-License-Identifier: Apache-2.0 + */ ++#include "config.h" + #include "compat.h" + #include "egt/chart.h" + #include "egt/detail/meta.h" +-- +2.24.1 + diff --git a/recipes-graphics/libegt/libegt_0.8.bb b/recipes-graphics/libegt/libegt_0.8.bb index 76c5d5ac..2ae07862 100644 --- a/recipes-graphics/libegt/libegt_0.8.bb +++ b/recipes-graphics/libegt/libegt_0.8.bb @@ -29,6 +29,7 @@ DEPENDS_append_at91sam9 = " tslib" SRC_URI = "gitsm://github.com/linux4sam/egt.git;protocol=https \ file://0001-link-libudev-for-udev_unref-and-udev_new.patch \ + file://0001-check-for-reallocarray-before-using-it.patch \ " SRCREV = "be50eef497a0900cf90b60a2da4aad30ba0e3663" diff --git a/recipes-graphics/libplanes/libplanes/0001-Use-python3-by-default.patch b/recipes-graphics/libplanes/libplanes/0001-Use-python3-by-default.patch new file mode 100644 index 00000000..aa9df736 --- /dev/null +++ b/recipes-graphics/libplanes/libplanes/0001-Use-python3-by-default.patch @@ -0,0 +1,54 @@ +From ba4cc0d7b08efecd2b2bfb04c7a70187d7056304 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Tue, 26 Nov 2019 11:18:39 -0800 +Subject: [PATCH] Use python3 by default + +python2 is on its way out + +Upstream-Status: Submitted [https://github.com/linux4sam/libplanes/pull/3] +Signed-off-by: Khem Raj +--- + configure.ac | 2 +- + python/Makefile.am | 2 +- + scripts/planes-loop.py | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 69e9478..ba0d2e7 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -129,7 +129,7 @@ if test "x$PYTHON" = xyes; then + + if test "x$have_python" = "xyes"; then + AC_MSG_CHECKING([for Python site-packages path]) +- PYTHON_VERSION='2.7' ++ PYTHON_VERSION=`$PKG_CONFIG --modversion python3` + PYTHON_SITE_PKG=${prefix}/lib/python${PYTHON_VERSION}/site-packages + AC_MSG_RESULT([$PYTHON_SITE_PKG]) + AC_SUBST([PYTHON_SITE_PKG]) +diff --git a/python/Makefile.am b/python/Makefile.am +index 63c737f..015fc26 100644 +--- a/python/Makefile.am ++++ b/python/Makefile.am +@@ -4,7 +4,7 @@ if HAVE_PYTHON + SWIG_SRC = planes.i + + SWIG=swig +-PYTHON=python ++PYTHON=python3 + + SWIG_V_GEN = $(swig_v_GEN_$(V)) + swig_v_GEN_ = $(swig_v_GEN_$(AM_DEFAULT_VERBOSITY)) +diff --git a/scripts/planes-loop.py b/scripts/planes-loop.py +index ded88d4..4c6904e 100755 +--- a/scripts/planes-loop.py ++++ b/scripts/planes-loop.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + + from mpio import * + import glob +-- +2.24.0 + diff --git a/recipes-graphics/libplanes/libplanes_0.0.3.bb b/recipes-graphics/libplanes/libplanes_0.0.3.bb index f135613d..59d2b4f7 100644 --- a/recipes-graphics/libplanes/libplanes_0.0.3.bb +++ b/recipes-graphics/libplanes/libplanes_0.0.3.bb @@ -6,18 +6,20 @@ PACKAGES = "${PN}-dbg ${PN} ${PN}-python" PR = "r1" -DEPENDS = "libdrm cairo cjson lua swig-native python" +DEPENDS = "libdrm cairo cjson lua swig-native python3" -RDEPENDS_${PN} = "python udev-rules-at91" +RDEPENDS_${PN} = "python3 udev-rules-at91" -SRC_URI = "git://github.com/linux4sam/libplanes.git;protocol=https" +SRC_URI = "git://github.com/linux4sam/libplanes.git;protocol=https \ + file://0001-Use-python3-by-default.patch \ +" PV = "0.0.3+git${SRCPV}" SRCREV = "96a3e46c175a5dd02d3cb04a9ef9f5f201a684a6" S = "${WORKDIR}/git" -inherit pkgconfig autotools +inherit pkgconfig autotools python3-dir EXTRA_OECONF += "--enable-shared --disable-static" @@ -46,7 +48,7 @@ do_install_append() { install -Dm 0755 ${S}/scripts/planes-loop.sh ${D}/opt/planes/planes-loop.sh install -Dm 0755 ${S}/scripts/planes-loop.py ${D}/opt/planes/planes-loop.py install -Dm 0755 ${S}/python/examples/splash.py ${D}/usr/share/planes/splash.py - rm -f ${D}/usr/lib/python2.7/site-packages/planes/_planes.a + rm -f ${D}/usr/lib/python*/site-packages/planes/_planes.a rm -f ${D}/usr/lib/libplanes.a } diff --git a/recipes-graphics/libplanes/libplanes_1.0.0.bb b/recipes-graphics/libplanes/libplanes_1.0.0.bb index 687ceee4..0d53a614 100644 --- a/recipes-graphics/libplanes/libplanes_1.0.0.bb +++ b/recipes-graphics/libplanes/libplanes_1.0.0.bb @@ -4,17 +4,19 @@ LIC_FILES_CHKSUM = "file://COPYING;endline=20;md5=b884a464579c410fd1dace93db8e97 PACKAGES = "${PN}-dbg ${PN} ${PN}-python" -DEPENDS = "libdrm cairo cjson lua swig-native python" +DEPENDS = "libdrm cairo cjson lua swig-native python3" -RDEPENDS_${PN} = "python udev-rules-at91" +RDEPENDS_${PN} = "python3 udev-rules-at91" -SRC_URI = "git://github.com/linux4sam/libplanes.git;protocol=https" +SRC_URI = "git://github.com/linux4sam/libplanes.git;protocol=https \ + file://0001-Use-python3-by-default.patch \ + " SRCREV = "632fb3bf52838f9bd0531fc2040b3b2ec448f70f" S = "${WORKDIR}/git" -inherit pkgconfig autotools +inherit pkgconfig autotools python3-dir EXTRA_OECONF += "--enable-shared --disable-static" @@ -43,6 +45,6 @@ do_install_append() { install -Dm 0755 ${S}/scripts/planes-loop.sh ${D}/opt/planes/planes-loop.sh install -Dm 0755 ${S}/scripts/planes-loop.py ${D}/opt/planes/planes-loop.py install -Dm 0755 ${S}/python/examples/splash.py ${D}/usr/share/planes/splash.py - rm -f ${D}/usr/lib/python2.7/site-packages/planes/_planes.a + rm -f ${D}/usr/lib/python*/site-packages/planes/_planes.a rm -f ${D}/usr/lib/libplanes.a } diff --git a/recipes-utils/9bit/9bit/0001-include-asm-generic-ioctls.h.patch b/recipes-utils/9bit/9bit/0001-include-asm-generic-ioctls.h.patch new file mode 100644 index 00000000..521f1e5b --- /dev/null +++ b/recipes-utils/9bit/9bit/0001-include-asm-generic-ioctls.h.patch @@ -0,0 +1,33 @@ +From f35a891637ced372fa6f8b2e74c2bc4327ac3761 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Wed, 18 Dec 2019 18:24:03 -0800 +Subject: [PATCH] include asm-generic/ioctls.h + +This helps in including definitions for TCGETS2 TCSETSW2 and TCSETSF2 + +Fixes + +custom_termios2.c:14:19: error: use of undeclared identifier 'TCGETS2' return ioctl(fd, TCGETS2, termios); ^ custom_termios2.c:24:9: error: use of undeclared identifier 'TCSETS2' cmd = TCSETS2; ^ custom_termios2.c:27:9: error: use of undeclared identifier 'TCSETSW2' cmd = TCSETSW2; ^ custom_termios2.c:30:9: error: use of undeclared identifier 'TCSETSF2' cmd = TCSETSF2; + ^ +Upstream-Status: Submitted [https://github.com/linux4sam/9bit/pull/1] + +Signed-off-by: Khem Raj +--- + custom_termios2.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/custom_termios2.c b/custom_termios2.c +index 3eb3049..ba0171a 100644 +--- a/custom_termios2.c ++++ b/custom_termios2.c +@@ -5,6 +5,7 @@ + */ + #include "custom_termios2.h" + #include ++#include + #include + #include + +-- +2.24.1 + diff --git a/recipes-utils/9bit/9bit_git.bb b/recipes-utils/9bit/9bit_git.bb index ce46e9b0..5b7701a3 100644 --- a/recipes-utils/9bit/9bit_git.bb +++ b/recipes-utils/9bit/9bit_git.bb @@ -2,10 +2,12 @@ DESCRIPTION = "Demo apps for SAMA5 9-bit / Multidrop Serial Mode" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://COPYING;md5=fbe63b61f5a0d24e651c8be602a7c3f8" -SRC_URI = "git://github.com/linux4sam/9bit.git;protocol=https" +SRC_URI = "git://github.com/linux4sam/9bit.git;protocol=https \ + file://0001-include-asm-generic-ioctls.h.patch \ + " PV = "1.0+git${SRCPV}" -SRCREV = "df45b743003a78bb735eb3c2cb294f3cce3ae43a" +SRCREV = "f4cd916c8c58300ea1cbb398f0b40fe43a70d6d6" S = "${WORKDIR}/git" @@ -15,8 +17,8 @@ do_compile () { do_install () { install -d ${D}${bindir} - install senda_example ${D}${bindir} - install p9bit_example ${D}${bindir} - install user_example ${D}${bindir} + install -m 0755 senda_example ${D}${bindir} + install -m 0755 p9bit_example ${D}${bindir} + install -m 0755 user_example ${D}${bindir} }