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 }