diff options
Diffstat (limited to 'meta/recipes-support/itstool')
3 files changed, 91 insertions, 0 deletions
diff --git a/meta/recipes-support/itstool/itstool/0001-Native-Don-t-use-build-time-hardcoded-python-binary-.patch b/meta/recipes-support/itstool/itstool/0001-Native-Don-t-use-build-time-hardcoded-python-binary-.patch new file mode 100644 index 0000000000..fdcbe46fed --- /dev/null +++ b/meta/recipes-support/itstool/itstool/0001-Native-Don-t-use-build-time-hardcoded-python-binary-.patch @@ -0,0 +1,33 @@ +From c47820450ce7f55d22c672cf94d20a5f9fd208bf Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com> +Date: Sun, 27 Oct 2019 16:38:52 +0100 +Subject: [PATCH] Native: Don't use build time hardcoded python binary path. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This is same patch as used for target build except that we do not use the +'-S' and '-s' option because '-S' is relatively young [1] and elder build-host +don't support it [2] + +[1] https://github.com/coreutils/coreutils/commit/668306ed86c8c79b0af0db8b9c882654ebb66db2#diff-83d9d52b1f12ac589739ab1334ae4f30 +[2] https://errors.yoctoproject.org/Errors/Details/274743/ + +Upstream-Status: Inappropriate [OE specific] + +Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> + +--- + itstool.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/itstool.in b/itstool.in +index c21ad4b..daea177 100755 +--- a/itstool.in ++++ b/itstool.in +@@ -1,4 +1,4 @@ +-#!@PYTHON@ -s ++#!/usr/bin/env python3 + # + # Copyright (c) 2010-2018 Shaun McCance <shaunm@gnome.org> + # diff --git a/meta/recipes-support/itstool/itstool/0002-Don-t-use-build-time-hardcoded-python-binary-path.patch b/meta/recipes-support/itstool/itstool/0002-Don-t-use-build-time-hardcoded-python-binary-path.patch new file mode 100644 index 0000000000..b91105330c --- /dev/null +++ b/meta/recipes-support/itstool/itstool/0002-Don-t-use-build-time-hardcoded-python-binary-path.patch @@ -0,0 +1,29 @@ +From cd9b56224895576125e91cca317ace8a80f3eb77 Mon Sep 17 00:00:00 2001 +From: Piotr Tworek <tworaz@tworaz.net> +Date: Sat, 27 Jul 2019 10:19:11 +0200 +Subject: [PATCH] Don't use build time hardcoded python binary path. + +This path obviously won't work on target since they refer to build +machine directory structure. Native builds will also fail if local.conf +has INHERIT+=rm_work. Instread of hardcoding path to python binary use +whatever is found in PATH first. This should also allow the tool to use +python3 binary provided in recipe-sysroot-native. + +Upstream-Status: Inappropriate [OE specific] +--- + itstool.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/itstool.in b/itstool.in +index b3c0033..7df2476 100755 +--- a/itstool.in ++++ b/itstool.in +@@ -1,4 +1,4 @@ +-#!@PYTHON@ -s ++#!/usr/bin/env -S python3 -s + # + # Copyright (c) 2010-2018 Shaun McCance <shaunm@gnome.org> + # +-- +2.21.0 + diff --git a/meta/recipes-support/itstool/itstool_2.0.7.bb b/meta/recipes-support/itstool/itstool_2.0.7.bb new file mode 100644 index 0000000000..ddbc49b6cf --- /dev/null +++ b/meta/recipes-support/itstool/itstool_2.0.7.bb @@ -0,0 +1,29 @@ +SUMMARY = "ITS Tool allows you to translate your XML documents with PO files" +DESCRIPTION = "It extracts messages from XML files and outputs PO template \ +files, then merges translations from MO files to create translated \ +XML files. It determines what to translate and how to chunk it into \ +messages using the W3C Internationalization Tag Set (ITS). " +HOMEPAGE = "http://itstool.org/" +LICENSE = "GPL-3.0-only" +LIC_FILES_CHKSUM = "\ + file://COPYING;md5=59c57b95fd7d0e9e238ebbc7ad47c5a5 \ + file://COPYING.GPL3;md5=d32239bcb673463ab874e80d47fae504 \ +" + +inherit autotools python3native + +DEPENDS = "libxml2-native" + +SRC_URI = "http://files.itstool.org/${BPN}/${BPN}-${PV}.tar.bz2 \ + " +UPSTREAM_CHECK_URI = "https://itstool.org/download.html" + +SRC_URI:append:class-native = " file://0001-Native-Don-t-use-build-time-hardcoded-python-binary-.patch" +SRC_URI:append:class-nativesdk = " file://0001-Native-Don-t-use-build-time-hardcoded-python-binary-.patch" +SRC_URI:append:class-target = " file://0002-Don-t-use-build-time-hardcoded-python-binary-path.patch" + +SRC_URI[sha256sum] = "6b9a7cd29a12bb95598f5750e8763cee78836a1a207f85b74d8b3275b27e87ca" + +BBCLASSEXTEND = "native nativesdk" + +RDEPENDS:${PN} += "libxml2-python" |