diff mbox series

[v2] package/itstool: new host package

Message ID 20231001043505.19301-1-takumiiinn@gmail.com
State New
Headers show
Series [v2] package/itstool: new host package | expand

Commit Message

Takumi Takahashi Oct. 1, 2023, 4:35 a.m. UTC
ITS Tool allows you to translate your XML documents with PO files,
using rules from the W3C Internationalization Tag Set (ITS) to
determine what to translate and how to separate it into
PO file messages.

- This package is primarily used by documentation tools such as gtk-doc
  - After this patch is merged, a patch to add gtk-doc will be submitted
- This package requires python bindings for libxml2
  - This change has already been merged

See below for libxml2 Python bindings:
https://patchwork.ozlabs.org/project/buildroot/patch/20230930155548.1609970-1-takumiiinn@gmail.com/

Signed-off-by: Takumi Takahashi <takumiiinn@gmail.com>

---
Changes v1 -> v2:
  - add entry to DEVELOPERS
  - add entry to package/Config.in.host
  - add file to package/itstool/Config.in.host
  - change commit log messages

Signed-off-by: Takumi Takahashi <takumiiinn@gmail.com>
---
 DEVELOPERS                     |  3 +++
 package/Config.in.host         |  1 +
 package/itstool/Config.in.host | 11 +++++++++++
 package/itstool/itstool.hash   |  4 ++++
 package/itstool/itstool.mk     | 15 +++++++++++++++
 5 files changed, 34 insertions(+)
 create mode 100644 package/itstool/Config.in.host
 create mode 100644 package/itstool/itstool.hash
 create mode 100644 package/itstool/itstool.mk
diff mbox series

Patch

diff --git a/DEVELOPERS b/DEVELOPERS
index bc4027932c..688d3ebce2 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -2821,6 +2821,9 @@  F:	package/reproc/
 F:	package/termcolor/
 F:	package/tl-expected/
 
+N:	Takumi Takahashi <takumiiinn@gmail.com>
+F:	package/itstool/
+
 N:	Tan En De <ende.tan@starfivetech.com>
 F:	package/libkcapi/
 
diff --git a/package/Config.in.host b/package/Config.in.host
index c80842c33a..6bc1857df2 100644
--- a/package/Config.in.host
+++ b/package/Config.in.host
@@ -51,6 +51,7 @@  menu "Host utilities"
 	source "package/imagemagick/Config.in.host"
 	source "package/imx-mkimage/Config.in.host"
 	source "package/imx-usb-loader/Config.in.host"
+	source "package/itstool/Config.in.host"
 	source "package/jh71xx-tools/Config.in.host"
 	source "package/jq/Config.in.host"
 	source "package/jsmin/Config.in.host"
diff --git a/package/itstool/Config.in.host b/package/itstool/Config.in.host
new file mode 100644
index 0000000000..c64bcddc6a
--- /dev/null
+++ b/package/itstool/Config.in.host
@@ -0,0 +1,11 @@ 
+config BR2_PACKAGE_HOST_ITSTOOL
+	bool "host itstool"
+	select BR2_PACKAGE_HOST_PYTHON3
+	select BR2_PACKAGE_HOST_LIBXML2
+	help
+	  ITS Tool allows you to translate your XML documents with
+	  PO files, using rules from the W3C Internationalization
+	  Tag Set (ITS) to determine what to translate and how to
+	  separate it into PO file messages.
+
+	  https://itstool.org/
diff --git a/package/itstool/itstool.hash b/package/itstool/itstool.hash
new file mode 100644
index 0000000000..7bd533c0d2
--- /dev/null
+++ b/package/itstool/itstool.hash
@@ -0,0 +1,4 @@ 
+# Locally computed
+sha256  fba78a37dc3535e4686c7f57407b97d03c676e3a57beac5fb2315162b0cc3176  itstool-2.0.7.tar.gz
+sha256  f907bf6e8a3f4911af6904597c9dcb6b415ab2facf8d403fa3c5afa1f533ab90  COPYING
+sha256  8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903  COPYING.GPL3
diff --git a/package/itstool/itstool.mk b/package/itstool/itstool.mk
new file mode 100644
index 0000000000..3b738c2f01
--- /dev/null
+++ b/package/itstool/itstool.mk
@@ -0,0 +1,15 @@ 
+################################################################################
+#
+# itstool
+#
+################################################################################
+
+ITSTOOL_VERSION = 2.0.7
+ITSTOOL_SITE = $(call github,itstool,itstool,$(ITSTOOL_VERSION))
+ITSTOOL_LICENSE = GPL-3.0+
+ITSTOOL_LICENSE_FILES = COPYING COPYING.GPL3
+HOST_ITSTOOL_DEPENDENCIES = host-python3 host-libxml2
+
+ITSTOOL_AUTORECONF = YES
+
+$(eval $(host-autotools-package))