diff options
Diffstat (limited to 'Mk/bsd.port.mk')
-rw-r--r-- | Mk/bsd.port.mk | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk index 361ea58a0b3f..9cafcbe77604 100644 --- a/Mk/bsd.port.mk +++ b/Mk/bsd.port.mk @@ -348,7 +348,10 @@ FreeBSD_MAINTAINER= portmgr@FreeBSD.org # can be used in Makefiles by port maintainers # if a port breaks with it (it should be # extremely rare). -# +## +# USE_LOCALE - LANG and LC_ALL are set to the value of this variable in +# CONFIGURE_ENV and MAKE_ENV. Example: USE_LOCALE=en_US.UTF-8 +## # USE_GCC - If set, this port requires this version of gcc, either in # the system or installed from a port. # USE_CSTD - Override the default C language standard (gnu89, gnu99) @@ -1035,6 +1038,10 @@ FreeBSD_MAINTAINER= portmgr@FreeBSD.org # Most port authors should not need to understand anything after this point. # +LANG= C +LC_ALL= C +.export LANG LC_ALL + # These need to be absolute since we don't know how deep in the ports # tree we are and thus can't go relative. They can, of course, be overridden # by individual Makefiles or local system make configuration. @@ -1904,6 +1911,11 @@ ${_f}_ARGS:= ${f:C/^[^\:]*(\:|\$)//:S/,/ /g} .include "${USESDIR}/${f:C/\:.*//}.mk" .endfor +.if defined(USE_LOCALE) +CONFIGURE_ENV+= LANG=${USE_LOCALE} LC_ALL=${USE_LOCALE} +MAKE_ENV+= LANG=${USE_LOCALE} LC_ALL=${USE_LOCALE} +.endif + .if defined(USE_XORG) # Add explicit X options to avoid problems with false positives in configure .if defined(GNU_CONFIGURE) |