diff options
author | Alexander Kanavin <alexander.kanavin@linux.intel.com> | 2016-06-02 12:25:53 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-06-03 13:13:27 +0100 |
commit | ada03c326bf94b211e6cbf1ad8621c2c070ff962 (patch) | |
tree | 734dd6c5b066a31265d57958363cb75741bb603c /meta/recipes-devtools/bootchart2/bootchart2_0.14.8.bb | |
parent | 4672ffabc6bc1ef101e015e715e7ebb0d7e58c0f (diff) | |
download | poky-ada03c326bf94b211e6cbf1ad8621c2c070ff962.tar.gz |
bootchart2: move to Python 3
(From OE-Core rev: c4829e96272376c61d8645df75c4b946f37b461c)
Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/bootchart2/bootchart2_0.14.8.bb')
-rw-r--r-- | meta/recipes-devtools/bootchart2/bootchart2_0.14.8.bb | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/meta/recipes-devtools/bootchart2/bootchart2_0.14.8.bb b/meta/recipes-devtools/bootchart2/bootchart2_0.14.8.bb index 86c614a63b..d0555c3edb 100644 --- a/meta/recipes-devtools/bootchart2/bootchart2_0.14.8.bb +++ b/meta/recipes-devtools/bootchart2/bootchart2_0.14.8.bb | |||
@@ -99,7 +99,7 @@ SRCREV = "48e0071048564c6af75ab969e842d6dec808da09" | |||
99 | 99 | ||
100 | inherit systemd | 100 | inherit systemd |
101 | inherit update-rc.d | 101 | inherit update-rc.d |
102 | inherit pythonnative | 102 | inherit python3native |
103 | 103 | ||
104 | # The only reason to build bootchart2-native is for a native pybootchartgui. | 104 | # The only reason to build bootchart2-native is for a native pybootchartgui. |
105 | BBCLASSEXTEND = "native" | 105 | BBCLASSEXTEND = "native" |
@@ -110,13 +110,6 @@ UPDATERCPN = "bootchartd-stop-initscript" | |||
110 | INITSCRIPT_NAME = "bootchartd_stop.sh" | 110 | INITSCRIPT_NAME = "bootchartd_stop.sh" |
111 | INITSCRIPT_PARAMS = "start 99 2 3 4 5 ." | 111 | INITSCRIPT_PARAMS = "start 99 2 3 4 5 ." |
112 | 112 | ||
113 | # We want native pybootchartgui to execute with the correct Python interpeter. | ||
114 | do_compile_append_class-native () { | ||
115 | echo "#! ${PYTHON}" | cat - ${S}/pybootchartgui.py > ${WORKDIR}/temp_pybootchartgui | ||
116 | mv ${WORKDIR}/temp_pybootchartgui ${S}/pybootchartgui.py | ||
117 | chmod +x ${S}/pybootchartgui | ||
118 | } | ||
119 | |||
120 | do_compile_prepend () { | 113 | do_compile_prepend () { |
121 | export PY_LIBDIR="${libdir}/${PYTHON_DIR}" | 114 | export PY_LIBDIR="${libdir}/${PYTHON_DIR}" |
122 | export BINDIR="${bindir}" | 115 | export BINDIR="${bindir}" |
@@ -135,14 +128,17 @@ do_install () { | |||
135 | install -m 0755 ${WORKDIR}/bootchartd_stop.sh ${D}${sysconfdir}/init.d | 128 | install -m 0755 ${WORKDIR}/bootchartd_stop.sh ${D}${sysconfdir}/init.d |
136 | 129 | ||
137 | echo 'EXIT_PROC="$EXIT_PROC matchbox-window-manager"' >> ${D}${sysconfdir}/bootchartd.conf | 130 | echo 'EXIT_PROC="$EXIT_PROC matchbox-window-manager"' >> ${D}${sysconfdir}/bootchartd.conf |
131 | |||
132 | # Use python 3 instead of python 2 | ||
133 | sed -i -e '1s,#!.*python.*,#!${bindir}/python3,' ${D}${bindir}/pybootchartgui | ||
138 | } | 134 | } |
139 | 135 | ||
140 | PACKAGES =+ "pybootchartgui" | 136 | PACKAGES =+ "pybootchartgui" |
141 | FILES_pybootchartgui += "${libdir}/python*/site-packages/pybootchartgui ${bindir}/pybootchartgui" | 137 | FILES_pybootchartgui += "${libdir}/python*/site-packages/pybootchartgui ${bindir}/pybootchartgui" |
142 | RDEPENDS_pybootchartgui = "python-pycairo python-compression python-image python-textutils python-shell python-compression python-codecs" | 138 | RDEPENDS_pybootchartgui = "python3-pycairo python3-compression python3-image python3-textutils python3-shell python3-compression python3-codecs" |
143 | RDEPENDS_${PN}_class-target += "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'sysvinit-pidof', 'procps', d)}" | 139 | RDEPENDS_${PN}_class-target += "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'sysvinit-pidof', 'procps', d)}" |
144 | RDEPENDS_${PN}_class-target += "lsb" | 140 | RDEPENDS_${PN}_class-target += "lsb" |
145 | DEPENDS_append_class-native = " python-pycairo-native" | 141 | DEPENDS_append_class-native = " python3-pycairo-native" |
146 | 142 | ||
147 | PACKAGES =+ "bootchartd-stop-initscript" | 143 | PACKAGES =+ "bootchartd-stop-initscript" |
148 | FILES_bootchartd-stop-initscript += "${sysconfdir}/init.d ${sysconfdir}/rc*.d" | 144 | FILES_bootchartd-stop-initscript += "${sysconfdir}/init.d ${sysconfdir}/rc*.d" |