scripts/package in rvm-0.1.41 vs scripts/package in rvm-0.1.42
- old
+ new
@@ -24,11 +24,11 @@
elif [[ "$archive_format" = "tar.bz2" ]] ; then
$rvm_scripts_path/fetch "$package_url/$package-$version.$archive_format" || (result=$? && return $result)
__rvm_run "$package/extract" "tar jxf $rvm_archives_path/$package-$version.$archive_format -C $rvm_src_path" "Extracting $package-$version.$archive_format to $rvm_src_path"
elif [[ "$archive_format" = "zip" ]] ; then
$rvm_scripts_path/fetch "$package_url/$package-$version.$archive_format" || (result=$? && return $result)
- __rvm_run "$package/extract" "unzip -q -o $rvm_archives_path/$package-$version.$archive_format -d $rvm_src_path/$package-$version" "Extracting $package-$version.$archive_format to $rvm_src_path"
+ __rvm_run "$package/extract" "unzip -q -o $rvm_archives_path/$package-$version.$archive_format -d $rvm_src_path/$package-$version" "Extracting $package-$version.$archive_format to $rvm_src_path"
else
printf "\nUnrecognized archive format '$archive_format'" ; return 1
fi
builtin cd "$rvm_src_path/$package-$version"
@@ -69,18 +69,40 @@
}
openssl() {
package="openssl" ; version="0.9.8n" ; archive_format="tar.gz"
if [[ "Darwin" = "$(uname)" ]] ; then
- if $rvm_scripts_path/match "$rvm_archflags" "x86_64" ; then
- export openssl_os="os/compiler darwin64-x86_64-cc"
+ if [[ ! -z "$rvm_archflags" ]]; then
+ if $rvm_scripts_path/match "$rvm_archflags" "64"; then
+ hw_cpu64bit=1
+ fi
+ if $rvm_scripts_path/match "$rvm_archflags" "ppc"; then
+ hw_machine="Power Macintosh"
+ fi
else
- export openssl_os="os/compiler darwin-i386-cc"
+ hw_machine=$(sysctl hw.machine | awk -F: '{print $2}' | sed 's/^ //')
+ hw_cpu64bit=$(sysctl hw.cpu64bit_capable | awk '{print $2}')
fi
+ if [[ "Power Macintosh" = "$hw_machine" ]] ; then
+ if [[ $hw_cpu64bit = 1 ]]; then
+ openssl_os="darwin64-ppc-cc"
+ else
+ openssl_os="darwin-ppc-cc"
+ fi
+ else
+ if [[ $hw_cpu64bit = 1 ]]; then
+ openssl_os="darwin64-x86_64-cc"
+ else
+ openssl_os="darwin-i386-cc"
+ fi
+ fi
configure_command="./Configure"
patches="$rvm_patches_path/$package/Makefile.org.patch,$rvm_patches_path/$package/crypto-Makefile.patch"
-
+ # Don't use -j option for make OpenSSL
+ if [[ ! -z "$rvm_make_flags" ]] ; then
+ rvm_make_flags=$(echo $rvm_make_flags | sed -e "s/-j[[:space:]]*[[0-9]]*//")
+ fi
else
configure_command="./config"
fi
configure="$configure_command $openssl_os -I$rvm_usr_path/include -L$rvm_usr_path/lib --prefix=$rvm_usr_path zlib no-asm no-krb5 shared"
install_package
@@ -160,9 +182,9 @@
${library}
else
$rvm_scripts_path/log "error" "Package '${library}' is unknown."
fi
else
- $rvm_scripts_path/log "info" "Usage: 'rvm package {install,uninstall} {openssl,zlib,readline,iconv,ncurses}'"
+ $rvm_scripts_path/log "info" "Usage: 'rvm package {install,uninstall} {readline,iconv,curl,openssl,zlib,autoconf,ncurses,pkgconfig,gettext,glib,mono,llvm,libxml2}'"
exit 1
fi