diff options
-rw-r--r-- | meta-oe/recipes-support/itstool/itstool/0001-Don-t-use-build-time-hardcoded-python-binary-path.patch | 29 | ||||
-rw-r--r-- | meta-oe/recipes-support/itstool/itstool_2.0.5.bb | 8 |
2 files changed, 31 insertions, 6 deletions
diff --git a/meta-oe/recipes-support/itstool/itstool/0001-Don-t-use-build-time-hardcoded-python-binary-path.patch b/meta-oe/recipes-support/itstool/itstool/0001-Don-t-use-build-time-hardcoded-python-binary-path.patch new file mode 100644 index 000000000..b91105330 --- /dev/null +++ b/meta-oe/recipes-support/itstool/itstool/0001-Don-t-use-build-time-hardcoded-python-binary-path.patch | |||
@@ -0,0 +1,29 @@ | |||
1 | From cd9b56224895576125e91cca317ace8a80f3eb77 Mon Sep 17 00:00:00 2001 | ||
2 | From: Piotr Tworek <tworaz@tworaz.net> | ||
3 | Date: Sat, 27 Jul 2019 10:19:11 +0200 | ||
4 | Subject: [PATCH] Don't use build time hardcoded python binary path. | ||
5 | |||
6 | This path obviously won't work on target since they refer to build | ||
7 | machine directory structure. Native builds will also fail if local.conf | ||
8 | has INHERIT+=rm_work. Instread of hardcoding path to python binary use | ||
9 | whatever is found in PATH first. This should also allow the tool to use | ||
10 | python3 binary provided in recipe-sysroot-native. | ||
11 | |||
12 | Upstream-Status: Inappropriate [OE specific] | ||
13 | --- | ||
14 | itstool.in | 2 +- | ||
15 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
16 | |||
17 | diff --git a/itstool.in b/itstool.in | ||
18 | index b3c0033..7df2476 100755 | ||
19 | --- a/itstool.in | ||
20 | +++ b/itstool.in | ||
21 | @@ -1,4 +1,4 @@ | ||
22 | -#!@PYTHON@ -s | ||
23 | +#!/usr/bin/env -S python3 -s | ||
24 | # | ||
25 | # Copyright (c) 2010-2018 Shaun McCance <shaunm@gnome.org> | ||
26 | # | ||
27 | -- | ||
28 | 2.21.0 | ||
29 | |||
diff --git a/meta-oe/recipes-support/itstool/itstool_2.0.5.bb b/meta-oe/recipes-support/itstool/itstool_2.0.5.bb index a0af44a71..2e7e8f194 100644 --- a/meta-oe/recipes-support/itstool/itstool_2.0.5.bb +++ b/meta-oe/recipes-support/itstool/itstool_2.0.5.bb | |||
@@ -7,15 +7,11 @@ inherit autotools python3native | |||
7 | 7 | ||
8 | DEPENDS = "libxml2-native" | 8 | DEPENDS = "libxml2-native" |
9 | 9 | ||
10 | SRC_URI = "http://files.itstool.org/${BPN}/${BPN}-${PV}.tar.bz2" | 10 | SRC_URI = "http://files.itstool.org/${BPN}/${BPN}-${PV}.tar.bz2 \ |
11 | file://0001-Don-t-use-build-time-hardcoded-python-binary-path.patch" | ||
11 | SRC_URI[md5sum] = "655c6f78fc64faee45adcc45ccc5a57e" | 12 | SRC_URI[md5sum] = "655c6f78fc64faee45adcc45ccc5a57e" |
12 | SRC_URI[sha256sum] = "100506f8df62cca6225ec3e631a8237e9c04650c77495af4919ac6a100d4b308" | 13 | SRC_URI[sha256sum] = "100506f8df62cca6225ec3e631a8237e9c04650c77495af4919ac6a100d4b308" |
13 | 14 | ||
14 | do_install_append() { | ||
15 | # fix shebang of main script | ||
16 | sed -i 's:^#!${WORKDIR}.*${PYTHON_PN} -s:#!${bindir_native}/${PYTHON_PN} -s:' ${D}${bindir}/itstool | ||
17 | } | ||
18 | |||
19 | BBCLASSEXTEND = "native" | 15 | BBCLASSEXTEND = "native" |
20 | 16 | ||
21 | RDEPENDS_${PN} += "libxml2-python" | 17 | RDEPENDS_${PN} += "libxml2-python" |