add gettext-tiny package
v4 cover add gettext-tiny package
Add lightweight alternative for the GNU gettext package - gettext-tiny. The sources are used from sabotage-linux project. Some files are used from the original gettext gnu like po/*, gettextize and some m4 files.
The original gettext package is renamed to gettext-gnu because now gettext is a virtual package and gettext-gnu and gettext-tiny became as gettext providers.
There is only the case when BR2_PACKAGE_GETTEXT is selected directly - by ecryptfs-utils, for this case the gettext-tiny install gettext-wrapper for the target, the wrapper just echoes the messages w/o any translation.
v4:
1) Refactored by Thomas Pettazoni, with extracting required gettext-gnu files from from downloaded archive rather than from direct URL link per each file.
2) Allow gettext-tiny to be installed for the target which only installs gettext tool echo-wrapper provided by Yann E. Morin.
3) Fixed author and SoB emails in *-format-not-a-string-literal-error-for-gc.patch
v3:
1) Rebased on master.
2) Drop wine related patch which is already applied.
v2:
1) Add patch to disable gettext option for "wine" if NLS is disabled.
2) Fix build issue with libuio by adding config.rpath by separate package patch:
0002-Add-config.rpath-from-gettext-gnu-distro-0.19.8.1.patch
3) Use gettext-tiny only as for HOST alternative and if NLS is disabled. There is no option to manually select gettext-gnu or gettext-tiny which is controlled by gettext virtual package.
4) Drop "files" folder with copied files from original gettext gnu, but download them from:
https://git.savannah.gnu.org/cgit/gettext.git
Thanks to Yann E. Morin for help with this.
5) gettextize is preprocessed from the original gettextize.in
6) Use only host-generic-package for gettext-tiny, hence remove "target" related stuff.
Vadim Kochan (2):
package/gettext: turn into virtual package
package/gettext-tiny: new package
DEVELOPERS | 1 +
package/Config.in | 2 +
.../0001-error_print_progname.patch | 0
.../0002-Update-after-gnulib-changed.patch | 0
package/gettext-gnu/Config.in | 24 +++++
.../gettext.hash => gettext-gnu/gettext-gnu.hash} | 0
package/gettext-gnu/gettext-gnu.mk | 103 +++++++++++++++++++
...-format-not-a-string-literal-error-for-gc.patch | 55 ++++++++++
package/gettext-tiny/Config.in | 18 ++++
package/gettext-tiny/gettext-tiny.hash | 5 +
package/gettext-tiny/gettext-tiny.mk | 114 +++++++++++++++++++++
package/gettext-tiny/gettext-wrapper | 24 +++++
package/gettext/Config.in | 25 ++---
package/gettext/gettext.mk | 96 +----------------
14 files changed, 357 insertions(+), 110 deletions(-)
rename package/{gettext => gettext-gnu}/0001-error_print_progname.patch (100%)
rename package/{gettext => gettext-gnu}/0002-Update-after-gnulib-changed.patch (100%)
create mode 100644 package/gettext-gnu/Config.in
rename package/{gettext/gettext.hash => gettext-gnu/gettext-gnu.hash} (100%)
create mode 100644 package/gettext-gnu/gettext-gnu.mk
create mode 100644 package/gettext-tiny/0001-libintl-Fix-format-not-a-string-literal-error-for-gc.patch
create mode 100644 package/gettext-tiny/Config.in
create mode 100644 package/gettext-tiny/gettext-tiny.hash
create mode 100644 package/gettext-tiny/gettext-tiny.mk
create mode 100644 package/gettext-tiny/gettext-wrapperSignature · 1 line
2.14.1
PATCH v4 1/2 package/gettext: turn into virtual package
Re-work gettext to be a virtual package which may allow to use different gettext's providers, and rename the original one into gettext-gnu package.
---
package/Config.in | 1 +
.../0001-error_print_progname.patch | 0
.../0002-Update-after-gnulib-changed.patch | 0
package/gettext-gnu/Config.in | 24 +++++
.../gettext.hash => gettext-gnu/gettext-gnu.hash} | 0
package/gettext-gnu/gettext-gnu.mk | 103 +++++++++++++++++++++
package/gettext/Config.in | 24 ++---
package/gettext/gettext.mk | 96 +------------------
8 files changed, 140 insertions(+), 108 deletions(-)
rename package/{gettext => gettext-gnu}/0001-error_print_progname.patch (100%)
rename package/{gettext => gettext-gnu}/0002-Update-after-gnulib-changed.patch (100%)
create mode 100644 package/gettext-gnu/Config.in
rename package/{gettext/gettext.hash => gettext-gnu/gettext-gnu.hash} (100%)
create mode 100644 package/gettext-gnu/gettext-gnu.mkpackage/Config.in +1 -0
@@ -153,6 +153,7 @@ menu "Development tools" source "package/flex/Config.in" source "package/gawk/Config.in" source "package/gettext/Config.in" + source "package/gettext-gnu/Config.in" source "package/git/Config.in" source "package/git-crypt/Config.in" source "package/gperf/Config.in"
package/gettext-gnu/0001-error_print_progname.patch renamed from package/gettext/0001-error_print_progname.patch +0 -0
package/gettext-gnu/0002-Update-after-gnulib-changed.patch renamed from package/gettext/0002-Update-after-gnulib-changed.patch +0 -0
package/gettext-gnu/Config.in new file +24 -0
@@ -0,0 +1,24 @@ +config BR2_PACKAGE_GETTEXT_GNU + bool + depends on BR2_USE_WCHAR + select BR2_PACKAGE_HAS_GETTEXT + help + The GNU `gettext' utilities are a set of tools that provide a + framework to help other GNU packages produce multi-lingual + messages. + + Only the libintl library will be installed in the + target. The full gettext suite, including tools, will be + installed in the staging directory. + + http://www.gnu.org/software/gettext/ + +if BR2_PACKAGE_GETTEXT_GNU + +config BR2_PACKAGE_PROVIDES_GETTEXT + default "gettext-gnu" + +endif + +config BR2_PACKAGE_PROVIDES_HOST_GETTEXT + default "host-gettext-gnu"
package/gettext-gnu/gettext-gnu.hash renamed from package/gettext/gettext.hash +0 -0
package/gettext-gnu/gettext-gnu.mk new file +103 -0
103 lines not on this page · raw message
package/gettext/Config.in +10 -14
@@ -1,25 +1,21 @@ config BR2_PACKAGE_GETTEXT bool "gettext" depends on BR2_USE_WCHAR - help - The GNU `gettext' utilities are a set of tools that provide a - framework to help other GNU packages produce multi-lingual - messages. + select BR2_PACKAGE_GETTEXT_GNU - Only the libintl library will be installed in the - target. The full gettext suite, including tools, will be - installed in the staging directory. - - http://www.gnu.org/software/gettext/ - -if BR2_PACKAGE_GETTEXT +comment "gettext needs a toolchain w/ wchar" + depends on !BR2_USE_WCHAR config BR2_PACKAGE_GETTEXT_PROVIDES_LIBINTL bool default y if BR2_SYSTEM_ENABLE_NLS depends on !BR2_TOOLCHAIN_HAS_FULL_GETTEXT -endif +config BR2_PACKAGE_HAS_GETTEXT + bool -comment "gettext needs a toolchain w/ wchar" - depends on !BR2_USE_WCHAR +config BR2_PACKAGE_PROVIDES_GETTEXT + string + +config BR2_PACKAGE_PROVIDES_HOST_GETTEXT + string
package/gettext/gettext.mk +2 -94
99 lines not on this page · raw message
Signature · 1 line
2.14.1
PATCH v4 2/2 package/gettext-tiny: new package
In reply to Vadim KochanAdd gettext-tiny package from the sabotage-linux project:
gettext-tiny provides lightweight replacements for tools typically used from the GNU gettext suite, which is incredibly bloated and takes a lot of time to build (in the order of an hour on slow devices). the most notable component is msgfmt which is used to create binary translation files in the .mo format out of textual input files in .po format. this is the most important tool for building software from source, because it is used from the build processes of many software packages.
Some files were taken from gettext-gnu (some po/* files and gettextize script) to make possible perform gettextizing of packages.
The main purpose of gettext-tiny is to replace gettext for the "host" if NLS support is not needed. There is no option to manually select gettext-gnu or gettext-tiny, it is done automatically by virtual gettext package. For the target gettext-tiny only installs gettext tool echo-wrapper which might be called from shell scripts (i.e. ecryptfs-utils).
--- DEVELOPERS | 1 + package/Config.in | 1 + package/gettext-gnu/Config.in | 2 +- ...-format-not-a-string-literal-error-for-gc.patch | 55 ++++++++++ package/gettext-tiny/Config.in | 18 ++++ package/gettext-tiny/gettext-tiny.hash | 5 + package/gettext-tiny/gettext-tiny.mk | 114 +++++++++++++++++++++ package/gettext-tiny/gettext-wrapper | 24 +++++ package/gettext/Config.in | 7 +- 9 files changed, 221 insertions(+), 6 deletions(-) create mode 100644 package/gettext-tiny/0001-libintl-Fix-format-not-a-string-literal-error-for-gc.patch create mode 100644 package/gettext-tiny/Config.in create mode 100644 package/gettext-tiny/gettext-tiny.hash create mode 100644 package/gettext-tiny/gettext-tiny.mk create mode 100644 package/gettext-tiny/gettext-wrapper
DEVELOPERS +1 -0
@@ -2197,6 +2197,7 @@ F: package/tstools/ N: Vadim Kochan <[email protected]> F: package/brcm-patchram-plus/ +F: package/gettext-tiny/ N: Valentin Korenblit <[email protected]> F: package/clang/
package/Config.in +1 -0
@@ -154,6 +154,7 @@ menu "Development tools" source "package/gawk/Config.in" source "package/gettext/Config.in" source "package/gettext-gnu/Config.in" + source "package/gettext-tiny/Config.in" source "package/git/Config.in" source "package/git-crypt/Config.in" source "package/gperf/Config.in"
package/gettext-gnu/Config.in +1 -1
@@ -21,4 +21,4 @@ config BR2_PACKAGE_PROVIDES_GETTEXT endif config BR2_PACKAGE_PROVIDES_HOST_GETTEXT - default "host-gettext-gnu" + default "host-gettext-gnu" if BR2_SYSTEM_ENABLE_NLS
package/gettext-tiny/0001-libintl-Fix-format-not-a-string-literal-error-for-gc.patch new file +55 -0
55 lines not on this page · raw message
package/gettext-tiny/Config.in new file +18 -0
@@ -0,0 +1,18 @@ +config BR2_PACKAGE_GETTEXT_TINY + bool + select BR2_PACKAGE_HAS_GETTEXT + help + Stub and/or lightweight replacements of the gnu gettext + suite; because the GNU one takes ages to compile. + + https://github.com/sabotage-linux/gettext-tiny + +if BR2_PACKAGE_GETTEXT_TINY + +config BR2_PACKAGE_PROVIDES_GETTEXT + default "gettext-tiny" + +endif + +config BR2_PACKAGE_PROVIDES_HOST_GETTEXT + default "host-gettext-tiny" if !BR2_SYSTEM_ENABLE_NLS
package/gettext-tiny/gettext-tiny.hash new file +5 -0
@@ -0,0 +1,5 @@ +# Locally Computed: +sha256 654dcd52f2650476c8822b60bee89c20a0aa7f6a1bf6001701eeacd71a9e388b gettext-tiny-v0.3.1.tar.gz +# From http://lists.gnu.org/archive/html/bug-gettext/2016-06/msg00008.html +md5 df3f5690eaa30fd228537b00cb7b7590 gettext-0.19.8.1.tar.xz +sha1 e0fe90ede22f7f16bbde7bdea791a835f2773fc9 gettext-0.19.8.1.tar.xz
package/gettext-tiny/gettext-tiny.mk new file +114 -0
114 lines not on this page · raw message
package/gettext-tiny/gettext-wrapper new file +24 -0
@@ -0,0 +1,24 @@ +#!/bin/sh +# +# Thanks to "Yann E. MORIN" <[email protected]> +# for this gettext replacement. + +while [ ${#} -ne 0 ]; do + case "${1}" in + (-h) printf "no help\n"; return 0;; + (-V) printf "0.0.0\n"; return 0;; + (-d|--domain) shift 2;; + (-d*|--domain=*) shift 1;; + (-e|-E|-n) shift 1;; + (-s) shift 1;; # Ignore? + (-*) printf "invalid option '%s'\n" "${1}" >&2; return 1;; + (*) break;; + esac +done + +case ${#} in + (0) printf "missing arguments\n" >&2; return 1;; + (1) printf "%s" "${1}";; + (2) shift; printf "%s" "${2}";; + (*) printf "too many arguments\n" >&2; return 1;; +esac
package/gettext/Config.in +2 -5
@@ -1,10 +1,7 @@ config BR2_PACKAGE_GETTEXT bool "gettext" - depends on BR2_USE_WCHAR - select BR2_PACKAGE_GETTEXT_GNU - -comment "gettext needs a toolchain w/ wchar" - depends on !BR2_USE_WCHAR + select BR2_PACKAGE_GETTEXT_GNU if BR2_SYSTEM_ENABLE_NLS + select BR2_PACKAGE_GETTEXT_TINY if !BR2_SYSTEM_ENABLE_NLS config BR2_PACKAGE_GETTEXT_PROVIDES_LIBINTL bool
Signature · 1 line
2.14.1
v4 cover add gettext-tiny package
In reply to Vadim KochanQuoted 3 lines · On Thu, 28 Mar 2019 01:08:29 +0200 Vadim Kochan <[email protected]> wrote:
Vadim Kochan (2):
package/gettext: turn into virtual package
package/gettext-tiny: new package
Thanks, I've applied both patches!
A couple of notes/suggestions:
- It would be nice if you could work with upstream gettext-tiny to make sure gettext-tiny provides everything we need, without the need to bring some files from gettext-gnu.
- The ecryptfs-utils package can probably see its BR2_USE_WCHAR dependency removed. Indeed, when BR2_SYSTEM_ENABLE_NLS is disabled, we use gettext-tiny, and wchar is no longer needed. And BR2_SYSTEM_ENABLE_NLS depends on wchar.
- I have sent a patch for utils/genrandconfig that randomly sets BR2_SYSTEM_ENABLE_NLS=y in the autobuilder configurations, in order to test this situation.
Quoted 27 lines
DEVELOPERS | 1 +
package/Config.in | 2 +
.../0001-error_print_progname.patch | 0
.../0002-Update-after-gnulib-changed.patch | 0
package/gettext-gnu/Config.in | 24 +++++
.../gettext.hash => gettext-gnu/gettext-gnu.hash} | 0
package/gettext-gnu/gettext-gnu.mk | 103 +++++++++++++++++++
...-format-not-a-string-literal-error-for-gc.patch | 55 ++++++++++
package/gettext-tiny/Config.in | 18 ++++
package/gettext-tiny/gettext-tiny.hash | 5 +
package/gettext-tiny/gettext-tiny.mk | 114 +++++++++++++++++++++
package/gettext-tiny/gettext-wrapper | 24 +++++
package/gettext/Config.in | 25 ++---
package/gettext/gettext.mk | 96 +----------------
14 files changed, 357 insertions(+), 110 deletions(-)
rename package/{gettext => gettext-gnu}/0001-error_print_progname.patch (100%)
rename package/{gettext => gettext-gnu}/0002-Update-after-gnulib-changed.patch (100%)
create mode 100644 package/gettext-gnu/Config.in
rename package/{gettext/gettext.hash => gettext-gnu/gettext-gnu.hash} (100%)
create mode 100644 package/gettext-gnu/gettext-gnu.mk
create mode 100644 package/gettext-tiny/0001-libintl-Fix-format-not-a-string-literal-error-for-gc.patch
create mode 100644 package/gettext-tiny/Config.in
create mode 100644 package/gettext-tiny/gettext-tiny.hash
create mode 100644 package/gettext-tiny/gettext-tiny.mk
create mode 100644 package/gettext-tiny/gettext-wrapperSignature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
v4 cover add gettext-tiny package
Hello,
Quoted 6 lines · On Sun, 31 Mar 2019 14:29:07 +0200 Thomas Petazzoni…
A couple of notes/suggestions:
- It would be nice if you could work with upstream gettext-tiny to make sure gettext-tiny provides everything we need, without the need to bring some files from gettext-gnu.
Quoted 6 lines
- The ecryptfs-utils package can probably see its
BR2_USE_WCHARdependency removed. Indeed, whenBR2_SYSTEM_ENABLE_NLSis disabled, we use gettext-tiny, and wchar is no longer needed. AndBR2_SYSTEM_ENABLE_NLSdepends on wchar.- I have sent a patch for utils/genrandconfig that randomly sets BR2_SYSTEM_ENABLE_NLS=y in the autobuilder configurations, in order to test this situation.
Gah, I hit Ctrl+Enter and it sent the e-mail before I finished. I meant to wrap this line, and say:
Thanks a lot for this contribution, it was not trivial, but it's definitely a nice improvement!
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com