aboutsummaryrefslogtreecommitdiffstats
path: root/Mk/bsd.ruby.mk
diff options
context:
space:
mode:
authorzi <zi@FreeBSD.org>2014-02-02 00:29:36 +0800
committerzi <zi@FreeBSD.org>2014-02-02 00:29:36 +0800
commit764541e40fa40f9ea3646b7c490f4773bc791fb6 (patch)
tree29e08163fc0c223af5d3122238fbb09b0109dee8 /Mk/bsd.ruby.mk
parent5c244b5d6aead57ad1cd4a1ca734f26cbe5c445a (diff)
downloadfreebsd-ports-gnome-764541e40fa40f9ea3646b7c490f4773bc791fb6.tar.gz
freebsd-ports-gnome-764541e40fa40f9ea3646b7c490f4773bc791fb6.tar.zst
freebsd-ports-gnome-764541e40fa40f9ea3646b7c490f4773bc791fb6.zip
- 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@
Diffstat (limited to 'Mk/bsd.ruby.mk')
-rw-r--r--Mk/bsd.ruby.mk22
1 files changed, 18 insertions, 4 deletions
diff --git a/Mk/bsd.ruby.mk b/Mk/bsd.ruby.mk
index c4d507f2d8d0..04137852cca2 100644
--- a/Mk/bsd.ruby.mk
+++ b/Mk/bsd.ruby.mk
@@ -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}