scripts/utility in rvm-0.0.67 vs scripts/utility in rvm-0.0.68
- old
+ new
@@ -301,12 +301,15 @@
done
}
function __rvm_gemdir {
if [[ -z "$rvm_ruby_selected_flag" ]] ; then __rvm_select $* ; fi
- mkdir -p $rvm_ruby_gem_home
- echo $rvm_ruby_gem_home
+ if [[ ! -z "$GEM_HOME" ]] ; then
+ echo "$GEM_HOME"
+ else
+ gem env gemdir
+ fi
}
function __rvm_source_dir {
if [[ -z "$rvm_ruby_selected_flag" ]] ; then __rvm_select $* ; fi
if [[ -z "$rvm_ruby_src_path" ]] ; then
@@ -783,10 +786,15 @@
__rvm_pushpop
}
function __rvm_openssl_install {
__rvm_make_flags
+ if match "$rvm_archflags" "x86_64" ; then
+ openssl_os="os/compiler darwin64-x86_64-cc"
+ else
+ openssl_os="os/compiler darwin-i386-cc"
+ fi
__rvm_pushpop $rvm_src_path
package="openssl" ; version="0.9.8k" ; archive_format="tar.gz"
__rvm_log "info" "Retrieving $package-$version.$archive_format"
__rvm_fetch "http://www.openssl.org/source/$package-$version.tar.gz"
__rvm_run "$package/extract" "tar zxf $rvm_archives_path/$package-$version.$archive_format -C $rvm_src_path" "Extracting $package-$version.$archive_format"
@@ -826,25 +834,24 @@
}
__rvm_make_flags() {
PATH=${rvm_path}/usr/bin:$PATH ; export PATH
if [[ "Darwin" = "$(uname)" ]] ; then
+
if [[ -z "$rvm_archflags" ]] ; then
- if [[ $(echo "scale=4; $(uname -r | awk -F'.' '{print $1"."$2}') >= 10.0" | bc) -eq 1 ]] ; then
- rvm_archflags="-arch x86_64"
- else
- rvm_archflags="-arch i386"
- fi
+ # Build for the archtecture that is reported.
+ # The user may override via setting rvm_archflags in ~/.rvmrc
+ rvm_archflags="-arch $(uname -m )"
fi
- if [[ -z "$rvm_sdk" ]] ; then
- rvm_sdk="$(ls /Developer/SDKs/ | sort | tail -n 1)"
+ if [[ "-arch x86_64" = "$rvm_archflags" ]] ; then
+ rvm_ruby_configure="${rvm_ruby_configure} --build=x86_64-apple-darwin$(uname -r) --host=x86_64-apple-darwin$(uname -r)"
+ elif [[ "-arch i386" = "$rvm_archflags" ]] ; then
+ rvm_ruby_configure="${rvm_ruby_configure} --build=i386-apple-darwin$(uname -r) --host=i386-apple-darwin$(uname -r)"
fi
- if [[ "-arch x86_64" = "$rvm_archflags" ]] ; then
- openssl_os="os/compiler darwin64-x86_64-cc"
- else
- openssl_os="os/compiler darwin-i386-cc"
+ if [[ -z "$rvm_sdk" ]] ; then
+ rvm_sdk="$(ls /Developer/SDKs/ | sort | tail -n 1)"
fi
CFLAGS="-isysroot /Developer/SDKs/$rvm_sdk $rvm_archflags" ; export CFLAGS
LDFLAGS="-Wl,-syslibroot /Developer/SDKs/$rvm_sdk $rvm_archflags" ; export LDFLAGS
# CXXFLAGS="-mmacosx-version-min="$(sw_vers -productVersion | awk -F'.' '{print $1"."$2}')" -isysroot /Developer/SDKs/$rvm_sdk " ; export CXXFLAGS