- Honor user-defined LANG/LC_ALL/LC_CTYPE before defaulting (improves upon fix committed in r342091)

- Ensure LANG/LC_ALL/LC_CTYPE are defined in GEM_ENV for all versions of ruby

PR:		ports/186313
Reviewed by:	swills@
With hat:	ruby@
This commit is contained in:
Ryan Steinmetz 2014-02-01 16:29:36 +00:00
parent 63548c1b8f
commit fa6095be88
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=342184

View file

@ -186,8 +186,6 @@ RUBY_DISTVERSION?= ${RUBY_RELVERSION}-p${RUBY_PATCHLEVEL}
RUBY_WRKSRC= ${WRKDIR}/ruby-${RUBY_DISTVERSION}
GEM_ENV?= LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 LC_CTYPE=UTF-8
RUBY_CONFIGURE_ARGS+= --with-rubyhdrdir="${PREFIX}/include/ruby-1.9/" \
--with-rubylibprefix="${PREFIX}/lib/ruby" \
--docdir="${RUBY_DOCDIR}" \
@ -213,8 +211,6 @@ RUBY_DISTVERSION?= ${RUBY_RELVERSION}-p${RUBY_PATCHLEVEL}
RUBY_WRKSRC= ${WRKDIR}/ruby-${RUBY_DISTVERSION}
GEM_ENV?= LC_CTYPE=UTF-8
RUBY_CONFIGURE_ARGS+= --with-rubyhdrdir="${PREFIX}/include/ruby-2.0/" \
--with-rubylibprefix="${PREFIX}/lib/ruby" \
--docdir="${RUBY_DOCDIR}" \
@ -246,6 +242,24 @@ _RUBY_VENDORDIR?= ${_RUBY_SYSLIBDIR}/ruby/vendor_ruby
.endif
# defined(RUBY)
.if defined(LANG) && !empty(LANG)
GEM_ENV+= LANG=${LANG}
.else
GEM_ENV+= LANG=en_US.UTF-8
.endif
.if defined(LC_ALL) && !empty(LC_ALL)
GEM_ENV+= LC_ALL=${LC_ALL}
.else
GEM_ENV+= LC_ALL=en_US.UTF-8
.endif
.if defined(LC_CTYPE) && !empty(LC_CTYPE)
GEM_ENV+= LC_CTYPE=${LC_CTYPE}
.else
GEM_ENV+= LC_CTYPE=UTF-8
.endif
RUBY_DEFAULT_SUFFIX?= ${RUBY_DEFAULT_VER:S/.//}
RUBY_DISTVERSION?= ${RUBY_VERSION}