stub and/or lightweight replacements of the gnu gettext suite; because the GNU one takes ages to compile
Go to file
Max Rees 0e62c25887 msgfmt: exit(1) if incorrectly used
This prevents builds from continuing seemingly fine when they are
actually not using this version of msgfmt correctly.
2020-03-24 14:07:36 +08:00
data data/ add missing maintainer targets 2019-06-29 09:53:27 +08:00
docs add official gettext info 2012-09-17 05:34:10 +02:00
include gettext-tiny: Fix format not a string literal error (#41) 2019-04-06 12:45:04 +08:00
libintl libintl: make it optional and configurable 2017-07-29 20:48:20 +08:00
m4 Added gl_TYPE_WINT_T_PREREQ 2018-03-13 20:34:43 +00:00
src msgfmt: exit(1) if incorrectly used 2020-03-24 14:07:36 +08:00
.gitignore add autopoint to .gitignore 2017-05-06 13:03:23 +08:00
LICENSE LICENSE: add parapraph about doc/ licenses 2020-02-03 16:40:52 +00:00
Makefile Makefile: fix install failure if path contains "m4/" string (#49) 2020-01-19 12:22:17 +08:00 README: Add LIBINTL=FLAVOR to install command 2018-07-14 18:03:46 +08:00 update 2016-10-02 21:17:46 +01:00 set proper execute permissions 2018-07-14 15:24:37 +01:00


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.

our msgfmt implementation was initially a fake implementation that would just output the english input string as the translation, which is sufficient to get software to work, but it has since grown into a complete implementation. unlike the GNU implementation, it can even expand input strings containing so-called sysdep strings into a constant translation table. sysdep strings were glued as an after-thought onto the GNU implementation to deal with system-specific format strings, and in the GNU implementation those are created at runtime, which requires mapping the entire .mo file into read/write memory locations, thereby wasting precious RAM for read-only data that could otherwise be shared among processes.

other parts of gettext-tiny such as xgettext and msgmerge are still stubs, but they are sufficient to build many packages.

since musl libc, our preferred target, didn't provide a libintl in the past, (and it's also part of GNU gettext) we also ship a no-op libintl providing a header and a library.

it comes in two flavours:

  1. nop: gettext functions just return the input string as translation
  2. musl: a compat library providing a few compatibility symbols meant to be used together with the libintl built-in into recent musl versions. the compatibility symbols help to get past configure scripts that insist on using only the GNU gettext suite. additionally, it can be entirely disabled.


make LIBINTL=FLAVOR DESTDIR=pkgdir prefix=/ install

where FLAVOR can be one of NONE, MUSL, NOOP (as detailed above). you can override any variables used in the Makefile (such as CFLAGS) by appending them to the make invocation, or by saving them into a file called config.mak before running make.