Commit | Line | Data |
---|---|---|
d4137d84 KK |
1 | This patch allows us to use glibc's build system to build locales |
2 | in a package separate from glibc. | |
3 | ||
4 | 1. Use 'localedef' from $PATH since we are not rebuilding it. | |
5 | 2. Use '--no-archive' to avoid building the big locale archive, and | |
6 | because the already-built 'localedef' would want to write it | |
7 | to '/run/current-system/locale', which is not possible. | |
8 | 3. Pass $(inst_complocaledir)/$$locale to install files in the right | |
9 | place, and because otherwise, 'localedef' fails with: | |
10 | "cannot write output files to `(null)'". | |
11 | ||
12 | --- glibc-2.27/localedata/Makefile | |
13 | +++ glibc-2.27/localedata/Makefile | |
14 | @@ -199,7 +199,7 @@ INSTALL-SUPPORTED-LOCALES=$(addprefix install-, $(SUPPORTED-LOCALES)) | |
15 | ||
16 | # Sometimes the whole collection of locale files should be installed. | |
17 | LOCALEDEF=I18NPATH=. GCONV_PATH=$(common-objpfx)iconvdata LC_ALL=C \ | |
18 | -$(rtld-prefix) $(common-objpfx)locale/localedef | |
19 | + localedef --no-archive | |
20 | install-locales: $(INSTALL-SUPPORTED-LOCALES) | |
21 | ||
22 | install-locales-dir: | |
23 | @@ -224,7 +224,7 @@ $(INSTALL-SUPPORTED-LOCALES): install-locales-dir | |
24 | input=`echo $$locale | sed 's/\([^.]*\)[^@]*\(.*\)/\1\2/'`; \ | |
25 | $(LOCALEDEF) $$flags --alias-file=../intl/locale.alias \ | |
26 | -i locales/$$input -f charmaps/$$charset \ | |
27 | - $(addprefix --prefix=,$(install_root)) $$locale \ | |
28 | + $(addprefix --prefix=,$(install_root)) $(inst_complocaledir)/$$locale \ | |
29 | && echo ' done'; \ | |
30 | ||
31 | tst-setlocale-ENV = LC_ALL=ja_JP.EUC-JP |