From 58eff38afa67d4a9a3d698f6340f2213020cedb6 Mon Sep 17 00:00:00 2001 From: John Marino Date: Sat, 18 Jul 2015 11:13:51 +0200 Subject: [PATCH] Create short name locales In other (non-BSD?) platforms, it's possible to use a locale such as "en_GB". Up until now, this did not work on DragonFly. It required a codeset as well, so if "en_GB.UTF-8" wasn't specified, setlocale would fail. Every locale except two has a version that uses the UTF-8 codeset, so a symlink was created to these to create these territory locales. The other two are hi_IN => hi_IN.ISCII-DEV la_LN => la_LN.ISO8859-1 This should improve cross-platform compatibility, and it will lead to a change in gcc50 libstdc++ locale handling. While here, set the "share" directory to build in parallel rather than serially. --- share/Makefile | 4 +++- share/locale-links/Makefile | 22 ++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 share/locale-links/Makefile diff --git a/share/Makefile b/share/Makefile index b87eaf6a71..fcd53ef810 100644 --- a/share/Makefile +++ b/share/Makefile @@ -1,10 +1,12 @@ # @(#)Makefile 8.1 (Berkeley) 6/5/93 # $FreeBSD: src/share/Makefile,v 1.22.2.4 2002/03/12 17:13:32 phantom Exp $ -SUBDIR= colldef dict doc examples i18n initrd \ +SUBDIR= colldef dict doc examples i18n initrd locale-links \ man me misc mk mklocale monetdef msgdef \ numericdef skel syscons tabset termcap terminfo timedef zoneinfo +SUBDIR_ORDERED= # maximum parallism + .if defined(WANT_INSTALLER) SUBDIR+= installer .endif diff --git a/share/locale-links/Makefile b/share/locale-links/Makefile new file mode 100644 index 0000000000..3eae7cbee5 --- /dev/null +++ b/share/locale-links/Makefile @@ -0,0 +1,22 @@ +# This creates short versions of locales as symlinks to full versions +# e.g. en_GB is a symlink to en_GB.UTF-8. +# The UTF-8 version will always be the target if available + +UTF8= af_ZA am_ET be_BY bg_BG ca_AD ca_ES ca_FR ca_IT \ + cs_CZ da_DK de_AT de_CH de_DE el_GR en_AU en_CA \ + en_GB en_IE en_NZ en_US es_ES et_EE eu_ES fi_FI \ + fr_BE fr_CA fr_CH fr_FR he_IL hr_HR hu_HU hy_AM \ + is_IS it_CH it_IT ja_JP kk_KZ ko_KR lt_LT lv_LV \ + mn_MN nb_NO nl_BE nl_NL nn_NO no_NO pl_PL pt_BR \ + pt_PT ro_RO ru_RU sk_SK sl_SI sr_YU sv_SE tr_TR \ + uk_UA zh_CN zh_HK zh_TW + +LOCALEDIR= /usr/share/locale + +SYMLINKS= hi_IN.ISCII-DEV ${LOCALEDIR}/hi_IN \ + la_LN.ISO8859-1 ${LOCALEDIR}/la_LN +.for symdir in ${UTF8} +SYMLINKS+= ${symdir}.UTF-8 ${LOCALEDIR}/${symdir} +.endfor + +.include -- 2.41.0