summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/bootchart2/bootchart2_0.14.8.bb
diff options
context:
space:
mode:
authorAlexander Kanavin <alexander.kanavin@linux.intel.com>2016-06-02 12:25:53 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-06-03 13:13:27 +0100
commitada03c326bf94b211e6cbf1ad8621c2c070ff962 (patch)
tree734dd6c5b066a31265d57958363cb75741bb603c /meta/recipes-devtools/bootchart2/bootchart2_0.14.8.bb
parent4672ffabc6bc1ef101e015e715e7ebb0d7e58c0f (diff)
downloadpoky-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.bb16
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
100inherit systemd 100inherit systemd
101inherit update-rc.d 101inherit update-rc.d
102inherit pythonnative 102inherit 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.
105BBCLASSEXTEND = "native" 105BBCLASSEXTEND = "native"
@@ -110,13 +110,6 @@ UPDATERCPN = "bootchartd-stop-initscript"
110INITSCRIPT_NAME = "bootchartd_stop.sh" 110INITSCRIPT_NAME = "bootchartd_stop.sh"
111INITSCRIPT_PARAMS = "start 99 2 3 4 5 ." 111INITSCRIPT_PARAMS = "start 99 2 3 4 5 ."
112 112
113# We want native pybootchartgui to execute with the correct Python interpeter.
114do_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
120do_compile_prepend () { 113do_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
140PACKAGES =+ "pybootchartgui" 136PACKAGES =+ "pybootchartgui"
141FILES_pybootchartgui += "${libdir}/python*/site-packages/pybootchartgui ${bindir}/pybootchartgui" 137FILES_pybootchartgui += "${libdir}/python*/site-packages/pybootchartgui ${bindir}/pybootchartgui"
142RDEPENDS_pybootchartgui = "python-pycairo python-compression python-image python-textutils python-shell python-compression python-codecs" 138RDEPENDS_pybootchartgui = "python3-pycairo python3-compression python3-image python3-textutils python3-shell python3-compression python3-codecs"
143RDEPENDS_${PN}_class-target += "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'sysvinit-pidof', 'procps', d)}" 139RDEPENDS_${PN}_class-target += "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'sysvinit-pidof', 'procps', d)}"
144RDEPENDS_${PN}_class-target += "lsb" 140RDEPENDS_${PN}_class-target += "lsb"
145DEPENDS_append_class-native = " python-pycairo-native" 141DEPENDS_append_class-native = " python3-pycairo-native"
146 142
147PACKAGES =+ "bootchartd-stop-initscript" 143PACKAGES =+ "bootchartd-stop-initscript"
148FILES_bootchartd-stop-initscript += "${sysconfdir}/init.d ${sysconfdir}/rc*.d" 144FILES_bootchartd-stop-initscript += "${sysconfdir}/init.d ${sysconfdir}/rc*.d"