buildroot/package/gettext-tiny/gettext-wrapper
Vadim Kochan 5367a1b253 package/gettext-tiny: new package
Add 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).

Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2019-03-31 14:04:30 +02:00

25 lines
737 B
Bash

#!/bin/sh
#
# Thanks to "Yann E. MORIN" <yann.morin.1998@free.fr>
# 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